testdata for IDEA-80695

This commit is contained in:
anna
2012-11-05 15:24:37 +01:00
parent 1ba6d6cc92
commit 3786644b52
3 changed files with 49 additions and 0 deletions
@@ -0,0 +1,20 @@
import java.util.*;
class Test {
public void foo() {
<selection>List trades;
try {
trades = getTrades();
}
catch (RemoteException e) {
}
</selection>
//probably not assigned !!!
if (trades.isEmpty()) {
}
}
static class RemoteException extends Exception {
}
}
@@ -0,0 +1,25 @@
import java.util.*;
class Test {
public void foo() {
List trades = newMethod();
//probably not assigned !!!
if (trades.isEmpty()) {
}
}
private List newMethod() {
List trades;
try {
trades = getTrades();
}
catch (RemoteException e) {
}
return trades;
}
static class RemoteException extends Exception {
}
}
@@ -550,6 +550,10 @@ public class ExtractMethodTest extends LightCodeInsightTestCase {
doTest();
}
public void testParamDetection() throws Exception {
doTest();
}
private void doTestDisabledParam() throws PrepareFailedException {
final CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
settings.ELSE_ON_NEW_LINE = true;