Find Usages: Rename test class and move test data
This commit is contained in:
@@ -33,7 +33,7 @@ import org.jetbrains.kotlin.codegen.flags.AbstractWriteFlagsTest
|
|||||||
import org.jetbrains.kotlin.codegen.generated.AbstractBlackBoxCodegenTest
|
import org.jetbrains.kotlin.codegen.generated.AbstractBlackBoxCodegenTest
|
||||||
import org.jetbrains.kotlin.codegen.generated.AbstractBlackBoxInlineCodegenTest
|
import org.jetbrains.kotlin.codegen.generated.AbstractBlackBoxInlineCodegenTest
|
||||||
import org.jetbrains.kotlin.findUsages.AbstractJetFindUsagesTest
|
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.AbstractJetFormatterTest
|
||||||
import org.jetbrains.kotlin.formatter.AbstractJetTypingIndentationTestBase
|
import org.jetbrains.kotlin.formatter.AbstractJetTypingIndentationTestBase
|
||||||
import org.jetbrains.kotlin.generators.tests.generator.*
|
import org.jetbrains.kotlin.generators.tests.generator.*
|
||||||
@@ -504,8 +504,8 @@ fun main(args: Array<String>) {
|
|||||||
model("findUsages/java", pattern = """^(.+)\.0\.java$""")
|
model("findUsages/java", pattern = """^(.+)\.0\.java$""")
|
||||||
}
|
}
|
||||||
|
|
||||||
testClass(javaClass<AbstractKotlinFindUsagesInLibrarySourceTest>()) {
|
testClass(javaClass<AbstractKotlinFindUsagesWithLibraryTest>()) {
|
||||||
model("findUsages/librarySources", pattern = """^(.+)\.0\.kt$""")
|
model("findUsages/libraryUsages", pattern = """^(.+)\.0\.kt$""")
|
||||||
}
|
}
|
||||||
|
|
||||||
testClass(javaClass<AbstractJetMoveTest>()) {
|
testClass(javaClass<AbstractJetMoveTest>()) {
|
||||||
|
|||||||
+2
-2
@@ -21,7 +21,7 @@ import com.intellij.testFramework.LightProjectDescriptor
|
|||||||
import org.jetbrains.kotlin.idea.test.JdkAndMockLibraryProjectDescriptor
|
import org.jetbrains.kotlin.idea.test.JdkAndMockLibraryProjectDescriptor
|
||||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||||
|
|
||||||
public abstract class AbstractKotlinFindUsagesInLibrarySourceTest: AbstractJetFindUsagesTest() {
|
public abstract class AbstractKotlinFindUsagesWithLibraryTest : AbstractJetFindUsagesTest() {
|
||||||
override fun getProjectDescriptor() =
|
override fun getProjectDescriptor() =
|
||||||
JdkAndMockLibraryProjectDescriptor(PluginTestCaseBase.getTestDataPathBase() + "/findUsages/_library", true)
|
JdkAndMockLibraryProjectDescriptor(PluginTestCaseBase.getTestDataPathBase() + "/findUsages/libraryUsages/_library", true)
|
||||||
}
|
}
|
||||||
+36
-26
@@ -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 */
|
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||||
@SuppressWarnings("all")
|
@SuppressWarnings("all")
|
||||||
@TestMetadata("idea/testData/findUsages/librarySources")
|
@TestMetadata("idea/testData/findUsages/libraryUsages")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public class KotlinFindUsagesInLibrarySourceTestGenerated extends AbstractKotlinFindUsagesInLibrarySourceTest {
|
public class KotlinFindUsagesWithLibraryTestGenerated extends AbstractKotlinFindUsagesWithLibraryTest {
|
||||||
public void testAllFilesPresentInLibrarySources() throws Exception {
|
public void testAllFilesPresentInLibraryUsages() throws Exception {
|
||||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/librarySources"), Pattern.compile("^(.+)\\.0\\.kt$"), true);
|
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")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class JavaLibrary extends AbstractKotlinFindUsagesInLibrarySourceTest {
|
public static class JavaLibrary extends AbstractKotlinFindUsagesWithLibraryTest {
|
||||||
public void testAllFilesPresentInJavaLibrary() throws Exception {
|
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")
|
@TestMetadata("LibraryClassUsages.0.kt")
|
||||||
public void testLibraryClassUsages() throws Exception {
|
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);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("LibraryConstructorUsages.0.kt")
|
@TestMetadata("LibraryConstructorUsages.0.kt")
|
||||||
public void testLibraryConstructorUsages() throws Exception {
|
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);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("LibraryFieldUsages.0.kt")
|
@TestMetadata("LibraryFieldUsages.0.kt")
|
||||||
public void testLibraryFieldUsages() throws Exception {
|
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);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("LibraryMethodUsages.0.kt")
|
@TestMetadata("LibraryMethodUsages.0.kt")
|
||||||
public void testLibraryMethodUsages() throws Exception {
|
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);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("LibraryStaticFieldUsages.0.kt")
|
@TestMetadata("LibraryStaticFieldUsages.0.kt")
|
||||||
public void testLibraryStaticFieldUsages() throws Exception {
|
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);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("LibraryStaticMethodUsages.0.kt")
|
@TestMetadata("LibraryStaticMethodUsages.0.kt")
|
||||||
public void testLibraryStaticMethodUsages() throws Exception {
|
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);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("idea/testData/findUsages/librarySources/kotlinLibrary")
|
@TestMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class KotlinLibrary extends AbstractKotlinFindUsagesInLibrarySourceTest {
|
public static class KotlinLibrary extends AbstractKotlinFindUsagesWithLibraryTest {
|
||||||
public void testAllFilesPresentInKotlinLibrary() throws Exception {
|
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")
|
@TestMetadata("LibraryClassUsages.0.kt")
|
||||||
public void testLibraryClassUsages() throws Exception {
|
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);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("LibraryFunctionUsages.0.kt")
|
@TestMetadata("LibraryFunctionUsages.0.kt")
|
||||||
public void testLibraryFunctionUsages() throws Exception {
|
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);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("LibraryMemberFunctionUsages.0.kt")
|
@TestMetadata("LibraryMemberFunctionUsages.0.kt")
|
||||||
public void testLibraryMemberFunctionUsages() throws Exception {
|
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);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("LibraryNestedClassMemberFunctionUsages.0.kt")
|
@TestMetadata("LibraryNestedClassMemberFunctionUsages.0.kt")
|
||||||
public void testLibraryNestedClassMemberFunctionUsages() throws Exception {
|
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);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("LibraryNestedClassPrimaryConstructorUsages.0.kt")
|
@TestMetadata("LibraryNestedClassPrimaryConstructorUsages.0.kt")
|
||||||
public void testLibraryNestedClassPrimaryConstructorUsages() throws Exception {
|
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);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("LibraryNestedClassSecondaryConstructorUsages.0.kt")
|
@TestMetadata("LibraryNestedClassSecondaryConstructorUsages.0.kt")
|
||||||
public void testLibraryNestedClassSecondaryConstructorUsages() throws Exception {
|
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);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("LibraryNestedClassUsages.0.kt")
|
@TestMetadata("LibraryNestedClassUsages.0.kt")
|
||||||
public void testLibraryNestedClassUsages() throws Exception {
|
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);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("LibraryObjectUsages.0.kt")
|
@TestMetadata("LibraryObjectUsages.0.kt")
|
||||||
public void testLibraryObjectUsages() throws Exception {
|
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);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("LibraryPrimaryConstructorUsages.0.kt")
|
@TestMetadata("LibraryPrimaryConstructorUsages.0.kt")
|
||||||
public void testLibraryPrimaryConstructorUsages() throws Exception {
|
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);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("LibrarySecondaryConstructorUsages.0.kt")
|
@TestMetadata("LibrarySecondaryConstructorUsages.0.kt")
|
||||||
public void testLibrarySecondaryConstructorUsages() throws Exception {
|
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);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user