diff --git a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/FirCompileKotlinAgainstKotlinTestGenerated.java b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/FirCompileKotlinAgainstKotlinTestGenerated.java new file mode 100644 index 00000000000..6d742f8b0dd --- /dev/null +++ b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/FirCompileKotlinAgainstKotlinTestGenerated.java @@ -0,0 +1,644 @@ +/* + * 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.codegen; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; +import org.jetbrains.kotlin.test.KotlinTestUtils; +import org.jetbrains.kotlin.test.TargetBackend; +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/compileKotlinAgainstKotlin") +@TestDataPath("$PROJECT_ROOT") +@RunWith(JUnit3RunnerWithInners.class) +public class FirCompileKotlinAgainstKotlinTestGenerated extends AbstractFirCompileKotlinAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("annotationInInterface.kt") + public void testAnnotationInInterface() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/annotationInInterface.kt"); + } + + @TestMetadata("annotationOnTypeUseInTypeAlias.kt") + public void testAnnotationOnTypeUseInTypeAlias() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt"); + } + + @TestMetadata("annotationsOnTypeAliases.kt") + public void testAnnotationsOnTypeAliases() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt"); + } + + @TestMetadata("callDeserializedPropertyOnInlineClassType.kt") + public void testCallDeserializedPropertyOnInlineClassType() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt"); + } + + @TestMetadata("callsToMultifileClassFromOtherPackage.kt") + public void testCallsToMultifileClassFromOtherPackage() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt"); + } + + @TestMetadata("classInObject.kt") + public void testClassInObject() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/classInObject.kt"); + } + + @TestMetadata("companionObjectInEnum.kt") + public void testCompanionObjectInEnum() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/companionObjectInEnum.kt"); + } + + @TestMetadata("companionObjectMember.kt") + public void testCompanionObjectMember() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/companionObjectMember.kt"); + } + + @TestMetadata("constPropertyReferenceFromMultifileClass.kt") + public void testConstPropertyReferenceFromMultifileClass() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt"); + } + + @TestMetadata("constructorVararg.kt") + public void testConstructorVararg() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/constructorVararg.kt"); + } + + @TestMetadata("constructorWithInlineClassParametersInBinaryDependencies.kt") + public void testConstructorWithInlineClassParametersInBinaryDependencies() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt"); + } + + @TestMetadata("copySamOnInline.kt") + public void testCopySamOnInline() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt"); + } + + @TestMetadata("copySamOnInline2.kt") + public void testCopySamOnInline2() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline2.kt"); + } + + @TestMetadata("coroutinesBinary.kt") + public void testCoroutinesBinary_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt", "kotlin.coroutines"); + } + + @TestMetadata("defaultConstructor.kt") + public void testDefaultConstructor() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/defaultConstructor.kt"); + } + + @TestMetadata("defaultLambdaRegeneration.kt") + public void testDefaultLambdaRegeneration() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt"); + } + + @TestMetadata("defaultLambdaRegeneration2.kt") + public void testDefaultLambdaRegeneration2() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt"); + } + + @TestMetadata("delegatedDefault.kt") + public void testDelegatedDefault() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/delegatedDefault.kt"); + } + + @TestMetadata("delegationAndAnnotations.kt") + public void testDelegationAndAnnotations() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/delegationAndAnnotations.kt"); + } + + @TestMetadata("doublyNestedClass.kt") + public void testDoublyNestedClass() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/doublyNestedClass.kt"); + } + + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/enum.kt"); + } + + @TestMetadata("expectClassActualTypeAlias.kt") + public void testExpectClassActualTypeAlias() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt"); + } + + @TestMetadata("inlineClassFromBinaryDependencies.kt") + public void testInlineClassFromBinaryDependencies() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt"); + } + + @TestMetadata("inlineClassInlineProperty.kt") + public void testInlineClassInlineProperty() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt"); + } + + @TestMetadata("inlinedConstants.kt") + public void testInlinedConstants() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/inlinedConstants.kt"); + } + + @TestMetadata("innerClassConstructor.kt") + public void testInnerClassConstructor() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/innerClassConstructor.kt"); + } + + @TestMetadata("interfaceDelegationAndBridgesProcessing.kt") + public void testInterfaceDelegationAndBridgesProcessing() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt"); + } + + @TestMetadata("internalSetterOverridden.kt") + public void testInternalSetterOverridden() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/internalSetterOverridden.kt"); + } + + @TestMetadata("internalWithOtherModuleName.kt") + public void testInternalWithOtherModuleName() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt"); + } + + @TestMetadata("jvmField.kt") + public void testJvmField() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvmField.kt"); + } + + @TestMetadata("jvmFieldInAnnotationCompanion.kt") + public void testJvmFieldInAnnotationCompanion() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInAnnotationCompanion.kt"); + } + + @TestMetadata("jvmFieldInConstructor.kt") + public void testJvmFieldInConstructor() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt"); + } + + @TestMetadata("jvmFieldInInterfaceCompanion.kt") + public void testJvmFieldInInterfaceCompanion() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInInterfaceCompanion.kt"); + } + + @TestMetadata("jvmNames.kt") + public void testJvmNames() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvmNames.kt"); + } + + @TestMetadata("jvmPackageName.kt") + public void testJvmPackageName() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt"); + } + + @TestMetadata("jvmPackageNameInRootPackage.kt") + public void testJvmPackageNameInRootPackage() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt"); + } + + @TestMetadata("jvmPackageNameMultifileClass.kt") + public void testJvmPackageNameMultifileClass() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt"); + } + + @TestMetadata("jvmPackageNameWithJvmName.kt") + public void testJvmPackageNameWithJvmName() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt"); + } + + @TestMetadata("jvmStaticInObject.kt") + public void testJvmStaticInObject() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObject.kt"); + } + + @TestMetadata("kotlinPropertyAsAnnotationParameter.kt") + public void testKotlinPropertyAsAnnotationParameter() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt"); + } + + @TestMetadata("kt14012.kt") + public void testKt14012() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/kt14012.kt"); + } + + @TestMetadata("kt14012_multi.kt") + public void testKt14012_multi() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/kt14012_multi.kt"); + } + + @TestMetadata("kt21775.kt") + public void testKt21775() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/kt21775.kt"); + } + + @TestMetadata("metadataForMembersInLocalClassInInitializer.kt") + public void testMetadataForMembersInLocalClassInInitializer() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt"); + } + + @TestMetadata("multifileClassInlineFunctionAccessingProperty.kt") + public void testMultifileClassInlineFunctionAccessingProperty() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt"); + } + + @TestMetadata("multifileClassWithTypealias.kt") + public void testMultifileClassWithTypealias() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt"); + } + + @TestMetadata("nestedClass.kt") + public void testNestedClass() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/nestedClass.kt"); + } + + @TestMetadata("nestedClassInAnnotationArgument.kt") + public void testNestedClassInAnnotationArgument() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt"); + } + + @TestMetadata("nestedEnum.kt") + public void testNestedEnum() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/nestedEnum.kt"); + } + + @TestMetadata("nestedFunctionTypeAliasExpansion.kt") + public void testNestedFunctionTypeAliasExpansion() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt"); + } + + @TestMetadata("nestedObject.kt") + public void testNestedObject() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/nestedObject.kt"); + } + + @TestMetadata("nestedTypeAliasExpansion.kt") + public void testNestedTypeAliasExpansion() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt"); + } + + @TestMetadata("optionalAnnotation.kt") + public void testOptionalAnnotation() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/optionalAnnotation.kt"); + } + + @TestMetadata("platformTypes.kt") + public void testPlatformTypes() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/platformTypes.kt"); + } + + @TestMetadata("privateCompanionObjectValInDifferentModule.kt") + public void testPrivateCompanionObjectValInDifferentModule() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt"); + } + + @TestMetadata("privateTopLevelValInDifferentModule.kt") + public void testPrivateTopLevelValInDifferentModule() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt"); + } + + @TestMetadata("propertyReference.kt") + public void testPropertyReference() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/propertyReference.kt"); + } + + @TestMetadata("recursiveGeneric.kt") + public void testRecursiveGeneric() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/recursiveGeneric.kt"); + } + + @TestMetadata("reflectTopLevelFunctionOtherFile.kt") + public void testReflectTopLevelFunctionOtherFile() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/reflectTopLevelFunctionOtherFile.kt"); + } + + @TestMetadata("sealedClass.kt") + public void testSealedClass() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/sealedClass.kt"); + } + + @TestMetadata("secondaryConstructors.kt") + public void testSecondaryConstructors() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/secondaryConstructors.kt"); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/simple.kt"); + } + + @TestMetadata("simpleValAnonymousObject.kt") + public void testSimpleValAnonymousObject() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt"); + } + + @TestMetadata("specialBridgesInDependencies.kt") + public void testSpecialBridgesInDependencies() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt"); + } + + @TestMetadata("starImportEnum.kt") + public void testStarImportEnum() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/starImportEnum.kt"); + } + + @TestMetadata("suspendFunWithDefaultMangling.kt") + public void testSuspendFunWithDefaultMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); + } + + @TestMetadata("targetedJvmName.kt") + public void testTargetedJvmName() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt"); + } + + @TestMetadata("typeAliasesKt13181.kt") + public void testTypeAliasesKt13181() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/typeAliasesKt13181.kt"); + } + + @TestMetadata("unsignedTypesInAnnotations.kt") + public void testUnsignedTypesInAnnotations() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt"); + } + + @TestMetadata("useDeserializedFunInterface.kt") + public void testUseDeserializedFunInterface() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt"); + } + + @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Jvm8 extends AbstractFirCompileKotlinAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInJvm8() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Defaults extends AbstractFirCompileKotlinAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInDefaults() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt"); + } + + @TestMetadata("superCallFromInterface.kt") + public void testSuperCallFromInterface() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt"); + } + + @TestMetadata("superCallFromInterface2.kt") + public void testSuperCallFromInterface2() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt"); + } + + @TestMetadata("superPropAccess.kt") + public void testSuperPropAccess() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt"); + } + + @TestMetadata("superPropAccessFromInterface.kt") + public void testSuperPropAccessFromInterface() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt"); + } + + @TestMetadata("superPropAccessFromInterface2.kt") + public void testSuperPropAccessFromInterface2() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt"); + } + + @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AllCompatibility extends AbstractFirCompileKotlinAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInAllCompatibility() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("callStackTrace.kt") + public void testCallStackTrace() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt"); + } + + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt"); + } + + @TestMetadata("superCallFromInterface.kt") + public void testSuperCallFromInterface() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt"); + } + + @TestMetadata("superCallFromInterface2.kt") + public void testSuperCallFromInterface2() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt"); + } + + @TestMetadata("superPropAccess.kt") + public void testSuperPropAccess() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt"); + } + + @TestMetadata("superPropAccessFromInterface.kt") + public void testSuperPropAccessFromInterface() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt"); + } + + @TestMetadata("superPropAccessFromInterface2.kt") + public void testSuperPropAccessFromInterface2() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt"); + } + + @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractFirCompileKotlinAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt"); + } + } + } + + @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Interop extends AbstractFirCompileKotlinAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInInterop() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("likeMemberClash.kt") + public void testLikeMemberClash() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt"); + } + + @TestMetadata("likeSpecialization.kt") + public void testLikeSpecialization() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt"); + } + + @TestMetadata("newAndOldSchemes.kt") + public void testNewAndOldSchemes() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt"); + } + + @TestMetadata("newAndOldSchemes2.kt") + public void testNewAndOldSchemes2() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt"); + } + + @TestMetadata("newAndOldSchemes2Compatibility.kt") + public void testNewAndOldSchemes2Compatibility() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt"); + } + + @TestMetadata("newSchemeWithJvmDefault.kt") + public void testNewSchemeWithJvmDefault() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt"); + } + } + } + + @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Jvm8against6 extends AbstractFirCompileKotlinAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInJvm8against6() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("jdk8Against6.kt") + public void testJdk8Against6() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt"); + } + + @TestMetadata("simpleCall.kt") + public void testSimpleCall() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt"); + } + + @TestMetadata("simpleCallWithBigHierarchy.kt") + public void testSimpleCallWithBigHierarchy() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt"); + } + + @TestMetadata("simpleCallWithHierarchy.kt") + public void testSimpleCallWithHierarchy() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt"); + } + + @TestMetadata("simpleProp.kt") + public void testSimpleProp() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt"); + } + + @TestMetadata("simplePropWithHierarchy.kt") + public void testSimplePropWithHierarchy() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt"); + } + + @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Delegation extends AbstractFirCompileKotlinAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInDelegation() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("diamond.kt") + public void testDiamond() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt"); + } + + @TestMetadata("diamond2.kt") + public void testDiamond2() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt"); + } + + @TestMetadata("diamond3.kt") + public void testDiamond3() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt"); + } + } + } + } + + @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeAnnotations extends AbstractFirCompileKotlinAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInTypeAnnotations() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("implicitReturn.kt") + public void testImplicitReturn() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt"); + } + } +} diff --git a/compiler/testData/compileKotlinAgainstKotlin/annotationInInterface.kt b/compiler/testData/compileKotlinAgainstKotlin/annotationInInterface.kt index 317cf41e696..995de6ec0eb 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/annotationInInterface.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/annotationInInterface.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: A.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt b/compiler/testData/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt index e215172a8db..467f94de31f 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_REFLECT // FILE: A.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt b/compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt index 3c6332d89bb..f90154a952e 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: A.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt b/compiler/testData/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt index e72e0a12217..daae4e93d3e 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: A.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt b/compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt index a338cfa9635..f3c92ac7b5a 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // FILE: A.kt // FULL_JDK diff --git a/compiler/testData/compileKotlinAgainstKotlin/copySamOnInline2.kt b/compiler/testData/compileKotlinAgainstKotlin/copySamOnInline2.kt index 504949834ce..d5888612bd2 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/copySamOnInline2.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/copySamOnInline2.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // FILE: A.kt // FULL_JDK diff --git a/compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt b/compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt index 83abd378140..d1df3eed38a 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // COMMON_COROUTINES_TEST // FILE: A.kt // WITH_RUNTIME diff --git a/compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt b/compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt index ab9c4ceae8e..78eaf5387fd 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: A.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt b/compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt index c9a7910ab6a..80e5c2758e9 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: A.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/delegationAndAnnotations.kt b/compiler/testData/compileKotlinAgainstKotlin/delegationAndAnnotations.kt index 0fe888bdeb5..b891ac615c5 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/delegationAndAnnotations.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/delegationAndAnnotations.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME // FILE: A.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/inlinedConstants.kt b/compiler/testData/compileKotlinAgainstKotlin/inlinedConstants.kt index 51cb24fd65a..635a2b19e4b 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/inlinedConstants.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/inlinedConstants.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: A.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt b/compiler/testData/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt index 29b13fe5666..f577b711aa3 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: NATIVE // FILE: A.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt index 1e95990ff38..796d899775e 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt @@ -1,5 +1,4 @@ // !JVM_DEFAULT_MODE: all-compatibility -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // WITH_RUNTIME diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt index a0d4edd03bc..e6480c3b89d 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // FULL_JDK // FILE: 1.kt // !JVM_DEFAULT_MODE: disable diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt index 66c93572bb4..addfd9ec5fa 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // JVM_TARGET: 1.8 // FILE: 1.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt index 733e39bdb70..f15a84c1258 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // FULL_JDK // FILE: 1.kt interface KInterface { diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt index 91a334437d9..00fb371ff65 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // FULL_JDK // WITH_RUNTIME // JVM_TARGET: 1.8 diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt index b17dbf9417b..eee1b61a93e 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // !JVM_DEFAULT_MODE: enable // JVM_TARGET: 1.8 // WITH_RUNTIME diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt index 6defd342c66..a41174e6cf3 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // !JVM_DEFAULT_MODE: enable // JVM_TARGET: 1.8 // WITH_RUNTIME diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt index d3d6655f3cb..17a7a2e5146 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // !JVM_DEFAULT_MODE: enable // JVM_TARGET: 1.8 // WITH_RUNTIME diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmField.kt b/compiler/testData/compileKotlinAgainstKotlin/jvmField.kt index 10fe2eff643..d1b7412e933 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmField.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/jvmField.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: A.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt b/compiler/testData/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt index 910e2745aaa..0cde2a5ceb2 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: A.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmNames.kt b/compiler/testData/compileKotlinAgainstKotlin/jvmNames.kt index 88011ca28c9..750c56d7ba2 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmNames.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/jvmNames.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: A.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt b/compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt index 8cc09416ed6..5348559e419 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: A.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt b/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt index 7cf60d73870..dce9cf9122c 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: A.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt b/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt index fc80cf8849d..b084855bffc 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt b/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt index 29bcde0e05b..ab2aed19372 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: A.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt b/compiler/testData/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt index a43165004f0..a677160e645 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: A.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt b/compiler/testData/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt index 97a5a63ccaf..07a8a23d5d8 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: A.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt b/compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt index d76e211fb65..2af4f51aa26 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JS_IR, JS, NATIVE // WITH_REFLECT diff --git a/compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt b/compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt index 7e1d7c1aeae..5a94a29901e 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JS_IR, JS, NATIVE // WITH_REFLECT diff --git a/compiler/testData/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt b/compiler/testData/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt index a3be6bc6b0e..95828c6a4d6 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // FILE: A.kt diff --git a/compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt b/compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt index 8a62410214c..74e763e383a 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: A.kt package lib diff --git a/compiler/testData/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt b/compiler/testData/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt index 3f1dd483054..c8b117a7130 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt @@ -1,6 +1,5 @@ // KOTLIN_CONFIGURATION_FLAGS: +JVM.EMIT_JVM_TYPE_ANNOTATIONS // TARGET_BACKEND: JVM -// IGNORE_BACKEND_FIR: JVM_IR // JVM_TARGET: 1.8 // WITH_REFLECT // FULL_JDK diff --git a/compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt b/compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt index d82e78d74d8..610f894ab59 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: NATIVE // WITH_RUNTIME diff --git a/compiler/testData/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt b/compiler/testData/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt index 06c13da3428..70f94c83c2c 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions // FILE: A.kt diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractFirCompileKotlinAgainstKotlinTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractFirCompileKotlinAgainstKotlinTest.kt new file mode 100644 index 00000000000..02db57411ab --- /dev/null +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractFirCompileKotlinAgainstKotlinTest.kt @@ -0,0 +1,18 @@ +/* + * 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.codegen + +import org.jetbrains.kotlin.config.CommonConfigurationKeys +import org.jetbrains.kotlin.config.CompilerConfiguration +import org.jetbrains.kotlin.config.JVMConfigurationKeys + +abstract class AbstractFirCompileKotlinAgainstKotlinTest : AbstractCompileKotlinAgainstKotlinTest() { + override fun updateConfiguration(configuration: CompilerConfiguration) { + super.updateConfiguration(configuration) + configuration.put(CommonConfigurationKeys.USE_FIR, true) + configuration.put(JVMConfigurationKeys.IR, true) + } +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt index 36f651bfceb..a6f039dcfb7 100644 --- a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt +++ b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt @@ -546,6 +546,10 @@ fun main(args: Array) { testClass { model("codegen/bytecodeText", targetBackend = TargetBackend.JVM_IR, excludeDirs = listOf("oldLanguageVersions")) } + + testClass { + model("compileKotlinAgainstKotlin", targetBackend = TargetBackend.JVM_IR) + } } testGroup(