Skip to content

Commit 89518a4

Browse files
matthijskooijmancmaglie
authored andcommitted
Test sketch that includes from subfolder
There was already a test for including from inside the `src/` subfolder, but including from other subdirectories should also be supported (even when source files inside those directories are not compiled). This adds a test for this. See also arduino/Arduino#5186. Signed-off-by: Matthijs Kooijman <[email protected]>
1 parent a3eadea commit 89518a4

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

src/arduino.cc/builder/test/sketch_with_subfolders/sketch_with_subfolders.ino

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include <testlib1.h>
2+
#include "subfolder/other.h"
23
#include "src/subfolder/other.h"
34

45
MyClass myClass;
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,2 @@
1-
#ifndef other__h
2-
#define other__h
3-
4-
class MyClass {
5-
public:
6-
MyClass();
7-
void init ( Stream *controllerStream );
8-
9-
private:
10-
Stream *controllerStream;
11-
};
12-
#endif
1+
// This file *is* included from the main sketch, even though it is
2+
// outside of the src/ directory.

0 commit comments

Comments
 (0)