Skip to content

Commit 770abf8

Browse files
committed
Commented-in test for #381
1 parent 91d7293 commit 770abf8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

cxx-squid/src/test/java/org/sonar/cxx/parser/StatementTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,17 @@ public void switchStatement() {
132132
assertThat(p).matches("switch ( condition ) { case constantExpression ... constantExpression : break; }");
133133
}
134134

135+
@Test
136+
public void switchStatement_reallife() {
137+
p.setRootRule(g.rule(CxxGrammarImpl.switchStatement));
138+
139+
assertThat(p).matches("switch (0) { default : break; }");
140+
141+
//TODO: make this work.
142+
//assertThat(p).matches("switch (0) { {default : break;} }");
143+
}
144+
145+
135146
@Test
136147
public void ifStatement_reallife() {
137148
p.setRootRule(g.rule(CxxGrammarImpl.ifStatement));

0 commit comments

Comments
 (0)