Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixAddDefaultTest.java')
-rw-r--r--codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixAddDefaultTest.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixAddDefaultTest.java b/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixAddDefaultTest.java
index 45a0732bf38..29fb17ddabe 100644
--- a/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixAddDefaultTest.java
+++ b/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/QuickFixAddDefaultTest.java
@@ -47,4 +47,39 @@ public class QuickFixAddDefaultTest extends QuickFixTestCase {
assertContainedIn("default:", result); //$NON-NLS-1$
}
+ //void func() {
+ //int f = 0;
+ //switch (f)
+ //{
+ //
+ //}
+ //}
+ public void testAddCase2() throws Exception {
+ loadcode(getAboveComment());
+ String result = runQuickFixOneFile();
+ assertContainedIn("default:", result); //$NON-NLS-1$
+ }
+
+ //void func() {
+ //int f = 0;
+ //switch (f)
+ // ;
+ //}
+ public void testAddCase3() throws Exception {
+ loadcode(getAboveComment());
+ String result = runQuickFixOneFile();
+ assertContainedIn("default:", result); //$NON-NLS-1$
+ }
+
+ //void func() {
+ //int f = 0;
+ //switch (f)
+ // case 0:
+ // break;
+ //}
+ public void testAddCase4() throws Exception {
+ loadcode(getAboveComment());
+ String result = runQuickFixOneFile();
+ assertContainedIn("default:", result); //$NON-NLS-1$
+ }
}

Back to the top