Skip to content

Commit 03e3009

Browse files
committed
Add dummy test files to sample projects to ensure they aren't included in C++ file listings
1 parent 4ed18bc commit 03e3009

File tree

4 files changed

+30
-3
lines changed

4 files changed

+30
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include <ArduinoUnitTests.h>
2+
3+
unittest(nothing)
4+
{
5+
}
6+
7+
unittest_main()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include <ArduinoUnitTests.h>
2+
3+
unittest(nothing)
4+
{
5+
}
6+
7+
unittest_main()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include <ArduinoUnitTests.h>
2+
3+
unittest(nothing)
4+
{
5+
}
6+
7+
unittest_main()

spec/cpp_library_spec.rb

+9-3
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ def get_relative_dir(sampleprojects_tests_dir)
9090
"OnePointOhDummy/utility"
9191
].map { |f| Pathname.new(f) },
9292
arduino_library_src_dirs: [],
93-
test_files: []
93+
test_files: [
94+
"OnePointOhDummy/test/null.cpp",
95+
].map { |f| Pathname.new(f) }
9496
},
9597
OnePointFiveMalformed: {
9698
one_five: false,
@@ -118,7 +120,9 @@ def get_relative_dir(sampleprojects_tests_dir)
118120
"OnePointFiveDummy/src/subdir",
119121
].map { |f| Pathname.new(f) },
120122
arduino_library_src_dirs: [],
121-
test_files: []
123+
test_files: [
124+
"OnePointFiveDummy/test/null.cpp",
125+
].map { |f| Pathname.new(f) }
122126
}
123127
}
124128

@@ -129,7 +133,9 @@ def get_relative_dir(sampleprojects_tests_dir)
129133
cpp_files_libraries: answers[:OnePointOhDummy][:cpp_files] + answers[:OnePointFiveDummy][:cpp_files],
130134
header_dirs: ["DependOnSomething/src"].map { |f| Pathname.new(f) }, # this is not recursive!
131135
arduino_library_src_dirs: answers[:OnePointOhDummy][:header_dirs] + answers[:OnePointFiveDummy][:header_dirs],
132-
test_files: []
136+
test_files: [
137+
"DependOnSomething/test/null.cpp",
138+
].map { |f| Pathname.new(f) }
133139
}
134140

135141
answers.freeze

0 commit comments

Comments
 (0)