Adding type arguments if necessary.
#KT-2637 in progress
This commit is contained in:
@@ -5,9 +5,11 @@ import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.refactoring.util.CommonRefactoringUtil;
|
||||
import com.intellij.testFramework.LightProjectDescriptor;
|
||||
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.InTextDirectivesUtils;
|
||||
import org.jetbrains.jet.plugin.JetWithJdkAndRuntimeLightProjectDescriptor;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -51,4 +53,10 @@ public abstract class AbstractInlineTest extends LightCodeInsightFixtureTestCase
|
||||
assertFalse(afterFileExists);
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected LightProjectDescriptor getProjectDescriptor() {
|
||||
return JetWithJdkAndRuntimeLightProjectDescriptor.INSTANCE;
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ import org.jetbrains.jet.plugin.refactoring.inline.AbstractInlineTest;
|
||||
/** This class is generated by {@link org.jetbrains.jet.generators.tests.GenerateTests}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("idea/testData/refactoring/inline")
|
||||
@InnerTestClasses({InlineTestGenerated.AddParenthesis.class})
|
||||
@InnerTestClasses({InlineTestGenerated.AddParenthesis.class, InlineTestGenerated.ExplicateTypeArgument.class})
|
||||
public class InlineTestGenerated extends AbstractInlineTest {
|
||||
public void testAllFilesPresentInInline() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("idea/testData/refactoring/inline"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
@@ -255,10 +255,64 @@ public class InlineTestGenerated extends AbstractInlineTest {
|
||||
|
||||
}
|
||||
|
||||
@TestMetadata("idea/testData/refactoring/inline/explicateTypeArgument")
|
||||
public static class ExplicateTypeArgument extends AbstractInlineTest {
|
||||
public void testAllFilesPresentInExplicateTypeArgument() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("idea/testData/refactoring/inline/explicateTypeArgument"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("DeeperNestedCall.kt")
|
||||
public void testDeeperNestedCall() throws Exception {
|
||||
doTest("idea/testData/refactoring/inline/explicateTypeArgument/DeeperNestedCall.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("EnoughDontExplicate.kt")
|
||||
public void testEnoughDontExplicate() throws Exception {
|
||||
doTest("idea/testData/refactoring/inline/explicateTypeArgument/EnoughDontExplicate.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ExplicateForSome.kt")
|
||||
public void testExplicateForSome() throws Exception {
|
||||
doTest("idea/testData/refactoring/inline/explicateTypeArgument/ExplicateForSome.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InStringTemplate.kt")
|
||||
public void testInStringTemplate() throws Exception {
|
||||
doTest("idea/testData/refactoring/inline/explicateTypeArgument/InStringTemplate.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NestedCall.kt")
|
||||
public void testNestedCall() throws Exception {
|
||||
doTest("idea/testData/refactoring/inline/explicateTypeArgument/NestedCall.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Parenthesized.kt")
|
||||
public void testParenthesized() throws Exception {
|
||||
doTest("idea/testData/refactoring/inline/explicateTypeArgument/Parenthesized.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Qualified.kt")
|
||||
public void testQualified() throws Exception {
|
||||
doTest("idea/testData/refactoring/inline/explicateTypeArgument/Qualified.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Simplest.kt")
|
||||
public void testSimplest() throws Exception {
|
||||
doTest("idea/testData/refactoring/inline/explicateTypeArgument/Simplest.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("TrivialDontExplicate.kt")
|
||||
public void testTrivialDontExplicate() throws Exception {
|
||||
doTest("idea/testData/refactoring/inline/explicateTypeArgument/TrivialDontExplicate.kt");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
TestSuite suite = new TestSuite("InlineTestGenerated");
|
||||
suite.addTestSuite(InlineTestGenerated.class);
|
||||
suite.addTestSuite(AddParenthesis.class);
|
||||
suite.addTestSuite(ExplicateTypeArgument.class);
|
||||
return suite;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user