Do extensions test with fixtures
This commit is contained in:
@@ -231,6 +231,7 @@ public class GenerateTests {
|
|||||||
"JetBasicJSCompletionTest",
|
"JetBasicJSCompletionTest",
|
||||||
AbstractJetJSCompletionTest.class,
|
AbstractJetJSCompletionTest.class,
|
||||||
testModel("idea/testData/completion/basic", false, "doTest"),
|
testModel("idea/testData/completion/basic", false, "doTest"),
|
||||||
|
testModel("idea/testData/completion/basic/extensions", false, "doTest"),
|
||||||
testModel("idea/testData/completion/basic/js", false, "doTest")
|
testModel("idea/testData/completion/basic/js", false, "doTest")
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -239,6 +240,7 @@ public class GenerateTests {
|
|||||||
"JetBasicJavaCompletionTest",
|
"JetBasicJavaCompletionTest",
|
||||||
AbstractJavaCompletionTest.class,
|
AbstractJavaCompletionTest.class,
|
||||||
testModel("idea/testData/completion/basic", false, "doTest"),
|
testModel("idea/testData/completion/basic", false, "doTest"),
|
||||||
|
testModel("idea/testData/completion/basic/extensions", false, "doTest"),
|
||||||
testModel("idea/testData/completion/basic/java", false, "doTest")
|
testModel("idea/testData/completion/basic/java", false, "doTest")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,66 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2013 JetBrains s.r.o.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jetbrains.jet.completion;
|
|
||||||
|
|
||||||
import org.jetbrains.jet.plugin.PluginTestCaseBase;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
|
|
||||||
public class ExtensionsCompletionTest extends JetCompletionTestBase {
|
|
||||||
|
|
||||||
public void testExtensionInExtendedClass() {
|
|
||||||
doTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testExtensionInExtendedClassThis() {
|
|
||||||
doTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testExtensionInExtension() {
|
|
||||||
doTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testExtensionInExtensionThis() {
|
|
||||||
doTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testInvalidTypeParameters() {
|
|
||||||
doTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testIrrelevantExtension() {
|
|
||||||
doTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testJavaTypeExtension() {
|
|
||||||
doTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testKotlinGenericTypeExtension() {
|
|
||||||
doTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testKotlinTypeExtension() {
|
|
||||||
doTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String getTestDataPath() {
|
|
||||||
return new File(PluginTestCaseBase.getTestDataPathBase(), "/completion/basic/extensions").getPath() +
|
|
||||||
File.separator;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -30,7 +30,7 @@ import org.jetbrains.jet.completion.AbstractJetJSCompletionTest;
|
|||||||
|
|
||||||
/** This class is generated by {@link org.jetbrains.jet.generators.tests.GenerateTests}. DO NOT MODIFY MANUALLY */
|
/** This class is generated by {@link org.jetbrains.jet.generators.tests.GenerateTests}. DO NOT MODIFY MANUALLY */
|
||||||
@SuppressWarnings("all")
|
@SuppressWarnings("all")
|
||||||
@InnerTestClasses({JetBasicJSCompletionTest.Basic.class, JetBasicJSCompletionTest.Js.class})
|
@InnerTestClasses({JetBasicJSCompletionTest.Basic.class, JetBasicJSCompletionTest.Extensions.class, JetBasicJSCompletionTest.Js.class})
|
||||||
public class JetBasicJSCompletionTest extends AbstractJetJSCompletionTest {
|
public class JetBasicJSCompletionTest extends AbstractJetJSCompletionTest {
|
||||||
@TestMetadata("idea/testData/completion/basic")
|
@TestMetadata("idea/testData/completion/basic")
|
||||||
public static class Basic extends AbstractJetJSCompletionTest {
|
public static class Basic extends AbstractJetJSCompletionTest {
|
||||||
@@ -350,6 +350,59 @@ public class JetBasicJSCompletionTest extends AbstractJetJSCompletionTest {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("idea/testData/completion/basic/extensions")
|
||||||
|
public static class Extensions extends AbstractJetJSCompletionTest {
|
||||||
|
public void testAllFilesPresentInExtensions() throws Exception {
|
||||||
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("idea/testData/completion/basic/extensions"), Pattern.compile("^(.+)\\.kt$"), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ExtensionInExtendedClass.kt")
|
||||||
|
public void testExtensionInExtendedClass() throws Exception {
|
||||||
|
doTest("idea/testData/completion/basic/extensions/ExtensionInExtendedClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ExtensionInExtendedClassThis.kt")
|
||||||
|
public void testExtensionInExtendedClassThis() throws Exception {
|
||||||
|
doTest("idea/testData/completion/basic/extensions/ExtensionInExtendedClassThis.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ExtensionInExtension.kt")
|
||||||
|
public void testExtensionInExtension() throws Exception {
|
||||||
|
doTest("idea/testData/completion/basic/extensions/ExtensionInExtension.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ExtensionInExtensionThis.kt")
|
||||||
|
public void testExtensionInExtensionThis() throws Exception {
|
||||||
|
doTest("idea/testData/completion/basic/extensions/ExtensionInExtensionThis.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("InvalidTypeParameters.kt")
|
||||||
|
public void testInvalidTypeParameters() throws Exception {
|
||||||
|
doTest("idea/testData/completion/basic/extensions/InvalidTypeParameters.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("IrrelevantExtension.kt")
|
||||||
|
public void testIrrelevantExtension() throws Exception {
|
||||||
|
doTest("idea/testData/completion/basic/extensions/IrrelevantExtension.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("JavaTypeExtension.kt")
|
||||||
|
public void testJavaTypeExtension() throws Exception {
|
||||||
|
doTest("idea/testData/completion/basic/extensions/JavaTypeExtension.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("KotlinGenericTypeExtension.kt")
|
||||||
|
public void testKotlinGenericTypeExtension() throws Exception {
|
||||||
|
doTest("idea/testData/completion/basic/extensions/KotlinGenericTypeExtension.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("KotlinTypeExtension.kt")
|
||||||
|
public void testKotlinTypeExtension() throws Exception {
|
||||||
|
doTest("idea/testData/completion/basic/extensions/KotlinTypeExtension.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("idea/testData/completion/basic/js")
|
@TestMetadata("idea/testData/completion/basic/js")
|
||||||
public static class Js extends AbstractJetJSCompletionTest {
|
public static class Js extends AbstractJetJSCompletionTest {
|
||||||
public void testAllFilesPresentInJs() throws Exception {
|
public void testAllFilesPresentInJs() throws Exception {
|
||||||
@@ -371,6 +424,7 @@ public class JetBasicJSCompletionTest extends AbstractJetJSCompletionTest {
|
|||||||
public static Test suite() {
|
public static Test suite() {
|
||||||
TestSuite suite = new TestSuite("JetBasicJSCompletionTest");
|
TestSuite suite = new TestSuite("JetBasicJSCompletionTest");
|
||||||
suite.addTestSuite(Basic.class);
|
suite.addTestSuite(Basic.class);
|
||||||
|
suite.addTestSuite(Extensions.class);
|
||||||
suite.addTestSuite(Js.class);
|
suite.addTestSuite(Js.class);
|
||||||
return suite;
|
return suite;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import org.jetbrains.jet.completion.AbstractJavaCompletionTest;
|
|||||||
|
|
||||||
/** This class is generated by {@link org.jetbrains.jet.generators.tests.GenerateTests}. DO NOT MODIFY MANUALLY */
|
/** This class is generated by {@link org.jetbrains.jet.generators.tests.GenerateTests}. DO NOT MODIFY MANUALLY */
|
||||||
@SuppressWarnings("all")
|
@SuppressWarnings("all")
|
||||||
@InnerTestClasses({JetBasicJavaCompletionTest.Basic.class, JetBasicJavaCompletionTest.Java.class})
|
@InnerTestClasses({JetBasicJavaCompletionTest.Basic.class, JetBasicJavaCompletionTest.Extensions.class, JetBasicJavaCompletionTest.Java.class})
|
||||||
public class JetBasicJavaCompletionTest extends AbstractJavaCompletionTest {
|
public class JetBasicJavaCompletionTest extends AbstractJavaCompletionTest {
|
||||||
@TestMetadata("idea/testData/completion/basic")
|
@TestMetadata("idea/testData/completion/basic")
|
||||||
public static class Basic extends AbstractJavaCompletionTest {
|
public static class Basic extends AbstractJavaCompletionTest {
|
||||||
@@ -350,6 +350,59 @@ public class JetBasicJavaCompletionTest extends AbstractJavaCompletionTest {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("idea/testData/completion/basic/extensions")
|
||||||
|
public static class Extensions extends AbstractJavaCompletionTest {
|
||||||
|
public void testAllFilesPresentInExtensions() throws Exception {
|
||||||
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("idea/testData/completion/basic/extensions"), Pattern.compile("^(.+)\\.kt$"), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ExtensionInExtendedClass.kt")
|
||||||
|
public void testExtensionInExtendedClass() throws Exception {
|
||||||
|
doTest("idea/testData/completion/basic/extensions/ExtensionInExtendedClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ExtensionInExtendedClassThis.kt")
|
||||||
|
public void testExtensionInExtendedClassThis() throws Exception {
|
||||||
|
doTest("idea/testData/completion/basic/extensions/ExtensionInExtendedClassThis.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ExtensionInExtension.kt")
|
||||||
|
public void testExtensionInExtension() throws Exception {
|
||||||
|
doTest("idea/testData/completion/basic/extensions/ExtensionInExtension.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ExtensionInExtensionThis.kt")
|
||||||
|
public void testExtensionInExtensionThis() throws Exception {
|
||||||
|
doTest("idea/testData/completion/basic/extensions/ExtensionInExtensionThis.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("InvalidTypeParameters.kt")
|
||||||
|
public void testInvalidTypeParameters() throws Exception {
|
||||||
|
doTest("idea/testData/completion/basic/extensions/InvalidTypeParameters.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("IrrelevantExtension.kt")
|
||||||
|
public void testIrrelevantExtension() throws Exception {
|
||||||
|
doTest("idea/testData/completion/basic/extensions/IrrelevantExtension.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("JavaTypeExtension.kt")
|
||||||
|
public void testJavaTypeExtension() throws Exception {
|
||||||
|
doTest("idea/testData/completion/basic/extensions/JavaTypeExtension.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("KotlinGenericTypeExtension.kt")
|
||||||
|
public void testKotlinGenericTypeExtension() throws Exception {
|
||||||
|
doTest("idea/testData/completion/basic/extensions/KotlinGenericTypeExtension.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("KotlinTypeExtension.kt")
|
||||||
|
public void testKotlinTypeExtension() throws Exception {
|
||||||
|
doTest("idea/testData/completion/basic/extensions/KotlinTypeExtension.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("idea/testData/completion/basic/java")
|
@TestMetadata("idea/testData/completion/basic/java")
|
||||||
public static class Java extends AbstractJavaCompletionTest {
|
public static class Java extends AbstractJavaCompletionTest {
|
||||||
public void testAllFilesPresentInJava() throws Exception {
|
public void testAllFilesPresentInJava() throws Exception {
|
||||||
@@ -396,6 +449,7 @@ public class JetBasicJavaCompletionTest extends AbstractJavaCompletionTest {
|
|||||||
public static Test suite() {
|
public static Test suite() {
|
||||||
TestSuite suite = new TestSuite("JetBasicJavaCompletionTest");
|
TestSuite suite = new TestSuite("JetBasicJavaCompletionTest");
|
||||||
suite.addTestSuite(Basic.class);
|
suite.addTestSuite(Basic.class);
|
||||||
|
suite.addTestSuite(Extensions.class);
|
||||||
suite.addTestSuite(Java.class);
|
suite.addTestSuite(Java.class);
|
||||||
return suite;
|
return suite;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user