diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractForeignAnnotationsCompiledJavaDiagnosticTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractForeignAnnotationsCompiledJavaDiagnosticTest.kt deleted file mode 100644 index c52fe7fdc7d..00000000000 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractForeignAnnotationsCompiledJavaDiagnosticTest.kt +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.checkers - -import org.jetbrains.kotlin.ObsoleteTestInfrastructure -import org.jetbrains.kotlin.test.MockLibraryUtilExt.compileJavaFilesLibraryToJar -import java.io.File -import kotlin.io.path.ExperimentalPathApi -import kotlin.io.path.createTempDirectory - -@OptIn(ObsoleteTestInfrastructure::class) -abstract class AbstractForeignAnnotationsCompiledJavaDiagnosticTest : AbstractDiagnosticsTest() { - @OptIn(ExperimentalPathApi::class) - override fun doMultiFileTest( - wholeFile: File, - files: List - ) { - val ktFiles = files.filter { !it.name.endsWith(".java") } - val javaFile = File("${wholeFile.parentFile.path}/${wholeFile.nameWithoutExtension}.java") - - assertExists(javaFile) - - val javaFilesDir = createTempDirectory().toFile().also { - File(FOREIGN_JDK8_ANNOTATIONS_SOURCES_PATH).copyRecursively(File("$it/annotations/")) - javaFile.copyTo(File("$it/${javaFile.name}")) - } - - super.doMultiFileTest( - wholeFile, - ktFiles, - compileJavaFilesLibraryToJar(javaFilesDir.path, "java-files"), - usePsiClassFilesReading = false, - excludeNonTypeUseJetbrainsAnnotations = true - ) - } -} diff --git a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt index c6bd651a40a..b09de4de2e9 100644 --- a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt +++ b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt @@ -49,17 +49,17 @@ fun generateJUnit5CompilerTests(args: Array) { testClass { model("diagnostics/foreignAnnotationsTests/tests") - model("diagnostics/foreignAnnotationsTests/java8Tests", excludeDirs = listOf("typeEnhancementOnCompiledJava")) + model("diagnostics/foreignAnnotationsTests/java8Tests") } testClass { model("diagnostics/foreignAnnotationsTests/tests") - model("diagnostics/foreignAnnotationsTests/java8Tests", excludeDirs = listOf("typeEnhancementOnCompiledJava")) + model("diagnostics/foreignAnnotationsTests/java8Tests") } testClass { model("diagnostics/foreignAnnotationsTests/tests") - model("diagnostics/foreignAnnotationsTests/java8Tests", excludeDirs = listOf("typeEnhancementOnCompiledJava")) + model("diagnostics/foreignAnnotationsTests/java8Tests") } testClass { diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignAnnotationsCompiledJavaDiagnosticTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignAnnotationsCompiledJavaDiagnosticTestGenerated.java deleted file mode 100644 index 09c68290e1c..00000000000 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignAnnotationsCompiledJavaDiagnosticTestGenerated.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.checkers; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class ForeignAnnotationsCompiledJavaDiagnosticTestGenerated extends AbstractForeignAnnotationsCompiledJavaDiagnosticTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeEnhancementOnCompiledJava() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("ClassTypeParameterBound.kt") - public void testClassTypeParameterBound() throws Exception { - runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ClassTypeParameterBound.kt"); - } - - @TestMetadata("ClassTypeParameterBoundWithWarnings.kt") - public void testClassTypeParameterBoundWithWarnings() throws Exception { - runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ClassTypeParameterBoundWithWarnings.kt"); - } - - @TestMetadata("ReturnType.kt") - public void testReturnType() throws Exception { - runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ReturnType.kt"); - } - - @TestMetadata("ReturnTypeWithWarnings.kt") - public void testReturnTypeWithWarnings() throws Exception { - runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ReturnTypeWithWarnings.kt"); - } - - @TestMetadata("ValueParameter.kt") - public void testValueParameter() throws Exception { - runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ValueParameter.kt"); - } - - @TestMetadata("ValueParameterWithWarnings.kt") - public void testValueParameterWithWarnings() throws Exception { - runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ValueParameterWithWarnings.kt"); - } -} 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 2121a4b2974..22afb83d491 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 @@ -28,10 +28,6 @@ fun main(args: Array) { generateTestGroupSuite(args) { testGroup("compiler/tests-java8/tests", "compiler/testData") { - testClass { - model("foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava") - } - testClass { model("loadJava8/compiledJava", extension = "java", testMethod = "doTestCompiledJava") model("loadJava8/sourceJava", extension = "java", testMethod = "doTestSourceJava")