Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Ridge2015-02-14 20:50:32 -0500
committerGerrit Code Review @ Eclipse.org2015-02-16 01:48:37 -0500
commit0221ee20b17cae754bbc07fa8ec97671c7ed4b19 (patch)
tree9111f55979f741fd883d08f9e0796fa9985cfa2e /codan/org.eclipse.cdt.codan.core.test
parent155fa65c1c0d8190fc9d377963d95a8ac98ebb6c (diff)
downloadorg.eclipse.cdt-0221ee20b17cae754bbc07fa8ec97671c7ed4b19.tar.gz
org.eclipse.cdt-0221ee20b17cae754bbc07fa8ec97671c7ed4b19.tar.xz
org.eclipse.cdt-0221ee20b17cae754bbc07fa8ec97671c7ed4b19.zip
Bug 441714 - Consider spurious semicolons in CaseBreakChecker
Change-Id: Id4fe394164063007c45da37ae82cc730a9e726dd Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Diffstat (limited to 'codan/org.eclipse.cdt.codan.core.test')
-rw-r--r--codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/CaseBreakCheckerTest.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/CaseBreakCheckerTest.java b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/CaseBreakCheckerTest.java
index 99da565912..dab450839e 100644
--- a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/CaseBreakCheckerTest.java
+++ b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/CaseBreakCheckerTest.java
@@ -563,4 +563,18 @@ public class CaseBreakCheckerTest extends CheckerTestCase {
loadCodeAndRun(code);
checkErrorLine(4, ER_ID);
}
+
+ // void foo() {
+ // switch (0) {
+ // case 0:
+ // return 42;;
+ // case 1:
+ // break;
+ // }
+ // }
+ public void testDoubleSemicolon_bug441714() {
+ String code = getAboveComment();
+ loadCodeAndRun(code);
+ checkNoErrorsOfKind(ER_ID);
+ }
}

Back to the top