We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91d7293 commit 770abf8Copy full SHA for 770abf8
cxx-squid/src/test/java/org/sonar/cxx/parser/StatementTest.java
@@ -132,6 +132,17 @@ public void switchStatement() {
132
assertThat(p).matches("switch ( condition ) { case constantExpression ... constantExpression : break; }");
133
}
134
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
146
@Test
147
public void ifStatement_reallife() {
148
p.setRootRule(g.rule(CxxGrammarImpl.ifStatement));
0 commit comments