From e37bfa13e398c6f121e44b7d6daa6eef2ec757e8 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Tue, 10 Oct 2017 17:10:33 +0300 Subject: [PATCH] Related to KT-20713: add test for find usages in script --- .../kotlin/generators/tests/GenerateTests.kt | 2 +- .../findUsages/kotlin/script/dummy.0.kts | 4 ++ .../kotlin/script/dummy.results.txt | 1 + .../findUsages/AbstractFindUsagesTest.kt | 2 +- .../findUsages/FindUsagesTestGenerated.java | 65 ++++++++++++------- 5 files changed, 47 insertions(+), 27 deletions(-) create mode 100644 idea/testData/findUsages/kotlin/script/dummy.0.kts create mode 100644 idea/testData/findUsages/kotlin/script/dummy.results.txt diff --git a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index 32f26e4feb5..062198d02ff 100755 --- a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -832,7 +832,7 @@ fun main(args: Array) { } testClass { - model("findUsages/kotlin", pattern = """^(.+)\.0\.kt$""") + model("findUsages/kotlin", pattern = """^(.+)\.0\.(kt|kts)$""") model("findUsages/java", pattern = """^(.+)\.0\.java$""") model("findUsages/propertyFiles", pattern = """^(.+)\.0\.properties$""") } diff --git a/idea/testData/findUsages/kotlin/script/dummy.0.kts b/idea/testData/findUsages/kotlin/script/dummy.0.kts new file mode 100644 index 00000000000..8b7a3c9abe3 --- /dev/null +++ b/idea/testData/findUsages/kotlin/script/dummy.0.kts @@ -0,0 +1,4 @@ +// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty +// OPTIONS: usages +val foo = "foo" +val bar = foo diff --git a/idea/testData/findUsages/kotlin/script/dummy.results.txt b/idea/testData/findUsages/kotlin/script/dummy.results.txt new file mode 100644 index 00000000000..3b82bfd6127 --- /dev/null +++ b/idea/testData/findUsages/kotlin/script/dummy.results.txt @@ -0,0 +1 @@ +Value read 4 val bar = foo \ No newline at end of file diff --git a/idea/tests/org/jetbrains/kotlin/findUsages/AbstractFindUsagesTest.kt b/idea/tests/org/jetbrains/kotlin/findUsages/AbstractFindUsagesTest.kt index b172d30bcdc..a8f007cca73 100644 --- a/idea/tests/org/jetbrains/kotlin/findUsages/AbstractFindUsagesTest.kt +++ b/idea/tests/org/jetbrains/kotlin/findUsages/AbstractFindUsagesTest.kt @@ -147,7 +147,7 @@ abstract class AbstractFindUsagesTest : KotlinLightCodeInsightFixtureTestCase() companion object { - val SUPPORTED_EXTENSIONS = setOf("kt", "java", "xml", "properties", "txt", "groovy") + val SUPPORTED_EXTENSIONS = setOf("kt", "kts", "java", "xml", "properties", "txt", "groovy") val USAGE_VIEW_PRESENTATION = UsageViewPresentation() diff --git a/idea/tests/org/jetbrains/kotlin/findUsages/FindUsagesTestGenerated.java b/idea/tests/org/jetbrains/kotlin/findUsages/FindUsagesTestGenerated.java index 5f91c35bac8..599be91af99 100644 --- a/idea/tests/org/jetbrains/kotlin/findUsages/FindUsagesTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/findUsages/FindUsagesTestGenerated.java @@ -35,7 +35,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class Kotlin extends AbstractFindUsagesTest { public void testAllFilesPresentInKotlin() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("idea/testData/findUsages/kotlin/companionObject") @@ -43,7 +43,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class CompanionObject extends AbstractFindUsagesTest { public void testAllFilesPresentInCompanionObject() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/companionObject"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/companionObject"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("inContainingClass.0.kt") @@ -76,7 +76,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class Conventions extends AbstractFindUsagesTest { public void testAllFilesPresentInConventions() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/conventions"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/conventions"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("compareTo.0.kt") @@ -186,7 +186,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class Components extends AbstractFindUsagesTest { public void testAllFilesPresentInComponents() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/conventions/components"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/conventions/components"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("callableReferences.0.kt") @@ -310,7 +310,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class FindClassUsages extends AbstractFindUsagesTest { public void testAllFilesPresentInFindClassUsages() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findClassUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findClassUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("classUsedInPlainText.0.kt") @@ -655,7 +655,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class FindFunctionUsages extends AbstractFindUsagesTest { public void testAllFilesPresentInFindFunctionUsages() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findFunctionUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findFunctionUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("enumFunctionUsages.0.kt") @@ -850,7 +850,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class FindJavaPropertyUsages extends AbstractFindUsagesTest { public void testAllFilesPresentInFindJavaPropertyUsages() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findJavaPropertyUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findJavaPropertyUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("javaPropertyUsagesK.0.kt") @@ -877,7 +877,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class FindObjectUsages extends AbstractFindUsagesTest { public void testAllFilesPresentInFindObjectUsages() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findObjectUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findObjectUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("javaObjectUsages.0.kt") @@ -928,7 +928,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class FindPackageUsages extends AbstractFindUsagesTest { public void testAllFilesPresentInFindPackageUsages() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findPackageUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findPackageUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("kotlinPackageUsages.0.kt") @@ -943,7 +943,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class FindParameterUsages extends AbstractFindUsagesTest { public void testAllFilesPresentInFindParameterUsages() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findParameterUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findParameterUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("kotlinAnnotationConstructorParameterUsages.0.kt") @@ -994,7 +994,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class FindPrimaryConstructorUsages extends AbstractFindUsagesTest { public void testAllFilesPresentInFindPrimaryConstructorUsages() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("annotationEntry.0.kt") @@ -1045,7 +1045,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class FindPropertyUsages extends AbstractFindUsagesTest { public void testAllFilesPresentInFindPropertyUsages() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findPropertyUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findPropertyUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("extensionPropertyUsages.0.kt") @@ -1222,7 +1222,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class FindSecondaryConstructorUsages extends AbstractFindUsagesTest { public void testAllFilesPresentInFindSecondaryConstructorUsages() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findSecondaryConstructorUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findSecondaryConstructorUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("constructorCall.0.kt") @@ -1255,7 +1255,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class FindTypeAliasUsages extends AbstractFindUsagesTest { public void testAllFilesPresentInFindTypeAliasUsages() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findTypeAliasUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findTypeAliasUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("objectAlias.0.kt") @@ -1270,7 +1270,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class FindTypeParameterUsages extends AbstractFindUsagesTest { public void testAllFilesPresentInFindTypeParameterUsages() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findTypeParameterUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findTypeParameterUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("kotlinClassTypeParameterUsages.0.kt") @@ -1297,7 +1297,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class FindWithFilteringImports extends AbstractFindUsagesTest { public void testAllFilesPresentInFindWithFilteringImports() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findWithFilteringImports"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findWithFilteringImports"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("findWithFilteringImports.0.kt") @@ -1312,7 +1312,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class FindWithStructuralGrouping extends AbstractFindUsagesTest { public void testAllFilesPresentInFindWithStructuralGrouping() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findWithStructuralGrouping"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findWithStructuralGrouping"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("kotlinClassAllUsages.0.kt") @@ -1339,7 +1339,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class Internal extends AbstractFindUsagesTest { public void testAllFilesPresentInInternal() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/internal"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/internal"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("idea/testData/findUsages/kotlin/internal/findFunctionUsages") @@ -1347,7 +1347,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class FindFunctionUsages extends AbstractFindUsagesTest { public void testAllFilesPresentInFindFunctionUsages() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/internal/findFunctionUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/internal/findFunctionUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("enumFunctionUsages.0.kt") @@ -1398,7 +1398,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class FindPrimaryConstructorUsages extends AbstractFindUsagesTest { public void testAllFilesPresentInFindPrimaryConstructorUsages() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/internal/findPrimaryConstructorUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/internal/findPrimaryConstructorUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("constructorCall.0.kt") @@ -1419,7 +1419,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class FindPropertyUsages extends AbstractFindUsagesTest { public void testAllFilesPresentInFindPropertyUsages() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/internal/findPropertyUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/internal/findPropertyUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("kotlinClassObjectPropertyUsage.0.kt") @@ -1452,7 +1452,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class FindSecondaryConstructorUsages extends AbstractFindUsagesTest { public void testAllFilesPresentInFindSecondaryConstructorUsages() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/internal/findSecondaryConstructorUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/internal/findSecondaryConstructorUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("constructorCall.0.kt") @@ -1480,7 +1480,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class PropertyFiles extends AbstractFindUsagesTest { public void testAllFilesPresentInPropertyFiles() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/propertyFiles"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/propertyFiles"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("propertyFileUsagesByRef.0.kt") @@ -1496,12 +1496,27 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { } } + @TestMetadata("idea/testData/findUsages/kotlin/script") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Script extends AbstractFindUsagesTest { + public void testAllFilesPresentInScript() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/script"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); + } + + @TestMetadata("dummy.0.kts") + public void testDummy() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/script/dummy.0.kts"); + doTest(fileName); + } + } + @TestMetadata("idea/testData/findUsages/kotlin/unresolvedAnnotation") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnresolvedAnnotation extends AbstractFindUsagesTest { public void testAllFilesPresentInUnresolvedAnnotation() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/unresolvedAnnotation"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/unresolvedAnnotation"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("unresolvedAnnotation.0.kt") @@ -1516,7 +1531,7 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @RunWith(JUnit3RunnerWithInners.class) public static class Variable extends AbstractFindUsagesTest { public void testAllFilesPresentInVariable() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/variable"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/variable"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("plusAssignFun.0.kt")