Skip to content

Commit e980cf4

Browse files
committed
add test for sketch with extern C func declaration
Signed-off-by: Martino Facchin <[email protected]>
1 parent 12c65ef commit e980cf4

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
void setup() {
2+
// put your setup code here, to run once:
3+
test();
4+
}
5+
6+
void loop() {
7+
// put your main code here, to run repeatedly:
8+
9+
}
10+
11+
extern "C" void test() {}

Diff for: src/arduino.cc/builder/test/try_build_of_problematic_sketch_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ func TestTryBuild036(t *testing.T) {
191191
tryBuildWithContext(t, context, "sketch11", "sketch_fastleds.ino")
192192
}
193193

194+
func TestTryBuild037(t *testing.T) {
195+
tryBuild(t, "sketch_with_externC", "sketch_with_externC.ino")
196+
}
197+
194198
func makeDefaultContext(t *testing.T) map[string]interface{} {
195199
DownloadCoresAndToolsAndLibraries(t)
196200

0 commit comments

Comments
 (0)