1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Bug 339802 - [fp] No break at the end of case if "break" is defined in braces and in a macro

This commit is contained in:
Alena Laskavaia 2011-04-25 01:02:56 +00:00
parent 4f80f47e85
commit d3ddf272ed

View file

@ -520,4 +520,20 @@ public class CaseBreakCheckerTest extends CheckerTestCase {
loadCodeAndRun(code);
checkErrorLine(3);
}
// #define DEFINE_BREAK {break;}
// void foo ( int a )
// {
// switch ( a )
// {
// case 1:
// DEFINE_BREAK // <-- Warning: No break at the end of this case
// }
// }
public void testBreakInBraces() {
String code = getAboveComment();
loadCodeAndRun(code);
checkNoErrors();
}
}