push condition inside call action (IDEA-88814)

This commit is contained in:
anna
2012-07-17 12:09:21 +02:00
parent f21c22fd94
commit 6aaad412f0
10 changed files with 191 additions and 0 deletions
@@ -0,0 +1,7 @@
// "Push condition b inside method call" "true"
class Foo {
void bar(boolean b){
String s = foo(b ? "true" : "false");
}
String foo(String p) {return p;}
}
@@ -0,0 +1,7 @@
// "Push condition b inside method call" "true"
class Foo {
void bar(boolean b){
String s = b <caret>? foo("true") : foo("false");
}
String foo(String p) {return p;}
}
@@ -0,0 +1,8 @@
// "Push condition b inside method call" "false"
class Foo {
void bar(boolean b){
String s = b <caret>? foo("true") : foo(false);
}
String foo(String p) {return p;}
String foo(boolean b) {return "false";}
}
@@ -0,0 +1,7 @@
// "Push condition b inside method call" "false"
class Foo {
void bar(boolean b){
String s = b <caret>? foo("true", true) : foo("false", false);
}
String foo(String p, boolean b) {return p;}
}