test for IDEA-105455

This commit is contained in:
anna
2013-04-16 14:58:55 +02:00
parent 33a37e4aca
commit 8e189439ca
4 changed files with 31 additions and 1 deletions
@@ -0,0 +1,8 @@
import java.io.File;
class Test {
java.io.File[] get() {return null;}
{
File[] files = get();
}
}
@@ -0,0 +1,6 @@
class Test {
java.io.File[] get() {return null;}
{
<selection>get()</selection>
}
}
@@ -1,6 +1,7 @@
package com.intellij.refactoring;
import com.intellij.JavaTestUtil;
import com.intellij.idea.Bombed;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.project.Project;
import com.intellij.psi.CommonClassNames;
@@ -18,6 +19,7 @@ import junit.framework.Assert;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import java.util.Calendar;
import java.util.Collection;
/**
@@ -396,6 +398,16 @@ public class IntroduceVariableTest extends LightCodeInsightTestCase {
doTest(new MockIntroduceVariableHandler("m", false, false, false, "Foo.I"));
}
@Bombed(month = Calendar.APRIL, day = 22, user = "Roman")
public void testReturnNonExportedArray() throws Exception {
doTest(new MockIntroduceVariableHandler("i", false, false, false, "java.io.File[]") {
@Override
protected boolean isInplaceAvailableInTestMode() {
return true;
}
});
}
private void doTest(IntroduceVariableBase testMe) throws Exception {
@NonNls String baseName = "/refactoring/introduceVariable/" + getTestName(false);
configureByFile(baseName + ".java");