diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt b/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt index 6e08b32fb75..e093f96c947 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt @@ -58,12 +58,27 @@ fun main(args: Array) { } testClass { - model("loadJava8/compiledJava", extension = "java", testMethod = "doTestCompiledJava") - model("loadJava8/sourceJava", extension = "java", testMethod = "doTestSourceJava") + model( + "loadJava8/compiledJava", + extension = "java", + testMethod = "doTestCompiledJava", + excludeDirs = listOf("typeUseAnnotations", "typeParameterAnnotations") + ) + model( + "loadJava8/sourceJava", + extension = "java", + testMethod = "doTestSourceJava", + excludeDirs = listOf("typeUseAnnotations", "typeParameterAnnotations") + ) } testClass { - model("loadJava8/compiledJava", extension = "java", testMethod = "doTestCompiledJava") + model( + "loadJava8/compiledJava", + extension = "java", + testMethod = "doTestCompiledJava", + excludeDirs = listOf("typeUseAnnotations", "typeParameterAnnotations") + ) } testClass { diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/LoadJava8WithPsiClassReadingTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/LoadJava8WithPsiClassReadingTestGenerated.java index 4cf9cfb4590..797cf2ac7a6 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/LoadJava8WithPsiClassReadingTestGenerated.java +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/LoadJava8WithPsiClassReadingTestGenerated.java @@ -26,7 +26,7 @@ public class LoadJava8WithPsiClassReadingTestGenerated extends AbstractLoadJava8 } public void testAllFilesPresentInCompiledJava() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/compiledJava"), Pattern.compile("^(.+)\\.java$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/compiledJava"), Pattern.compile("^(.+)\\.java$"), null, true, "typeUseAnnotations", "typeParameterAnnotations"); } @TestMetadata("InnerClassTypeAnnotation.java") @@ -43,70 +43,4 @@ public class LoadJava8WithPsiClassReadingTestGenerated extends AbstractLoadJava8 public void testParameterNames() throws Exception { runTest("compiler/testData/loadJava8/compiledJava/ParameterNames.java"); } - - @TestMetadata("compiler/testData/loadJava8/compiledJava/typeParameterAnnotations") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeParameterAnnotations extends AbstractLoadJava8WithPsiClassReadingTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTestCompiledJava, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeParameterAnnotations() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/compiledJava/typeParameterAnnotations"), Pattern.compile("^(.+)\\.java$"), null, true); - } - - @TestMetadata("Basic.java") - public void testBasic() throws Exception { - runTest("compiler/testData/loadJava8/compiledJava/typeParameterAnnotations/Basic.java"); - } - } - - @TestMetadata("compiler/testData/loadJava8/compiledJava/typeUseAnnotations") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeUseAnnotations extends AbstractLoadJava8WithPsiClassReadingTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTestCompiledJava, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeUseAnnotations() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/compiledJava/typeUseAnnotations"), Pattern.compile("^(.+)\\.java$"), null, true); - } - - @TestMetadata("BaseClassTypeArguments.java") - public void testBaseClassTypeArguments() throws Exception { - runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/BaseClassTypeArguments.java"); - } - - @TestMetadata("Basic.java") - public void testBasic() throws Exception { - runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/Basic.java"); - } - - @TestMetadata("ClassTypeParameterBounds.java") - public void testClassTypeParameterBounds() throws Exception { - runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/ClassTypeParameterBounds.java"); - } - - @TestMetadata("MethodReceiver.java") - public void testMethodReceiver() throws Exception { - runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/MethodReceiver.java"); - } - - @TestMetadata("MethodTypeParameterBounds.java") - public void testMethodTypeParameterBounds() throws Exception { - runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/MethodTypeParameterBounds.java"); - } - - @TestMetadata("ReturnType.java") - public void testReturnType() throws Exception { - runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/ReturnType.java"); - } - - @TestMetadata("ValueArguments.java") - public void testValueArguments() throws Exception { - runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/ValueArguments.java"); - } - } } diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/javac/LoadJava8UsingJavacTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/javac/LoadJava8UsingJavacTestGenerated.java index 6f3908dc8dc..e5a3d16e228 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/javac/LoadJava8UsingJavacTestGenerated.java +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/javac/LoadJava8UsingJavacTestGenerated.java @@ -28,7 +28,7 @@ public class LoadJava8UsingJavacTestGenerated extends AbstractLoadJava8UsingJava } public void testAllFilesPresentInCompiledJava() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/compiledJava"), Pattern.compile("^(.+)\\.java$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/compiledJava"), Pattern.compile("^(.+)\\.java$"), null, true, "typeUseAnnotations", "typeParameterAnnotations"); } @TestMetadata("InnerClassTypeAnnotation.java") @@ -45,72 +45,6 @@ public class LoadJava8UsingJavacTestGenerated extends AbstractLoadJava8UsingJava public void testParameterNames() throws Exception { runTest("compiler/testData/loadJava8/compiledJava/ParameterNames.java"); } - - @TestMetadata("compiler/testData/loadJava8/compiledJava/typeParameterAnnotations") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeParameterAnnotations extends AbstractLoadJava8UsingJavacTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTestCompiledJava, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeParameterAnnotations() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/compiledJava/typeParameterAnnotations"), Pattern.compile("^(.+)\\.java$"), null, true); - } - - @TestMetadata("Basic.java") - public void testBasic() throws Exception { - runTest("compiler/testData/loadJava8/compiledJava/typeParameterAnnotations/Basic.java"); - } - } - - @TestMetadata("compiler/testData/loadJava8/compiledJava/typeUseAnnotations") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeUseAnnotations extends AbstractLoadJava8UsingJavacTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTestCompiledJava, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeUseAnnotations() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/compiledJava/typeUseAnnotations"), Pattern.compile("^(.+)\\.java$"), null, true); - } - - @TestMetadata("BaseClassTypeArguments.java") - public void testBaseClassTypeArguments() throws Exception { - runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/BaseClassTypeArguments.java"); - } - - @TestMetadata("Basic.java") - public void testBasic() throws Exception { - runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/Basic.java"); - } - - @TestMetadata("ClassTypeParameterBounds.java") - public void testClassTypeParameterBounds() throws Exception { - runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/ClassTypeParameterBounds.java"); - } - - @TestMetadata("MethodReceiver.java") - public void testMethodReceiver() throws Exception { - runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/MethodReceiver.java"); - } - - @TestMetadata("MethodTypeParameterBounds.java") - public void testMethodTypeParameterBounds() throws Exception { - runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/MethodTypeParameterBounds.java"); - } - - @TestMetadata("ReturnType.java") - public void testReturnType() throws Exception { - runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/ReturnType.java"); - } - - @TestMetadata("ValueArguments.java") - public void testValueArguments() throws Exception { - runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/ValueArguments.java"); - } - } } @TestMetadata("compiler/testData/loadJava8/sourceJava") @@ -122,7 +56,7 @@ public class LoadJava8UsingJavacTestGenerated extends AbstractLoadJava8UsingJava } public void testAllFilesPresentInSourceJava() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/sourceJava"), Pattern.compile("^(.+)\\.java$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/sourceJava"), Pattern.compile("^(.+)\\.java$"), null, true, "typeUseAnnotations", "typeParameterAnnotations"); } @TestMetadata("MapRemove.java") @@ -134,71 +68,5 @@ public class LoadJava8UsingJavacTestGenerated extends AbstractLoadJava8UsingJava public void testTypeParameterAnnotations() throws Exception { runTest("compiler/testData/loadJava8/sourceJava/TypeParameterAnnotations.java"); } - - @TestMetadata("compiler/testData/loadJava8/sourceJava/typeParameterAnnotations") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeParameterAnnotations extends AbstractLoadJava8UsingJavacTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTestSourceJava, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeParameterAnnotations() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/sourceJava/typeParameterAnnotations"), Pattern.compile("^(.+)\\.java$"), null, true); - } - - @TestMetadata("Basic.java") - public void testBasic() throws Exception { - runTest("compiler/testData/loadJava8/sourceJava/typeParameterAnnotations/Basic.java"); - } - } - - @TestMetadata("compiler/testData/loadJava8/sourceJava/typeUseAnnotations") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeUseAnnotations extends AbstractLoadJava8UsingJavacTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTestSourceJava, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeUseAnnotations() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/sourceJava/typeUseAnnotations"), Pattern.compile("^(.+)\\.java$"), null, true); - } - - @TestMetadata("BaseClassTypeArguments.java") - public void testBaseClassTypeArguments() throws Exception { - runTest("compiler/testData/loadJava8/sourceJava/typeUseAnnotations/BaseClassTypeArguments.java"); - } - - @TestMetadata("Basic.java") - public void testBasic() throws Exception { - runTest("compiler/testData/loadJava8/sourceJava/typeUseAnnotations/Basic.java"); - } - - @TestMetadata("ClassTypeParameterBounds.java") - public void testClassTypeParameterBounds() throws Exception { - runTest("compiler/testData/loadJava8/sourceJava/typeUseAnnotations/ClassTypeParameterBounds.java"); - } - - @TestMetadata("MethodReceiver.java") - public void testMethodReceiver() throws Exception { - runTest("compiler/testData/loadJava8/sourceJava/typeUseAnnotations/MethodReceiver.java"); - } - - @TestMetadata("MethodTypeParameterBounds.java") - public void testMethodTypeParameterBounds() throws Exception { - runTest("compiler/testData/loadJava8/sourceJava/typeUseAnnotations/MethodTypeParameterBounds.java"); - } - - @TestMetadata("ReturnType.java") - public void testReturnType() throws Exception { - runTest("compiler/testData/loadJava8/sourceJava/typeUseAnnotations/ReturnType.java"); - } - - @TestMetadata("ValueArguments.java") - public void testValueArguments() throws Exception { - runTest("compiler/testData/loadJava8/sourceJava/typeUseAnnotations/ValueArguments.java"); - } - } } }