aboutsummaryrefslogtreecommitdiff
path: root/test/tools/javac/flow/tests/TestCaseSwitch.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/tools/javac/flow/tests/TestCaseSwitch.java')
-rw-r--r--test/tools/javac/flow/tests/TestCaseSwitch.java25
1 files changed, 18 insertions, 7 deletions
diff --git a/test/tools/javac/flow/tests/TestCaseSwitch.java b/test/tools/javac/flow/tests/TestCaseSwitch.java
index d96850ff..e67e1911 100644
--- a/test/tools/javac/flow/tests/TestCaseSwitch.java
+++ b/test/tools/javac/flow/tests/TestCaseSwitch.java
@@ -5,7 +5,7 @@ public class TestCaseSwitch {
@AliveRange(varName="o", bytecodeStart=31, bytecodeLength=16)
@AliveRange(varName="o", bytecodeStart=50, bytecodeLength=15)
@AliveRange(varName="o", bytecodeStart=68, bytecodeLength=1)
- @AliveRange(varName="oo", bytecodeStart=39, bytecodeLength=26)
+ @AliveRange(varName="oo", bytecodeStart=39, bytecodeLength=8)
@AliveRange(varName="uu", bytecodeStart=59, bytecodeLength=6)
void m1(String[] args) {
Object o;
@@ -29,7 +29,7 @@ public class TestCaseSwitch {
@AliveRange(varName="o", bytecodeStart=95, bytecodeLength=18)
@AliveRange(varName="o", bytecodeStart=116, bytecodeLength=15)
@AliveRange(varName="o", bytecodeStart=134, bytecodeLength=1)
- @AliveRange(varName="oo", bytecodeStart=104, bytecodeLength=27)
+ @AliveRange(varName="oo", bytecodeStart=104, bytecodeLength=9)
@AliveRange(varName="uu", bytecodeStart=125, bytecodeLength=6)
void m2(String[] args) {
Object o;
@@ -50,12 +50,14 @@ public class TestCaseSwitch {
o = "return";
}
- @AliveRange(varName="o", bytecodeStart=31, bytecodeLength=8)
- @AliveRange(varName="o", bytecodeStart=42, bytecodeLength=8)
- @AliveRange(varName="o", bytecodeStart=53, bytecodeLength=9)
- void m3(String[] args) {
+ @AliveRange(varName="o", bytecodeStart=35, bytecodeLength=8)
+ @AliveRange(varName="o", bytecodeStart=46, bytecodeLength=8)
+ @AliveRange(varName="o", bytecodeStart=78, bytecodeLength=5)
+ @AliveRange(varName="o", bytecodeStart=86, bytecodeLength=1)
+ @AliveRange(varName="oo", bytecodeStart=56, bytecodeLength=16)
+ void m3(int i) {
Object o;
- switch (args.length) {
+ switch (i) {
case 0:
o = "0";
o.hashCode();
@@ -64,10 +66,19 @@ public class TestCaseSwitch {
o = "1";
o.hashCode();
break;
+ case 2:
+ int oo = i;
+ if (oo > 1) {
+ System.out.println("greater");
+ }
+ break;
+ case 3:
+ int uu = i;
default:
o = "default";
o.hashCode();
}
o = "finish";
}
+
}