Find Usages: Rename test class and move test data

This commit is contained in:
Alexey Sedunov
2015-06-06 02:40:20 +03:00
parent 81440815e1
commit 2a73247566
47 changed files with 41 additions and 31 deletions
@@ -33,7 +33,7 @@ import org.jetbrains.kotlin.codegen.flags.AbstractWriteFlagsTest
import org.jetbrains.kotlin.codegen.generated.AbstractBlackBoxCodegenTest
import org.jetbrains.kotlin.codegen.generated.AbstractBlackBoxInlineCodegenTest
import org.jetbrains.kotlin.findUsages.AbstractJetFindUsagesTest
import org.jetbrains.kotlin.findUsages.AbstractKotlinFindUsagesInLibrarySourceTest
import org.jetbrains.kotlin.findUsages.AbstractKotlinFindUsagesWithLibraryTest
import org.jetbrains.kotlin.formatter.AbstractJetFormatterTest
import org.jetbrains.kotlin.formatter.AbstractJetTypingIndentationTestBase
import org.jetbrains.kotlin.generators.tests.generator.*
@@ -504,8 +504,8 @@ fun main(args: Array<String>) {
model("findUsages/java", pattern = """^(.+)\.0\.java$""")
}
testClass(javaClass<AbstractKotlinFindUsagesInLibrarySourceTest>()) {
model("findUsages/librarySources", pattern = """^(.+)\.0\.kt$""")
testClass(javaClass<AbstractKotlinFindUsagesWithLibraryTest>()) {
model("findUsages/libraryUsages", pattern = """^(.+)\.0\.kt$""")
}
testClass(javaClass<AbstractJetMoveTest>()) {
@@ -21,7 +21,7 @@ import com.intellij.testFramework.LightProjectDescriptor
import org.jetbrains.kotlin.idea.test.JdkAndMockLibraryProjectDescriptor
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
public abstract class AbstractKotlinFindUsagesInLibrarySourceTest: AbstractJetFindUsagesTest() {
public abstract class AbstractKotlinFindUsagesWithLibraryTest : AbstractJetFindUsagesTest() {
override fun getProjectDescriptor() =
JdkAndMockLibraryProjectDescriptor(PluginTestCaseBase.getTestDataPathBase() + "/findUsages/_library", true)
JdkAndMockLibraryProjectDescriptor(PluginTestCaseBase.getTestDataPathBase() + "/findUsages/libraryUsages/_library", true)
}
@@ -27,125 +27,135 @@ import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("idea/testData/findUsages/librarySources")
@TestMetadata("idea/testData/findUsages/libraryUsages")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class KotlinFindUsagesInLibrarySourceTestGenerated extends AbstractKotlinFindUsagesInLibrarySourceTest {
public void testAllFilesPresentInLibrarySources() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/librarySources"), Pattern.compile("^(.+)\\.0\\.kt$"), true);
public class KotlinFindUsagesWithLibraryTestGenerated extends AbstractKotlinFindUsagesWithLibraryTest {
public void testAllFilesPresentInLibraryUsages() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/libraryUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), true);
}
@TestMetadata("idea/testData/findUsages/librarySources/javaLibrary")
@TestMetadata("idea/testData/findUsages/libraryUsages/javaLibrary")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class JavaLibrary extends AbstractKotlinFindUsagesInLibrarySourceTest {
public static class JavaLibrary extends AbstractKotlinFindUsagesWithLibraryTest {
public void testAllFilesPresentInJavaLibrary() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/librarySources/javaLibrary"), Pattern.compile("^(.+)\\.0\\.kt$"), true);
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/libraryUsages/javaLibrary"), Pattern.compile("^(.+)\\.0\\.kt$"), true);
}
@TestMetadata("LibraryClassUsages.0.kt")
public void testLibraryClassUsages() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/librarySources/javaLibrary/LibraryClassUsages.0.kt");
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryClassUsages.0.kt");
doTest(fileName);
}
@TestMetadata("LibraryConstructorUsages.0.kt")
public void testLibraryConstructorUsages() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/librarySources/javaLibrary/LibraryConstructorUsages.0.kt");
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryConstructorUsages.0.kt");
doTest(fileName);
}
@TestMetadata("LibraryFieldUsages.0.kt")
public void testLibraryFieldUsages() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/librarySources/javaLibrary/LibraryFieldUsages.0.kt");
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryFieldUsages.0.kt");
doTest(fileName);
}
@TestMetadata("LibraryMethodUsages.0.kt")
public void testLibraryMethodUsages() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/librarySources/javaLibrary/LibraryMethodUsages.0.kt");
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryMethodUsages.0.kt");
doTest(fileName);
}
@TestMetadata("LibraryStaticFieldUsages.0.kt")
public void testLibraryStaticFieldUsages() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/librarySources/javaLibrary/LibraryStaticFieldUsages.0.kt");
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticFieldUsages.0.kt");
doTest(fileName);
}
@TestMetadata("LibraryStaticMethodUsages.0.kt")
public void testLibraryStaticMethodUsages() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/librarySources/javaLibrary/LibraryStaticMethodUsages.0.kt");
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticMethodUsages.0.kt");
doTest(fileName);
}
}
@TestMetadata("idea/testData/findUsages/librarySources/kotlinLibrary")
@TestMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class KotlinLibrary extends AbstractKotlinFindUsagesInLibrarySourceTest {
public static class KotlinLibrary extends AbstractKotlinFindUsagesWithLibraryTest {
public void testAllFilesPresentInKotlinLibrary() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/librarySources/kotlinLibrary"), Pattern.compile("^(.+)\\.0\\.kt$"), true);
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/libraryUsages/kotlinLibrary"), Pattern.compile("^(.+)\\.0\\.kt$"), true);
}
@TestMetadata("LibraryClassUsages.0.kt")
public void testLibraryClassUsages() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/librarySources/kotlinLibrary/LibraryClassUsages.0.kt");
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryClassUsages.0.kt");
doTest(fileName);
}
@TestMetadata("LibraryFunctionUsages.0.kt")
public void testLibraryFunctionUsages() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/librarySources/kotlinLibrary/LibraryFunctionUsages.0.kt");
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryFunctionUsages.0.kt");
doTest(fileName);
}
@TestMetadata("LibraryMemberFunctionUsages.0.kt")
public void testLibraryMemberFunctionUsages() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/librarySources/kotlinLibrary/LibraryMemberFunctionUsages.0.kt");
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryMemberFunctionUsages.0.kt");
doTest(fileName);
}
@TestMetadata("LibraryNestedClassMemberFunctionUsages.0.kt")
public void testLibraryNestedClassMemberFunctionUsages() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/librarySources/kotlinLibrary/LibraryNestedClassMemberFunctionUsages.0.kt");
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassMemberFunctionUsages.0.kt");
doTest(fileName);
}
@TestMetadata("LibraryNestedClassPrimaryConstructorUsages.0.kt")
public void testLibraryNestedClassPrimaryConstructorUsages() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/librarySources/kotlinLibrary/LibraryNestedClassPrimaryConstructorUsages.0.kt");
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassPrimaryConstructorUsages.0.kt");
doTest(fileName);
}
@TestMetadata("LibraryNestedClassSecondaryConstructorUsages.0.kt")
public void testLibraryNestedClassSecondaryConstructorUsages() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/librarySources/kotlinLibrary/LibraryNestedClassSecondaryConstructorUsages.0.kt");
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassSecondaryConstructorUsages.0.kt");
doTest(fileName);
}
@TestMetadata("LibraryNestedClassUsages.0.kt")
public void testLibraryNestedClassUsages() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/librarySources/kotlinLibrary/LibraryNestedClassUsages.0.kt");
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassUsages.0.kt");
doTest(fileName);
}
@TestMetadata("LibraryObjectUsages.0.kt")
public void testLibraryObjectUsages() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/librarySources/kotlinLibrary/LibraryObjectUsages.0.kt");
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryObjectUsages.0.kt");
doTest(fileName);
}
@TestMetadata("LibraryPrimaryConstructorUsages.0.kt")
public void testLibraryPrimaryConstructorUsages() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/librarySources/kotlinLibrary/LibraryPrimaryConstructorUsages.0.kt");
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryPrimaryConstructorUsages.0.kt");
doTest(fileName);
}
@TestMetadata("LibrarySecondaryConstructorUsages.0.kt")
public void testLibrarySecondaryConstructorUsages() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/librarySources/kotlinLibrary/LibrarySecondaryConstructorUsages.0.kt");
String fileName = JetTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibrarySecondaryConstructorUsages.0.kt");
doTest(fileName);
}
}
@TestMetadata("idea/testData/findUsages/libraryUsages/_library")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class _library extends AbstractKotlinFindUsagesWithLibraryTest {
public void testAllFilesPresentIn_library() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/libraryUsages/_library"), Pattern.compile("^(.+)\\.0\\.kt$"), true);
}
}
}