mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 09:19:13 +07:00
Java: More tests for intention to split switch branch with multiple values into separate branches (IDEA-203895)
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
// "Copy 'switch' branch" "true"
|
||||
class C {
|
||||
void foo(int n) {
|
||||
String s = "";
|
||||
switch (n) {
|
||||
case 1:
|
||||
case 2:
|
||||
s = "x";
|
||||
break;
|
||||
default:
|
||||
s = "x";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// "Copy 'switch' branch" "true"
|
||||
class C {
|
||||
void foo(int n) {
|
||||
String s = "";
|
||||
switch (n) {
|
||||
default:
|
||||
case 2:
|
||||
s = "x";
|
||||
break;
|
||||
case 1:
|
||||
s = "x";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Copy 'switch' branch" "true"
|
||||
class C {
|
||||
void foo(int n) {
|
||||
String s = "";
|
||||
switch (n) {
|
||||
case 1:
|
||||
<caret>default:
|
||||
case 2:
|
||||
s = "x";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Copy 'switch' branch" "true"
|
||||
class C {
|
||||
void foo(int n) {
|
||||
String s = "";
|
||||
switch (n) {
|
||||
<caret>case 1:
|
||||
default:
|
||||
case 2:
|
||||
s = "x";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user