Skip to content

Commit c87f8d3

Browse files
committed
Added test for sketch containing "class enums"
See arduino/ctags#5 for a fix. Signed-off-by: Cristian Maglie <c.maglie@arduino.cc>
1 parent f1e8c85 commit c87f8d3

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
void test() {
2+
test2();
3+
}
4+
5+
enum class MyEnum
6+
{
7+
AValue = 0,
8+
AnotherValue = 1
9+
};
10+
11+
void test2() {
12+
}
13+
14+
void setup() {
15+
}
16+
17+
void loop() {
18+
}
19+

src/arduino.cc/builder/test/try_build_of_problematic_sketch_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ func TestTryBuild034(t *testing.T) {
181181
tryBuild(t, "sketch_with_static_asserts", "sketch_with_static_asserts.ino")
182182
}
183183

184+
func TestTryBuild035(t *testing.T) {
185+
tryBuild(t, "sketch_with_enum_class", "sketch_with_enum_class.ino")
186+
}
187+
184188
func makeDefaultContext(t *testing.T) map[string]interface{} {
185189
DownloadCoresAndToolsAndLibraries(t)
186190

0 commit comments

Comments
 (0)