diff --git a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index 5a01dfcd183..56bad33bfc8 100644 --- a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -24,7 +24,6 @@ import org.jetbrains.kotlin.fir.plugin.runners.AbstractFirLoadK2CompiledWithPlug import org.jetbrains.kotlin.fir.plugin.runners.AbstractFirPsiPluginDiagnosticTest import org.jetbrains.kotlin.generators.generateTestGroupSuiteWithJUnit5 import org.jetbrains.kotlin.generators.impl.generateTestGroupSuite -import org.jetbrains.kotlin.generators.model.annotation import org.jetbrains.kotlin.generators.tests.IncrementalTestsGeneratorUtil.Companion.IcTestTypes.PURE_KOTLIN import org.jetbrains.kotlin.generators.tests.IncrementalTestsGeneratorUtil.Companion.IcTestTypes.WITH_JAVA import org.jetbrains.kotlin.generators.tests.IncrementalTestsGeneratorUtil.Companion.incrementalJvmTestData @@ -36,10 +35,8 @@ import org.jetbrains.kotlin.jvm.abi.AbstractJvmAbiContentTest import org.jetbrains.kotlin.kapt.cli.test.AbstractArgumentParsingTest import org.jetbrains.kotlin.kapt.cli.test.AbstractKapt4ToolIntegrationTest import org.jetbrains.kotlin.kapt.cli.test.AbstractKaptToolIntegrationTest -import org.jetbrains.kotlin.kapt3.test.runners.AbstractClassFileToSourceStubConverterTest import org.jetbrains.kotlin.kapt3.test.runners.AbstractIrClassFileToSourceStubConverterTest import org.jetbrains.kotlin.kapt3.test.runners.AbstractIrKotlinKaptContextTest -import org.jetbrains.kotlin.kapt3.test.runners.AbstractKotlinKaptContextTest import org.jetbrains.kotlin.kapt4.AbstractKotlinKapt4ContextTest import org.jetbrains.kotlin.lombok.* import org.jetbrains.kotlin.noarg.* @@ -48,7 +45,6 @@ import org.jetbrains.kotlin.samWithReceiver.* import org.jetbrains.kotlin.test.TargetBackend import org.jetbrains.kotlinx.atomicfu.AbstractAtomicfuJsIrTest import org.jetbrains.kotlinx.atomicfu.AbstractAtomicfuJvmIrTest -import org.junit.jupiter.api.Tag private class ExcludePattern { @@ -387,19 +383,10 @@ fun main(args: Array) { } testGroup("plugins/kapt3/kapt3-compiler/tests-gen", "plugins/kapt3/kapt3-compiler/testData") { - val annotations = listOf(annotation(Tag::class.java, "IgnoreJDK11")) - testClass(annotations = annotations) { - model("kotlinRunner") - } - testClass { model("kotlinRunner") } - testClass { - model("converter") - } - testClass { model("converter") } diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/Kapt3IT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/Kapt3IT.kt index e845fc9425b..72777e555d8 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/Kapt3IT.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/Kapt3IT.kt @@ -140,10 +140,6 @@ open class Kapt3ClassLoadersCacheIT : Kapt3IT() { override fun testRepeatableAnnotations(gradleVersion: GradleVersion) { } - @Disabled("classloaders cache is leaking file descriptors that prevents cleaning test project") - override fun testRepeatableAnnotationsWithOldJvmBackend(gradleVersion: GradleVersion) { - } - @Disabled("classloaders cache is leaking file descriptors that prevents cleaning test project") override fun useGeneratedKotlinSource(gradleVersion: GradleVersion) { } @@ -1206,17 +1202,6 @@ open class Kapt3IT : Kapt3BaseIT() { } } - @DisplayName("KT-53135: check that JVM IR backend is disabled if kapt.use.jvm.ir=false is specified in gradle.properties") - @GradleTest - open fun testRepeatableAnnotationsWithOldJvmBackend(gradleVersion: GradleVersion) { - project("repeatableAnnotationsWithOldJvmBackend".withPrefix, gradleVersion) { - build("build") { - assertKaptSuccessful() - assertTasksExecuted(":kaptGenerateStubsKotlin", ":kaptKotlin", ":compileKotlin") - } - } - } - @DisplayName("KT-55452: KaptGenerateStubs task compiler options are not duplicated") @GradleTest fun testKaptGenerateStubsCompilerOptionsDup(gradleVersion: GradleVersion) { diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/Kapt4IT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/Kapt4IT.kt index 60157c5df94..3b72c1d31ae 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/Kapt4IT.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/Kapt4IT.kt @@ -33,9 +33,6 @@ class Kapt4IT : Kapt3IT() { @Disabled("Doesn't make sense in Kapt 4") override fun useK2KaptProperty(gradleVersion: GradleVersion) {} - @Disabled("Doesn't make sense in Kapt 4") - override fun testRepeatableAnnotationsWithOldJvmBackend(gradleVersion: GradleVersion) {} - @DisplayName("KT-61879: K2 KAPT works with proguarded compiler jars and enum class") @GradleTest fun testEnumClass(gradleVersion: GradleVersion) { @@ -69,9 +66,6 @@ class Kapt4ClassLoadersCacheIT : Kapt3ClassLoadersCacheIT() { @Disabled("Doesn't make sense in Kapt 4") override fun fallBackModeWithLanguageVersion2_0(gradleVersion: GradleVersion) {} - @Disabled("Doesn't make sense in Kapt 4") - override fun testRepeatableAnnotationsWithOldJvmBackend(gradleVersion: GradleVersion) {} - @Disabled("Doesn't work in 2.0. Neither with Kapt 3 nor with Kapt 4") override fun testMPPKaptPresence(gradleVersion: GradleVersion) {} diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/build.gradle b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/build.gradle deleted file mode 100644 index 68578bf5197..00000000000 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/build.gradle +++ /dev/null @@ -1,17 +0,0 @@ -plugins { - id "java" - id "org.jetbrains.kotlin.jvm" - id "org.jetbrains.kotlin.kapt" -} - -repositories { - mavenLocal() - mavenCentral() -} - -dependencies { - implementation(project(":processor")) - kapt(project(":processor")) -} - -compileKotlin.kotlinOptions.allWarningsAsErrors = true diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/gradle.properties b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/gradle.properties deleted file mode 100644 index b2e4e770b66..00000000000 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -kapt.use.jvm.ir=false diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/processor/build.gradle b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/processor/build.gradle deleted file mode 100644 index 404605016e6..00000000000 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/processor/build.gradle +++ /dev/null @@ -1,11 +0,0 @@ -plugins { - id "java" - id "org.jetbrains.kotlin.jvm" -} - -repositories { - mavenLocal() - mavenCentral() -} - -compileKotlin.kotlinOptions.allWarningsAsErrors = true diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/processor/src/main/java/CheckAnnotationIsNotRepeated.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/processor/src/main/java/CheckAnnotationIsNotRepeated.kt deleted file mode 100644 index 1c00a1d0ff0..00000000000 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/processor/src/main/java/CheckAnnotationIsNotRepeated.kt +++ /dev/null @@ -1,34 +0,0 @@ -package processor - -import javax.annotation.processing.AbstractProcessor -import javax.annotation.processing.RoundEnvironment -import javax.lang.model.SourceVersion -import javax.lang.model.element.TypeElement -import javax.tools.Diagnostic - -class CheckAnnotationIsNotRepeated : AbstractProcessor() { - override fun process(annotations: MutableSet?, roundEnv: RoundEnvironment): Boolean { - val element = processingEnv.elementUtils.getTypeElement("example.TestClass") - val containerAnnotation = element.annotationMirrors.singleOrNull { - it.annotationType.asElement().simpleName.contentEquals("Container") && - it.annotationType.asElement().enclosingElement.simpleName.contentEquals("Anno") - } - if (containerAnnotation != null) { - processingEnv.messager.printMessage( - Diagnostic.Kind.ERROR, - "Repeatable container annotation class example.Anno.Container is found. " + - "The problem is likely in the fact that JVM IR is NOT DISABLED for kapt stub generation " + - "even though kapt.use.jvm.ir=false is specified in gradle.properties.", - element, - ) - } - - return true - } - - override fun getSupportedSourceVersion(): SourceVersion = - SourceVersion.RELEASE_6 - - override fun getSupportedAnnotationTypes(): Set = - setOf("example.ToBeChecked") -} diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor deleted file mode 100644 index ae5c944f295..00000000000 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor +++ /dev/null @@ -1 +0,0 @@ -processor.CheckAnnotationIsNotRepeated diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/settings.gradle b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/settings.gradle deleted file mode 100644 index 8adb821eab3..00000000000 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include "processor" diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/src/main/java/test.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/src/main/java/test.kt deleted file mode 100644 index d86d2a1b1ac..00000000000 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2/repeatableAnnotationsWithOldJvmBackend/src/main/java/test.kt +++ /dev/null @@ -1,11 +0,0 @@ -package example - -annotation class ToBeChecked - -@Repeatable -annotation class Anno(val value: String) - -@ToBeChecked -@Anno("1") -@Anno("2") -public class TestClass diff --git a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/KaptTestDirectives.kt b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/KaptTestDirectives.kt index dcdbc942e5b..b4391920fa3 100644 --- a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/KaptTestDirectives.kt +++ b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/KaptTestDirectives.kt @@ -21,7 +21,6 @@ object KaptTestDirectives : SimpleDirectivesContainer() { val INCREMENTAL_APT by directive("Enables INCREMENTAL_APT flag") val STRIP_METADATA by directive("Enables STRIP_METADATA flag") val KEEP_KDOC_COMMENTS_IN_STUBS by directive("Enables KEEP_KDOC_COMMENTS_IN_STUBS flag") - val USE_JVM_IR by directive("Enables USE_JVM_IR flag") val DISABLED_FLAGS by enumDirective("Disables listed flags") @@ -32,6 +31,6 @@ object KaptTestDirectives : SimpleDirectivesContainer() { val flagDirectives = listOf( SHOW_PROCESSOR_STATS, VERBOSE, INFO_AS_WARNINGS, USE_LIGHT_ANALYSIS, CORRECT_ERROR_TYPES, DUMP_DEFAULT_PARAMETER_VALUES, MAP_DIAGNOSTIC_LOCATIONS, STRICT, INCLUDE_COMPILE_CLASSPATH, - INCREMENTAL_APT, STRIP_METADATA, KEEP_KDOC_COMMENTS_IN_STUBS, USE_JVM_IR + INCREMENTAL_APT, STRIP_METADATA, KEEP_KDOC_COMMENTS_IN_STUBS, ) } diff --git a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/integration/AbstractKotlinKapt3IntegrationTestRunner.kt b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/integration/AbstractKotlinKapt3IntegrationTestRunner.kt index f0f22cfe194..27fbbc5adbc 100644 --- a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/integration/AbstractKotlinKapt3IntegrationTestRunner.kt +++ b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/integration/AbstractKotlinKapt3IntegrationTestRunner.kt @@ -6,7 +6,6 @@ package org.jetbrains.kotlin.kapt3.test.integration import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension -import org.jetbrains.kotlin.kapt3.base.KaptFlag import org.jetbrains.kotlin.kapt3.base.util.doOpenInternalPackagesIfRequired import org.jetbrains.kotlin.kapt3.test.JvmCompilerWithKaptFacade import org.jetbrains.kotlin.kapt3.test.KaptContextBinaryArtifact @@ -26,12 +25,11 @@ import javax.annotation.processing.RoundEnvironment import javax.lang.model.element.TypeElement class AbstractKotlinKapt3IntegrationTestRunner( - targetBackend: TargetBackend, private val processorOptions: Map, private val supportedAnnotations: List, private val additionalPluginExtension: IrGenerationExtension?, private val process: (Set, RoundEnvironment, ProcessingEnvironment, Kapt3ExtensionForTests) -> Unit -) : AbstractKotlinCompilerWithTargetBackendTest(targetBackend) { +) : AbstractKotlinCompilerWithTargetBackendTest(TargetBackend.JVM_IR) { init { doOpenInternalPackagesIfRequired() @@ -46,9 +44,6 @@ class AbstractKotlinKapt3IntegrationTestRunner( defaultDirectives { +KaptTestDirectives.MAP_DIAGNOSTIC_LOCATIONS - if (!targetBackend.isIR) { - KaptTestDirectives.DISABLED_FLAGS with KaptFlag.USE_JVM_IR - } } useConfigurators( diff --git a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/integration/AbstractKotlinKapt3IntegrationTestBase.kt b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/integration/IrKotlinKapt3IntegrationTest.kt similarity index 96% rename from plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/integration/AbstractKotlinKapt3IntegrationTestBase.kt rename to plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/integration/IrKotlinKapt3IntegrationTest.kt index 60abcccc440..ebd0be8851e 100644 --- a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/integration/AbstractKotlinKapt3IntegrationTestBase.kt +++ b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/integration/IrKotlinKapt3IntegrationTest.kt @@ -12,9 +12,8 @@ import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity import org.jetbrains.kotlin.ir.declarations.IrModuleFragment import org.jetbrains.kotlin.kapt3.javac.KaptJavaFileObject import org.jetbrains.kotlin.test.services.JUnit5Assertions.assertEquals -import org.jetbrains.kotlin.test.services.JUnit5Assertions.assertTrue -import org.jetbrains.kotlin.test.TargetBackend import org.jetbrains.kotlin.test.services.JUnit5Assertions.assertNotNull +import org.jetbrains.kotlin.test.services.JUnit5Assertions.assertTrue import org.junit.jupiter.api.Test import org.junit.jupiter.api.TestInfo import org.junit.jupiter.api.fail @@ -28,11 +27,7 @@ import javax.lang.model.element.VariableElement import javax.lang.model.util.ElementFilter import javax.tools.Diagnostic -class KotlinKapt3IntegrationTest(testInfo: TestInfo) : AbstractKotlinKapt3IntegrationTestBase(testInfo, TargetBackend.JVM) - -class IrKotlinKapt3IntegrationTest(testInfo: TestInfo) : AbstractKotlinKapt3IntegrationTestBase(testInfo, TargetBackend.JVM_IR) - -abstract class AbstractKotlinKapt3IntegrationTestBase(private val testInfo: TestInfo, private val targetBackend: TargetBackend) { +class IrKotlinKapt3IntegrationTest(private val testInfo: TestInfo) { private companion object { val TEST_DATA_DIR = File("plugins/kapt3/kapt3-compiler/testData/kotlinRunner") } @@ -47,7 +42,6 @@ abstract class AbstractKotlinKapt3IntegrationTestBase(private val testInfo: Test ) { val file = File(TEST_DATA_DIR, "$name.kt") AbstractKotlinKapt3IntegrationTestRunner( - targetBackend, options, supportedAnnotations.toList(), additionalPluginExtension, diff --git a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/runners/AbstractClassFileToSourceStubConverterTest.kt b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/runners/AbstractIrClassFileToSourceStubConverterTest.kt similarity index 71% rename from plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/runners/AbstractClassFileToSourceStubConverterTest.kt rename to plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/runners/AbstractIrClassFileToSourceStubConverterTest.kt index ad4f4c6c8db..08947ed3ff2 100644 --- a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/runners/AbstractClassFileToSourceStubConverterTest.kt +++ b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/runners/AbstractIrClassFileToSourceStubConverterTest.kt @@ -11,7 +11,6 @@ import org.jetbrains.kotlin.kapt3.test.KaptContextBinaryArtifact import org.jetbrains.kotlin.kapt3.test.KaptEnvironmentConfigurator import org.jetbrains.kotlin.kapt3.test.KaptRegularExtensionForTestConfigurator import org.jetbrains.kotlin.kapt3.test.KaptTestDirectives.MAP_DIAGNOSTIC_LOCATIONS -import org.jetbrains.kotlin.kapt3.test.KaptTestDirectives.USE_JVM_IR import org.jetbrains.kotlin.kapt3.test.handlers.ClassFileToSourceKaptStubHandler import org.jetbrains.kotlin.platform.jvm.JvmPlatforms import org.jetbrains.kotlin.test.TargetBackend @@ -24,9 +23,7 @@ import org.jetbrains.kotlin.test.runners.AbstractKotlinCompilerWithTargetBackend import org.jetbrains.kotlin.test.services.configuration.CommonEnvironmentConfigurator import org.jetbrains.kotlin.test.services.configuration.JvmEnvironmentConfigurator -abstract class AbstractClassFileToSourceStubConverterTestBase( - targetBackend: TargetBackend -) : AbstractKotlinCompilerWithTargetBackendTest(targetBackend) { +open class AbstractIrClassFileToSourceStubConverterTest : AbstractKotlinCompilerWithTargetBackendTest(TargetBackend.JVM_IR) { init { doOpenInternalPackagesIfRequired() } @@ -58,28 +55,3 @@ abstract class AbstractClassFileToSourceStubConverterTestBase( useAfterAnalysisCheckers(::BlackBoxCodegenSuppressor) } } - -open class AbstractClassFileToSourceStubConverterTest : AbstractClassFileToSourceStubConverterTestBase(TargetBackend.JVM) { - override fun configure(builder: TestConfigurationBuilder) { - super.configure(builder) - builder.apply { - globalDefaults { - targetBackend = TargetBackend.JVM - } - } - } -} - -open class AbstractIrClassFileToSourceStubConverterTest : AbstractClassFileToSourceStubConverterTestBase(TargetBackend.JVM_IR) { - override fun configure(builder: TestConfigurationBuilder) { - super.configure(builder) - builder.apply { - globalDefaults { - targetBackend = TargetBackend.JVM_IR - } - defaultDirectives { - +USE_JVM_IR - } - } - } -} diff --git a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/runners/AbstractKotlinKaptContextTest.kt b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/runners/AbstractKotlinKaptContextTest.kt index 1eba7fea1ca..69ff4685bf9 100644 --- a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/runners/AbstractKotlinKaptContextTest.kt +++ b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/runners/AbstractKotlinKaptContextTest.kt @@ -6,7 +6,10 @@ package org.jetbrains.kotlin.kapt3.test.runners import org.jetbrains.kotlin.kapt3.base.util.doOpenInternalPackagesIfRequired -import org.jetbrains.kotlin.kapt3.test.* +import org.jetbrains.kotlin.kapt3.test.JvmCompilerWithKaptFacade +import org.jetbrains.kotlin.kapt3.test.KaptContextBinaryArtifact +import org.jetbrains.kotlin.kapt3.test.KaptEnvironmentConfigurator +import org.jetbrains.kotlin.kapt3.test.KaptRegularExtensionForTestConfigurator import org.jetbrains.kotlin.kapt3.test.KaptTestDirectives.MAP_DIAGNOSTIC_LOCATIONS import org.jetbrains.kotlin.kapt3.test.handlers.KaptContextHandler import org.jetbrains.kotlin.platform.jvm.JvmPlatforms @@ -18,9 +21,7 @@ import org.jetbrains.kotlin.test.runners.AbstractKotlinCompilerWithTargetBackend import org.jetbrains.kotlin.test.services.configuration.CommonEnvironmentConfigurator import org.jetbrains.kotlin.test.services.configuration.JvmEnvironmentConfigurator -abstract class AbstractKotlinKaptContextTestBase( - targetBackend: TargetBackend -) : AbstractKotlinCompilerWithTargetBackendTest(targetBackend) { +open class AbstractIrKotlinKaptContextTest : AbstractKotlinCompilerWithTargetBackendTest(TargetBackend.JVM_IR) { init { doOpenInternalPackagesIfRequired() } @@ -49,28 +50,3 @@ abstract class AbstractKotlinKaptContextTestBase( } } } - -open class AbstractKotlinKaptContextTest : AbstractKotlinKaptContextTestBase(TargetBackend.JVM) { - override fun configure(builder: TestConfigurationBuilder) { - super.configure(builder) - builder.apply { - globalDefaults { - targetBackend = TargetBackend.JVM - } - } - } -} - -open class AbstractIrKotlinKaptContextTest : AbstractKotlinKaptContextTestBase(TargetBackend.JVM_IR) { - override fun configure(builder: TestConfigurationBuilder) { - super.configure(builder) - builder.apply { - globalDefaults { - targetBackend = TargetBackend.JVM_IR - } - defaultDirectives { - +KaptTestDirectives.USE_JVM_IR - } - } - } -} diff --git a/plugins/kapt3/kapt3-compiler/tests-gen/org/jetbrains/kotlin/kapt3/test/runners/ClassFileToSourceStubConverterTestGenerated.java b/plugins/kapt3/kapt3-compiler/tests-gen/org/jetbrains/kotlin/kapt3/test/runners/ClassFileToSourceStubConverterTestGenerated.java deleted file mode 100644 index c80309e8a67..00000000000 --- a/plugins/kapt3/kapt3-compiler/tests-gen/org/jetbrains/kotlin/kapt3/test/runners/ClassFileToSourceStubConverterTestGenerated.java +++ /dev/null @@ -1,729 +0,0 @@ -/* - * Copyright 2010-2023 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.kapt3.test.runners; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TargetBackend; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.jupiter.api.Nested; -import org.junit.jupiter.api.Test; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.GenerateTestsKt}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("plugins/kapt3/kapt3-compiler/testData/converter") -@TestDataPath("$PROJECT_ROOT") -public class ClassFileToSourceStubConverterTestGenerated extends AbstractClassFileToSourceStubConverterTest { - @Test - @TestMetadata("abstractEnum.kt") - public void testAbstractEnum() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/abstractEnum.kt"); - } - - @Test - @TestMetadata("abstractMethods.kt") - public void testAbstractMethods() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/abstractMethods.kt"); - } - - @Test - @TestMetadata("aliasedImports.kt") - public void testAliasedImports() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/aliasedImports.kt"); - } - - @Test - public void testAllFilesPresentInConverter() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/kapt3/kapt3-compiler/testData/converter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); - } - - @Test - @TestMetadata("annotationInAnnotationParameters.kt") - public void testAnnotationInAnnotationParameters() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/annotationInAnnotationParameters.kt"); - } - - @Test - @TestMetadata("annotationWithFqNames.kt") - public void testAnnotationWithFqNames() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/annotationWithFqNames.kt"); - } - - @Test - @TestMetadata("annotationWithVaragArguments.kt") - public void testAnnotationWithVaragArguments() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/annotationWithVaragArguments.kt"); - } - - @Test - @TestMetadata("annotations.kt") - public void testAnnotations() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/annotations.kt"); - } - - @Test - @TestMetadata("annotations2.kt") - public void testAnnotations2() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/annotations2.kt"); - } - - @Test - @TestMetadata("annotations3.kt") - public void testAnnotations3() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/annotations3.kt"); - } - - @Test - @TestMetadata("annotationsWithConstants.kt") - public void testAnnotationsWithConstants() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/annotationsWithConstants.kt"); - } - - @Test - @TestMetadata("annotationsWithTargets.kt") - public void testAnnotationsWithTargets() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/annotationsWithTargets.kt"); - } - - @Test - @TestMetadata("anonymousDelegate.kt") - public void testAnonymousDelegate() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/anonymousDelegate.kt"); - } - - @Test - @TestMetadata("anonymousInitializer.kt") - public void testAnonymousInitializer() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/anonymousInitializer.kt"); - } - - @Test - @TestMetadata("anonymousObjectInEnumSuperConstructor.kt") - public void testAnonymousObjectInEnumSuperConstructor() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/anonymousObjectInEnumSuperConstructor.kt"); - } - - @Test - @TestMetadata("comments.kt") - public void testComments() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/comments.kt"); - } - - @Test - @TestMetadata("commentsRemoved.kt") - public void testCommentsRemoved() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/commentsRemoved.kt"); - } - - @Test - @TestMetadata("cyrillicClassName.kt") - public void testCyrillicClassName() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/cyrillicClassName.kt"); - } - - @Test - @TestMetadata("dataClass.kt") - public void testDataClass() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/dataClass.kt"); - } - - @Test - @TestMetadata("defaultImpls.kt") - public void testDefaultImpls() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/defaultImpls.kt"); - } - - @Test - @TestMetadata("defaultImplsWithTypeParameters.kt") - public void testDefaultImplsWithTypeParameters() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/defaultImplsWithTypeParameters.kt"); - } - - @Test - @TestMetadata("defaultPackage.kt") - public void testDefaultPackage() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/defaultPackage.kt"); - } - - @Test - @TestMetadata("defaultPackageCorrectErrorTypes.kt") - public void testDefaultPackageCorrectErrorTypes() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/defaultPackageCorrectErrorTypes.kt"); - } - - @Test - @TestMetadata("defaultParameterValueOff.kt") - public void testDefaultParameterValueOff() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/defaultParameterValueOff.kt"); - } - - @Test - @TestMetadata("defaultParameterValueOn.kt") - public void testDefaultParameterValueOn() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/defaultParameterValueOn.kt"); - } - - @Test - @TestMetadata("delegateCorrectErrorTypes.kt") - public void testDelegateCorrectErrorTypes() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/delegateCorrectErrorTypes.kt"); - } - - @Test - @TestMetadata("delegateToList.kt") - public void testDelegateToList() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/delegateToList.kt"); - } - - @Test - @TestMetadata("delegatedProperties.kt") - public void testDelegatedProperties() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/delegatedProperties.kt"); - } - - @Test - @TestMetadata("delegationAndCompanionObject.kt") - public void testDelegationAndCompanionObject() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/delegationAndCompanionObject.kt"); - } - - @Test - @TestMetadata("delegationToAnonymousObject.kt") - public void testDelegationToAnonymousObject() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/delegationToAnonymousObject.kt"); - } - - @Test - @TestMetadata("deprecated.kt") - public void testDeprecated() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/deprecated.kt"); - } - - @Test - @TestMetadata("enumConstructorCallWithErrorType.kt") - public void testEnumConstructorCallWithErrorType() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/enumConstructorCallWithErrorType.kt"); - } - - @Test - @TestMetadata("enumImports.kt") - public void testEnumImports() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/enumImports.kt"); - } - - @Test - @TestMetadata("enumInCompanion.kt") - public void testEnumInCompanion() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/enumInCompanion.kt"); - } - - @Test - @TestMetadata("enumSecondaryConstructor.kt") - public void testEnumSecondaryConstructor() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/enumSecondaryConstructor.kt"); - } - - @Test - @TestMetadata("enums.kt") - public void testEnums() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/enums.kt"); - } - - @Test - @TestMetadata("errorExtensionReceiver.kt") - public void testErrorExtensionReceiver() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/errorExtensionReceiver.kt"); - } - - @Test - @TestMetadata("errorLocationMapping.kt") - public void testErrorLocationMapping() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/errorLocationMapping.kt"); - } - - @Test - @TestMetadata("errorSuperclass.kt") - public void testErrorSuperclass() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/errorSuperclass.kt"); - } - - @Test - @TestMetadata("errorSuperclassCorrectErrorTypes.kt") - public void testErrorSuperclassCorrectErrorTypes() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/errorSuperclassCorrectErrorTypes.kt"); - } - - @Test - @TestMetadata("fileFacadeJvmName.kt") - public void testFileFacadeJvmName() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/fileFacadeJvmName.kt"); - } - - @Test - @TestMetadata("functions.kt") - public void testFunctions() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/functions.kt"); - } - - @Test - @TestMetadata("genericParameters.kt") - public void testGenericParameters() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/genericParameters.kt"); - } - - @Test - @TestMetadata("genericRawSignatures.kt") - public void testGenericRawSignatures() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/genericRawSignatures.kt"); - } - - @Test - @TestMetadata("genericSimple.kt") - public void testGenericSimple() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/genericSimple.kt"); - } - - @Test - @TestMetadata("ignoredMembers.kt") - public void testIgnoredMembers() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/ignoredMembers.kt"); - } - - @Test - @TestMetadata("implicitReturnTypes.kt") - public void testImplicitReturnTypes() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/implicitReturnTypes.kt"); - } - - @Test - @TestMetadata("importsForErrorTypes.kt") - public void testImportsForErrorTypes() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/importsForErrorTypes.kt"); - } - - @Test - @TestMetadata("importsKt22083.kt") - public void testImportsKt22083() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/importsKt22083.kt"); - } - - @Test - @TestMetadata("importsWithUnresolvedAnnotations.kt") - public void testImportsWithUnresolvedAnnotations() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/importsWithUnresolvedAnnotations.kt"); - } - - @Test - @TestMetadata("incorrectDelegate.kt") - public void testIncorrectDelegate() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/incorrectDelegate.kt"); - } - - @Test - @TestMetadata("inheritanceSimple.kt") - public void testInheritanceSimple() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/inheritanceSimple.kt"); - } - - @Test - @TestMetadata("inlineClasses.kt") - public void testInlineClasses() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/inlineClasses.kt"); - } - - @Test - @TestMetadata("innerClassesWithTypeParameters.kt") - public void testInnerClassesWithTypeParameters() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/innerClassesWithTypeParameters.kt"); - } - - @Test - @TestMetadata("interfaceImplementation.kt") - public void testInterfaceImplementation() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/interfaceImplementation.kt"); - } - - @Test - @TestMetadata("invalidFieldName.kt") - public void testInvalidFieldName() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/invalidFieldName.kt"); - } - - @Test - @TestMetadata("javaKeywords.kt") - public void testJavaKeywords() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/javaKeywords.kt"); - } - - @Test - @TestMetadata("javaKeywordsInPackageNames.kt") - public void testJavaKeywordsInPackageNames() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/javaKeywordsInPackageNames.kt"); - } - - @Test - @TestMetadata("javadoc.kt") - public void testJavadoc() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/javadoc.kt"); - } - - @Test - @TestMetadata("jvmDefaultAll.kt") - public void testJvmDefaultAll() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultAll.kt"); - } - - @Test - @TestMetadata("jvmDefaultAllCompatibility.kt") - public void testJvmDefaultAllCompatibility() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultAllCompatibility.kt"); - } - - @Test - @TestMetadata("jvmOverloads.kt") - public void testJvmOverloads() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/jvmOverloads.kt"); - } - - @Test - @TestMetadata("jvmRepeatableAnnotation.kt") - public void testJvmRepeatableAnnotation() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/jvmRepeatableAnnotation.kt"); - } - - @Test - @TestMetadata("jvmStatic.kt") - public void testJvmStatic() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/jvmStatic.kt"); - } - - @Test - @TestMetadata("jvmStaticFieldInParent.kt") - public void testJvmStaticFieldInParent() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/jvmStaticFieldInParent.kt"); - } - - @Test - @TestMetadata("kt14996.kt") - public void testKt14996() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt14996.kt"); - } - - @Test - @TestMetadata("kt14997.kt") - public void testKt14997() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt14997.kt"); - } - - @Test - @TestMetadata("kt14998.kt") - public void testKt14998() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt14998.kt"); - } - - @Test - @TestMetadata("kt15145.kt") - public void testKt15145() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt15145.kt"); - } - - @Test - @TestMetadata("kt17567.kt") - public void testKt17567() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt17567.kt"); - } - - @Test - @TestMetadata("kt18377.kt") - public void testKt18377() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt18377.kt"); - } - - @Test - @TestMetadata("kt18682.kt") - public void testKt18682() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt18682.kt"); - } - - @Test - @TestMetadata("kt19700.kt") - public void testKt19700() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt19700.kt"); - } - - @Test - @TestMetadata("kt19750.kt") - public void testKt19750() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt19750.kt"); - } - - @Test - @TestMetadata("kt24272.kt") - public void testKt24272() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt24272.kt"); - } - - @Test - @TestMetadata("kt25071.kt") - public void testKt25071() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt25071.kt"); - } - - @Test - @TestMetadata("kt27126.kt") - public void testKt27126() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt27126.kt"); - } - - @Test - @TestMetadata("kt28306.kt") - public void testKt28306() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt28306.kt"); - } - - @Test - @TestMetadata("kt32596.kt") - public void testKt32596() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt32596.kt"); - } - - @Test - @TestMetadata("kt34569.kt") - public void testKt34569() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt34569.kt"); - } - - @Test - @TestMetadata("kt43786.kt") - public void testKt43786() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt43786.kt"); - } - - @Test - @TestMetadata("kt61729.kt") - public void testKt61729() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt61729.kt"); - } - - @Test - @TestMetadata("lazyProperty.kt") - public void testLazyProperty() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/lazyProperty.kt"); - } - - @Test - @TestMetadata("leadingDollars.kt") - public void testLeadingDollars() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/leadingDollars.kt"); - } - - @Test - @TestMetadata("leadingDollars2.kt") - public void testLeadingDollars2() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/leadingDollars2.kt"); - } - - @Test - @TestMetadata("mapEntry.kt") - public void testMapEntry() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/mapEntry.kt"); - } - - @Test - @TestMetadata("maxErrorCount.kt") - public void testMaxErrorCount() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/maxErrorCount.kt"); - } - - @Test - @TestMetadata("methodParameterNames.kt") - public void testMethodParameterNames() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/methodParameterNames.kt"); - } - - @Test - @TestMetadata("methodPropertySignatureClash.kt") - public void testMethodPropertySignatureClash() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/methodPropertySignatureClash.kt"); - } - - @Test - @TestMetadata("modifiers.kt") - public void testModifiers() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/modifiers.kt"); - } - - @Test - @TestMetadata("multifileClass.kt") - public void testMultifileClass() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/multifileClass.kt"); - } - - @Test - @TestMetadata("multifileClassDefaultPackage.kt") - public void testMultifileClassDefaultPackage() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/multifileClassDefaultPackage.kt"); - } - - @Test - @TestMetadata("multipleTypeConstraints.kt") - public void testMultipleTypeConstraints() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/multipleTypeConstraints.kt"); - } - - @Test - @TestMetadata("nestedClasses.kt") - public void testNestedClasses() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/nestedClasses.kt"); - } - - @Test - @TestMetadata("nestedClasses2.kt") - public void testNestedClasses2() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/nestedClasses2.kt"); - } - - @Test - @TestMetadata("nestedClassesNonRootPackage.kt") - public void testNestedClassesNonRootPackage() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/nestedClassesNonRootPackage.kt"); - } - - @Test - @TestMetadata("nonExistentClass.kt") - public void testNonExistentClass() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClass.kt"); - } - - @Test - @TestMetadata("nonExistentClassTypesConversion.kt") - public void testNonExistentClassTypesConversion() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClassTypesConversion.kt"); - } - - @Test - @TestMetadata("nonExistentClassWIthoutCorrection.kt") - public void testNonExistentClassWIthoutCorrection() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClassWIthoutCorrection.kt"); - } - - @Test - @TestMetadata("primitiveTypes.kt") - public void testPrimitiveTypes() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/primitiveTypes.kt"); - } - - @Test - @TestMetadata("properties.kt") - public void testProperties() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/properties.kt"); - } - - @Test - @TestMetadata("propertyAnnotations.kt") - public void testPropertyAnnotations() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/propertyAnnotations.kt"); - } - - @Test - @TestMetadata("recentlyNullable.kt") - public void testRecentlyNullable() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/recentlyNullable.kt"); - } - - @Test - @TestMetadata("repeatableAnnotations.kt") - public void testRepeatableAnnotations() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/repeatableAnnotations.kt"); - } - - @Test - @TestMetadata("secondaryConstructor.kt") - public void testSecondaryConstructor() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/secondaryConstructor.kt"); - } - - @Test - @TestMetadata("severalPackageParts.kt") - public void testSeveralPackageParts() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/severalPackageParts.kt"); - } - - @Test - @TestMetadata("starImports.kt") - public void testStarImports() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/starImports.kt"); - } - - @Test - @TestMetadata("strangeIdentifiers.kt") - public void testStrangeIdentifiers() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/strangeIdentifiers.kt"); - } - - @Test - @TestMetadata("strangeNames.kt") - public void testStrangeNames() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/strangeNames.kt"); - } - - @Test - @TestMetadata("stripMetadata.kt") - public void testStripMetadata() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/stripMetadata.kt"); - } - - @Test - @TestMetadata("superConstructorCall.kt") - public void testSuperConstructorCall() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/superConstructorCall.kt"); - } - - @Test - @TestMetadata("suspendArgName.kt") - public void testSuspendArgName() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/suspendArgName.kt"); - } - - @Test - @TestMetadata("suspendErrorTypes.kt") - public void testSuspendErrorTypes() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/suspendErrorTypes.kt"); - } - - @Test - @TestMetadata("suspendFunctionSupertype.kt") - public void testSuspendFunctionSupertype() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/suspendFunctionSupertype.kt"); - } - - @Test - @TestMetadata("suspendFunctionWithBigArity.kt") - public void testSuspendFunctionWithBigArity() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/suspendFunctionWithBigArity.kt"); - } - - @Test - @TestMetadata("topLevel.kt") - public void testTopLevel() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/topLevel.kt"); - } - - @Test - @TestMetadata("unresolvedDelegateExpression.kt") - public void testUnresolvedDelegateExpression() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/unresolvedDelegateExpression.kt"); - } - - @Test - @TestMetadata("unsafePropertyInitializers.kt") - public void testUnsafePropertyInitializers() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/converter/unsafePropertyInitializers.kt"); - } -} diff --git a/plugins/kapt3/kapt3-compiler/tests-gen/org/jetbrains/kotlin/kapt3/test/runners/KotlinKaptContextTestGenerated.java b/plugins/kapt3/kapt3-compiler/tests-gen/org/jetbrains/kotlin/kapt3/test/runners/KotlinKaptContextTestGenerated.java deleted file mode 100644 index 305836bbcb8..00000000000 --- a/plugins/kapt3/kapt3-compiler/tests-gen/org/jetbrains/kotlin/kapt3/test/runners/KotlinKaptContextTestGenerated.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2010-2023 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.kapt3.test.runners; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.junit.jupiter.api.Tag; -import org.jetbrains.kotlin.test.TargetBackend; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.jupiter.api.Nested; -import org.junit.jupiter.api.Test; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.GenerateTestsKt}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("plugins/kapt3/kapt3-compiler/testData/kotlinRunner") -@TestDataPath("$PROJECT_ROOT") -@Tag("IgnoreJDK11") -public class KotlinKaptContextTestGenerated extends AbstractKotlinKaptContextTest { - @Test - public void testAllFilesPresentInKotlinRunner() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/kapt3/kapt3-compiler/testData/kotlinRunner"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); - } - - @Test - @TestMetadata("DefaultParameterValues.kt") - public void testDefaultParameterValues() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/kotlinRunner/DefaultParameterValues.kt"); - } - - @Test - @TestMetadata("ErrorLocationMapping.kt") - public void testErrorLocationMapping() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/kotlinRunner/ErrorLocationMapping.kt"); - } - - @Test - @TestMetadata("Log.kt") - public void testLog() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Log.kt"); - } - - @Test - @TestMetadata("NestedClasses.kt") - public void testNestedClasses() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/kotlinRunner/NestedClasses.kt"); - } - - @Test - @TestMetadata("Overloads.kt") - public void testOverloads() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Overloads.kt"); - } - - @Test - @TestMetadata("Simple.kt") - public void testSimple() throws Exception { - runTest("plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Simple.kt"); - } -}