diff --git a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxAgainstJavaCodegenTestGenerated.java b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxAgainstJavaCodegenTestGenerated.java new file mode 100644 index 00000000000..8b03298d54d --- /dev/null +++ b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxAgainstJavaCodegenTestGenerated.java @@ -0,0 +1,1240 @@ +/* + * 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.ir; + +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/codegen/boxAgainstJava") +@TestDataPath("$PROJECT_ROOT") +@RunWith(JUnit3RunnerWithInners.class) +public class FirBlackBoxAgainstJavaCodegenTestGenerated extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInBoxAgainstJava() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true, "oldLanguageVersions"); + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/annotations") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Annotations extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInAnnotations() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("divisionByZeroInJava.kt") + public void testDivisionByZeroInJava() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/annotations/divisionByZeroInJava.kt"); + } + + @TestMetadata("javaAnnotationArrayValueDefault.kt") + public void testJavaAnnotationArrayValueDefault() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueDefault.kt"); + } + + @TestMetadata("javaAnnotationArrayValueNoDefault.kt") + public void testJavaAnnotationArrayValueNoDefault() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueNoDefault.kt"); + } + + @TestMetadata("javaAnnotationCall.kt") + public void testJavaAnnotationCall() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationCall.kt"); + } + + @TestMetadata("javaAnnotationDefault.kt") + public void testJavaAnnotationDefault() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationDefault.kt"); + } + + @TestMetadata("javaNegativePropertyAsAnnotationParameter.kt") + public void testJavaNegativePropertyAsAnnotationParameter() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaNegativePropertyAsAnnotationParameter.kt"); + } + + @TestMetadata("javaPropertyAsAnnotationParameter.kt") + public void testJavaPropertyAsAnnotationParameter() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyAsAnnotationParameter.kt"); + } + + @TestMetadata("javaPropertyWithIntInitializer.kt") + public void testJavaPropertyWithIntInitializer() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyWithIntInitializer.kt"); + } + + @TestMetadata("retentionInJava.kt") + public void testRetentionInJava() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/annotations/retentionInJava.kt"); + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class KClassMapping extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInKClassMapping() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("arrayClassParameter.kt") + public void testArrayClassParameter() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt"); + } + + @TestMetadata("arrayClassParameterOnJavaClass.kt") + public void testArrayClassParameterOnJavaClass() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt"); + } + + @TestMetadata("classParameter.kt") + public void testClassParameter() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameter.kt"); + } + + @TestMetadata("classParameterOnJavaClass.kt") + public void testClassParameterOnJavaClass() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameterOnJavaClass.kt"); + } + + @TestMetadata("varargClassParameter.kt") + public void testVarargClassParameter() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameter.kt"); + } + + @TestMetadata("varargClassParameterOnJavaClass.kt") + public void testVarargClassParameterOnJavaClass() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameterOnJavaClass.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/annotations/typeAnnotations") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeAnnotations extends AbstractFirBlackBoxAgainstJavaCodegenTest { + 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/codegen/boxAgainstJava/annotations/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("implicitReturn.kt") + public void testImplicitReturn() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/annotations/typeAnnotations/implicitReturn.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/callableReference") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CallableReference extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInCallableReference() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/callableReference/constructor.kt"); + } + + @TestMetadata("kt16412.kt") + public void testKt16412() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/callableReference/kt16412.kt"); + } + + @TestMetadata("publicFinalField.kt") + public void testPublicFinalField() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/callableReference/publicFinalField.kt"); + } + + @TestMetadata("publicMutableField.kt") + public void testPublicMutableField() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/callableReference/publicMutableField.kt"); + } + + @TestMetadata("staticMethod.kt") + public void testStaticMethod() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/callableReference/staticMethod.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/constructor") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Constructor extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInConstructor() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/constructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("genericConstructor.kt") + public void testGenericConstructor() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/constructor/genericConstructor.kt"); + } + + @TestMetadata("secondaryConstructor.kt") + public void testSecondaryConstructor() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/constructor/secondaryConstructor.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/delegation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Delegation extends AbstractFirBlackBoxAgainstJavaCodegenTest { + 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/codegen/boxAgainstJava/delegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("delegationAndInheritanceFromJava.kt") + public void testDelegationAndInheritanceFromJava() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/delegation/delegationAndInheritanceFromJava.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/enum") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Enum extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInEnum() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("nameConflict.kt") + public void testNameConflict() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/enum/nameConflict.kt"); + } + + @TestMetadata("simpleJavaEnum.kt") + public void testSimpleJavaEnum() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnum.kt"); + } + + @TestMetadata("simpleJavaEnumWithFunction.kt") + public void testSimpleJavaEnumWithFunction() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnumWithFunction.kt"); + } + + @TestMetadata("simpleJavaEnumWithStaticImport.kt") + public void testSimpleJavaEnumWithStaticImport() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnumWithStaticImport.kt"); + } + + @TestMetadata("simpleJavaInnerEnum.kt") + public void testSimpleJavaInnerEnum() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaInnerEnum.kt"); + } + + @TestMetadata("staticField.kt") + public void testStaticField() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/enum/staticField.kt"); + } + + @TestMetadata("staticMethod.kt") + public void testStaticMethod() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/enum/staticMethod.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/functions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Functions extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInFunctions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/functions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/functions/constructor.kt"); + } + + @TestMetadata("max.kt") + public void testMax() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/functions/max.kt"); + } + + @TestMetadata("referencesStaticInnerClassMethod.kt") + public void testReferencesStaticInnerClassMethod() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/functions/referencesStaticInnerClassMethod.kt"); + } + + @TestMetadata("referencesStaticInnerClassMethodL2.kt") + public void testReferencesStaticInnerClassMethodL2() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/functions/referencesStaticInnerClassMethodL2.kt"); + } + + @TestMetadata("unrelatedUpperBounds.kt") + public void testUnrelatedUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/functions/unrelatedUpperBounds.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/ieee754") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Ieee754 extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInIeee754() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/ieee754"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("anyToReal.kt") + public void testAnyToReal() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/ieee754/anyToReal.kt"); + } + + @TestMetadata("comparableTypeCast.kt") + public void testComparableTypeCast() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/ieee754/comparableTypeCast.kt"); + } + + @TestMetadata("double.kt") + public void testDouble() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/ieee754/double.kt"); + } + + @TestMetadata("explicitCompareCall.kt") + public void testExplicitCompareCall() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitCompareCall.kt"); + } + + @TestMetadata("explicitEqualsCall.kt") + public void testExplicitEqualsCall() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall.kt"); + } + + @TestMetadata("float.kt") + public void testFloat() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/ieee754/float.kt"); + } + + @TestMetadata("generic.kt") + public void testGeneric() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/ieee754/generic.kt"); + } + + @TestMetadata("nullableAnyToReal.kt") + public void testNullableAnyToReal() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/ieee754/nullableAnyToReal.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/inline") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Inline extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInInline() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("kt19910.kt") + public void testKt19910() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/inline/kt19910.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/innerClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InnerClass extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInInnerClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/innerClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("kt3532.kt") + public void testKt3532() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/innerClass/kt3532.kt"); + } + + @TestMetadata("kt3812.kt") + public void testKt3812() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/innerClass/kt3812.kt"); + } + + @TestMetadata("kt4036.kt") + public void testKt4036() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/innerClass/kt4036.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/interfaces") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Interfaces extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInInterfaces() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/interfaces"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("inheritJavaInterface.kt") + public void testInheritJavaInterface() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/interfaces/inheritJavaInterface.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/multiplatform") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Multiplatform extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInMultiplatform() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("annotationsViaActualTypeAliasFromBinary.kt") + public void testAnnotationsViaActualTypeAliasFromBinary() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/multiplatform/annotationsViaActualTypeAliasFromBinary.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/notNullAssertions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NotNullAssertions extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInNotNullAssertions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("callAssertions.kt") + public void testCallAssertions() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/callAssertions.kt"); + } + + @TestMetadata("delegation.kt") + public void testDelegation() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/delegation.kt"); + } + + @TestMetadata("doGenerateParamAssertions.kt") + public void testDoGenerateParamAssertions() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/doGenerateParamAssertions.kt"); + } + + @TestMetadata("noCallAssertions.kt") + public void testNoCallAssertions() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/noCallAssertions.kt"); + } + + @TestMetadata("rightElvisOperand.kt") + public void testRightElvisOperand() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/rightElvisOperand.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/platformTypes") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PlatformTypes extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInPlatformTypes() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/platformTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("genericUnit.kt") + public void testGenericUnit() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/genericUnit.kt"); + } + + @TestMetadata("kt14989.kt") + public void testKt14989() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/kt14989.kt"); + } + + @TestMetadata("specializedMapFull.kt") + public void testSpecializedMapFull() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/specializedMapFull.kt"); + } + + @TestMetadata("specializedMapPut.kt") + public void testSpecializedMapPut() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/specializedMapPut.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/property") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Property extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInProperty() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("fieldAccessFromExtensionInTraitImpl.kt") + public void testFieldAccessFromExtensionInTraitImpl() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/property/fieldAccessFromExtensionInTraitImpl.kt"); + } + + @TestMetadata("fieldAccessViaSubclass.kt") + public void testFieldAccessViaSubclass() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/property/fieldAccessViaSubclass.kt"); + } + + @TestMetadata("referenceToJavaFieldViaBridge.kt") + public void testReferenceToJavaFieldViaBridge() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/property/referenceToJavaFieldViaBridge.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RecursiveRawTypes extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInRecursiveRawTypes() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("kt16528.kt") + public void testKt16528() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes/kt16528.kt"); + } + + @TestMetadata("kt16639.kt") + public void testKt16639() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes/kt16639.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/reflection") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Reflection extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInReflection() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/reflection/classLiterals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassLiterals extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInClassLiterals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection/classLiterals"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("javaClassLiteral.kt") + public void testJavaClassLiteral() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/reflection/classLiterals/javaClassLiteral.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/reflection/mapping") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Mapping extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInMapping() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection/mapping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("jClass2kClass.kt") + public void testJClass2kClass() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/jClass2kClass.kt"); + } + + @TestMetadata("javaConstructor.kt") + public void testJavaConstructor() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaConstructor.kt"); + } + + @TestMetadata("javaFields.kt") + public void testJavaFields() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaFields.kt"); + } + + @TestMetadata("javaMethods.kt") + public void testJavaMethods() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaMethods.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/reflection/properties") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Properties extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInProperties() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("equalsHashCodeToString.kt") + public void testEqualsHashCodeToString() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/reflection/properties/equalsHashCodeToString.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/sam") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Sam extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInSam() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("differentFqNames.kt") + public void testDifferentFqNames() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/differentFqNames.kt"); + } + + @TestMetadata("kt11519.kt") + public void testKt11519() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/kt11519.kt"); + } + + @TestMetadata("kt11519Constructor.kt") + public void testKt11519Constructor() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/kt11519Constructor.kt"); + } + + @TestMetadata("kt11696.kt") + public void testKt11696() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/kt11696.kt"); + } + + @TestMetadata("kt4753.kt") + public void testKt4753() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/kt4753.kt"); + } + + @TestMetadata("kt4753_2.kt") + public void testKt4753_2() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/kt4753_2.kt"); + } + + @TestMetadata("propertyReference.kt") + public void testPropertyReference() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/propertyReference.kt"); + } + + @TestMetadata("samConstructorGenericSignature.kt") + public void testSamConstructorGenericSignature() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/samConstructorGenericSignature.kt"); + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Adapters extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInAdapters() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/sam/adapters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("bridgesForOverridden.kt") + public void testBridgesForOverridden() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/bridgesForOverridden.kt"); + } + + @TestMetadata("bridgesForOverriddenComplex.kt") + public void testBridgesForOverriddenComplex() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/bridgesForOverriddenComplex.kt"); + } + + @TestMetadata("callAbstractAdapter.kt") + public void testCallAbstractAdapter() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/callAbstractAdapter.kt"); + } + + @TestMetadata("comparator.kt") + public void testComparator() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/comparator.kt"); + } + + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/constructor.kt"); + } + + @TestMetadata("doubleLongParameters.kt") + public void testDoubleLongParameters() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/doubleLongParameters.kt"); + } + + @TestMetadata("fileFilter.kt") + public void testFileFilter() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/fileFilter.kt"); + } + + @TestMetadata("genericSignature.kt") + public void testGenericSignature() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/genericSignature.kt"); + } + + @TestMetadata("implementAdapter.kt") + public void testImplementAdapter() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/implementAdapter.kt"); + } + + @TestMetadata("inheritedInKotlin.kt") + public void testInheritedInKotlin() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedInKotlin.kt"); + } + + @TestMetadata("inheritedOverriddenAdapter.kt") + public void testInheritedOverriddenAdapter() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedOverriddenAdapter.kt"); + } + + @TestMetadata("inheritedSimple.kt") + public void testInheritedSimple() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedSimple.kt"); + } + + @TestMetadata("localClass.kt") + public void testLocalClass() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/localClass.kt"); + } + + @TestMetadata("localObjectConstructor.kt") + public void testLocalObjectConstructor() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructor.kt"); + } + + @TestMetadata("localObjectConstructorWithFnValue.kt") + public void testLocalObjectConstructorWithFnValue() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructorWithFnValue.kt"); + } + + @TestMetadata("nonLiteralAndLiteralRunnable.kt") + public void testNonLiteralAndLiteralRunnable() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralAndLiteralRunnable.kt"); + } + + @TestMetadata("nonLiteralComparator.kt") + public void testNonLiteralComparator() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralComparator.kt"); + } + + @TestMetadata("nonLiteralInConstructor.kt") + public void testNonLiteralInConstructor() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralInConstructor.kt"); + } + + @TestMetadata("nonLiteralNull.kt") + public void testNonLiteralNull() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralNull.kt"); + } + + @TestMetadata("nonLiteralRunnable.kt") + public void testNonLiteralRunnable() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralRunnable.kt"); + } + + @TestMetadata("protectedFromBase.kt") + public void testProtectedFromBase() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/protectedFromBase.kt"); + } + + @TestMetadata("severalSamParameters.kt") + public void testSeveralSamParameters() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/severalSamParameters.kt"); + } + + @TestMetadata("simplest.kt") + public void testSimplest() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/simplest.kt"); + } + + @TestMetadata("superInSecondaryConstructor.kt") + public void testSuperInSecondaryConstructor() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/superInSecondaryConstructor.kt"); + } + + @TestMetadata("superconstructor.kt") + public void testSuperconstructor() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/superconstructor.kt"); + } + + @TestMetadata("superconstructorWithClosure.kt") + public void testSuperconstructorWithClosure() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/superconstructorWithClosure.kt"); + } + + @TestMetadata("typeParameterOfClass.kt") + public void testTypeParameterOfClass() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfClass.kt"); + } + + @TestMetadata("typeParameterOfMethod.kt") + public void testTypeParameterOfMethod() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfMethod.kt"); + } + + @TestMetadata("typeParameterOfOuterClass.kt") + public void testTypeParameterOfOuterClass() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfOuterClass.kt"); + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Operators extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInOperators() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("augmentedAssignmentPure.kt") + public void testAugmentedAssignmentPure() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentPure.kt"); + } + + @TestMetadata("augmentedAssignmentViaSimpleBinary.kt") + public void testAugmentedAssignmentViaSimpleBinary() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentViaSimpleBinary.kt"); + } + + @TestMetadata("binary.kt") + public void testBinary() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/binary.kt"); + } + + @TestMetadata("compareTo.kt") + public void testCompareTo() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/compareTo.kt"); + } + + @TestMetadata("contains.kt") + public void testContains() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/contains.kt"); + } + + @TestMetadata("get.kt") + public void testGet() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/get.kt"); + } + + @TestMetadata("invoke.kt") + public void testInvoke() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/invoke.kt"); + } + + @TestMetadata("legacyModOperator.kt") + public void testLegacyModOperator() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/legacyModOperator.kt"); + } + + @TestMetadata("multiGetSet.kt") + public void testMultiGetSet() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/multiGetSet.kt"); + } + + @TestMetadata("multiInvoke.kt") + public void testMultiInvoke() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/multiInvoke.kt"); + } + + @TestMetadata("set.kt") + public void testSet() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/set.kt"); + } + } + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/specialBuiltins") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SpecialBuiltins extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInSpecialBuiltins() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/specialBuiltins"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("charBuffer.kt") + public void testCharBuffer() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/specialBuiltins/charBuffer.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/staticFun") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class StaticFun extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInStaticFun() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/staticFun"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("classWithNestedEnum.kt") + public void testClassWithNestedEnum() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/staticFun/classWithNestedEnum.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/syntheticExtensions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SyntheticExtensions extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInSyntheticExtensions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/syntheticExtensions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("fromTwoBases.kt") + public void testFromTwoBases() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/fromTwoBases.kt"); + } + + @TestMetadata("getter.kt") + public void testGetter() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/getter.kt"); + } + + @TestMetadata("implicitReceiver.kt") + public void testImplicitReceiver() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/implicitReceiver.kt"); + } + + @TestMetadata("overrideOnlyGetter.kt") + public void testOverrideOnlyGetter() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/overrideOnlyGetter.kt"); + } + + @TestMetadata("plusPlus.kt") + public void testPlusPlus() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/plusPlus.kt"); + } + + @TestMetadata("protected.kt") + public void testProtected() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/protected.kt"); + } + + @TestMetadata("protectedSetter.kt") + public void testProtectedSetter() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/protectedSetter.kt"); + } + + @TestMetadata("setter.kt") + public void testSetter() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setter.kt"); + } + + @TestMetadata("setterNonVoid1.kt") + public void testSetterNonVoid1() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setterNonVoid1.kt"); + } + + @TestMetadata("setterNonVoid2.kt") + public void testSetterNonVoid2() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setterNonVoid2.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/throws") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Throws extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInThrows() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/throws"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("delegationAndThrows.kt") + public void testDelegationAndThrows() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/throws/delegationAndThrows.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/typealias") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Typealias extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInTypealias() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("javaStaticMembersViaTypeAlias.kt") + public void testJavaStaticMembersViaTypeAlias() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/typealias/javaStaticMembersViaTypeAlias.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/visibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Visibility extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInVisibility() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/visibility/package") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Package extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInPackage() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility/package"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("kt2781.kt") + public void testKt2781() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/kt2781.kt"); + } + + @TestMetadata("packageClass.kt") + public void testPackageClass() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/packageClass.kt"); + } + + @TestMetadata("packageFun.kt") + public void testPackageFun() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/packageFun.kt"); + } + + @TestMetadata("packageProperty.kt") + public void testPackageProperty() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/packageProperty.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ProtectedAndPackage extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInProtectedAndPackage() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("overrideProtectedFunInPackage.kt") + public void testOverrideProtectedFunInPackage() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/overrideProtectedFunInPackage.kt"); + } + + @TestMetadata("protectedAccessor.kt") + public void testProtectedAccessor() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedAccessor.kt"); + } + + @TestMetadata("protectedFunInPackage.kt") + public void testProtectedFunInPackage() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedFunInPackage.kt"); + } + + @TestMetadata("protectedPropertyInPackage.kt") + public void testProtectedPropertyInPackage() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedPropertyInPackage.kt"); + } + + @TestMetadata("protectedPropertyInPackageFromCrossinline.kt") + public void testProtectedPropertyInPackageFromCrossinline() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedPropertyInPackageFromCrossinline.kt"); + } + + @TestMetadata("protectedStaticClass.kt") + public void testProtectedStaticClass() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedStaticClass.kt"); + } + + @TestMetadata("protectedSuperField.kt") + public void testProtectedSuperField() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedSuperField.kt"); + } + + @TestMetadata("protectedSuperMethod.kt") + public void testProtectedSuperMethod() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedSuperMethod.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ProtectedStatic extends AbstractFirBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInProtectedStatic() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("funCallInConstructor.kt") + public void testFunCallInConstructor() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funCallInConstructor.kt"); + } + + @TestMetadata("funClassObject.kt") + public void testFunClassObject() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funClassObject.kt"); + } + + @TestMetadata("funGenericClass.kt") + public void testFunGenericClass() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funGenericClass.kt"); + } + + @TestMetadata("funNestedStaticClass.kt") + public void testFunNestedStaticClass() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticClass.kt"); + } + + @TestMetadata("funNestedStaticClass2.kt") + public void testFunNestedStaticClass2() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticClass2.kt"); + } + + @TestMetadata("funNestedStaticGenericClass.kt") + public void testFunNestedStaticGenericClass() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticGenericClass.kt"); + } + + @TestMetadata("funNotDirectSuperClass.kt") + public void testFunNotDirectSuperClass() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNotDirectSuperClass.kt"); + } + + @TestMetadata("funObject.kt") + public void testFunObject() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funObject.kt"); + } + + @TestMetadata("simpleClass.kt") + public void testSimpleClass() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleClass.kt"); + } + + @TestMetadata("simpleClass2.kt") + public void testSimpleClass2() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleClass2.kt"); + } + + @TestMetadata("simpleFun.kt") + public void testSimpleFun() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleFun.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleProperty.kt"); + } + } + } +} diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueDefault.kt b/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueDefault.kt index 3967e25cbeb..538a042b1a4 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueDefault.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueDefault.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // FILE: JavaAnn.java diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/javaNegativePropertyAsAnnotationParameter.kt b/compiler/testData/codegen/boxAgainstJava/annotations/javaNegativePropertyAsAnnotationParameter.kt index 241abdd9483..4c26f631269 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/javaNegativePropertyAsAnnotationParameter.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/javaNegativePropertyAsAnnotationParameter.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // FILE: Foo.java diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyAsAnnotationParameter.kt b/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyAsAnnotationParameter.kt index a8b3750b2a5..5eef50e4eb1 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyAsAnnotationParameter.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyAsAnnotationParameter.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // FILE: Foo.java diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyWithIntInitializer.kt b/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyWithIntInitializer.kt index 9c51d9dd7af..77eafd2b22e 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyWithIntInitializer.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyWithIntInitializer.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // FILE: Foo.java diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt index dbecbc2f49e..ed18d0f2361 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // FILE: JavaAnn.java diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt index 91840ba4fa5..e7652bb492e 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // FILE: JavaAnn.java diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameter.kt b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameter.kt index 2531baa93a1..a54e4ed659c 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameter.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameter.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // FILE: JavaAnn.java diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameterOnJavaClass.kt b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameterOnJavaClass.kt index 78dfd9e4ef9..a455fb36f14 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameterOnJavaClass.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameterOnJavaClass.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // FILE: JavaAnn.java diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameter.kt b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameter.kt index 52b64832711..9ee6c9bdf4b 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameter.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameter.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // FILE: JavaAnn.java diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameterOnJavaClass.kt b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameterOnJavaClass.kt index 1e3d9a9e5c0..efbade72b7a 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameterOnJavaClass.kt +++ b/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameterOnJavaClass.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // FILE: JavaAnn.java diff --git a/compiler/testData/codegen/boxAgainstJava/callableReference/publicFinalField.kt b/compiler/testData/codegen/boxAgainstJava/callableReference/publicFinalField.kt index e6eb43158b5..98d123a7ce8 100644 --- a/compiler/testData/codegen/boxAgainstJava/callableReference/publicFinalField.kt +++ b/compiler/testData/codegen/boxAgainstJava/callableReference/publicFinalField.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // FILE: A.java public class A { diff --git a/compiler/testData/codegen/boxAgainstJava/callableReference/publicMutableField.kt b/compiler/testData/codegen/boxAgainstJava/callableReference/publicMutableField.kt index 84cbe7f31ec..2c0b1d7763b 100644 --- a/compiler/testData/codegen/boxAgainstJava/callableReference/publicMutableField.kt +++ b/compiler/testData/codegen/boxAgainstJava/callableReference/publicMutableField.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // FILE: A.java public class A { diff --git a/compiler/testData/codegen/boxAgainstJava/notNullAssertions/callAssertions.kt b/compiler/testData/codegen/boxAgainstJava/notNullAssertions/callAssertions.kt index 898a76108b4..b0f8a2f864f 100644 --- a/compiler/testData/codegen/boxAgainstJava/notNullAssertions/callAssertions.kt +++ b/compiler/testData/codegen/boxAgainstJava/notNullAssertions/callAssertions.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // KOTLIN_CONFIGURATION_FLAGS: +JVM.DISABLE_PARAM_ASSERTIONS // FILE: callAssertions.kt diff --git a/compiler/testData/codegen/boxAgainstJava/notNullAssertions/delegation.kt b/compiler/testData/codegen/boxAgainstJava/notNullAssertions/delegation.kt index dee894f067d..b949c4959bb 100644 --- a/compiler/testData/codegen/boxAgainstJava/notNullAssertions/delegation.kt +++ b/compiler/testData/codegen/boxAgainstJava/notNullAssertions/delegation.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // FILE: delegation.kt interface Tr { diff --git a/compiler/testData/codegen/boxAgainstJava/notNullAssertions/rightElvisOperand.kt b/compiler/testData/codegen/boxAgainstJava/notNullAssertions/rightElvisOperand.kt index f05fe1beb0e..30e4169757e 100644 --- a/compiler/testData/codegen/boxAgainstJava/notNullAssertions/rightElvisOperand.kt +++ b/compiler/testData/codegen/boxAgainstJava/notNullAssertions/rightElvisOperand.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // FILE: RightElvisOperand.java class RightElvisOperand { diff --git a/compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaFields.kt b/compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaFields.kt index 2d85dc1ec3e..7bb0365fa05 100644 --- a/compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaFields.kt +++ b/compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaFields.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // WITH_REFLECT // FULL_JDK // FILE: J.java diff --git a/compiler/testData/codegen/boxAgainstJava/reflection/properties/equalsHashCodeToString.kt b/compiler/testData/codegen/boxAgainstJava/reflection/properties/equalsHashCodeToString.kt index d3edbc773f3..f6628586223 100644 --- a/compiler/testData/codegen/boxAgainstJava/reflection/properties/equalsHashCodeToString.kt +++ b/compiler/testData/codegen/boxAgainstJava/reflection/properties/equalsHashCodeToString.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // WITH_REFLECT // FILE: test/J.java diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedOverriddenAdapter.kt b/compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedOverriddenAdapter.kt index e6d4aa7ac6d..cbe4aff429f 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedOverriddenAdapter.kt +++ b/compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedOverriddenAdapter.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // FILE: Super.java diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/legacyModOperator.kt b/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/legacyModOperator.kt index a9c495deb3b..84fc6a235c3 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/legacyModOperator.kt +++ b/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/legacyModOperator.kt @@ -1,4 +1,5 @@ // !LANGUAGE: -ProhibitOperatorMod +// IGNORE_BACKEND_FIR: JVM_IR // FILE: Java.java import org.jetbrains.annotations.NotNull; diff --git a/compiler/testData/codegen/boxAgainstJava/sam/kt11519.kt b/compiler/testData/codegen/boxAgainstJava/sam/kt11519.kt index 85077fed199..b24379fa5a3 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/kt11519.kt +++ b/compiler/testData/codegen/boxAgainstJava/sam/kt11519.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // SKIP_JDK6 // FILE: Custom.java diff --git a/compiler/testData/codegen/boxAgainstJava/sam/kt11696.kt b/compiler/testData/codegen/boxAgainstJava/sam/kt11696.kt index 7782f4ac22d..8ec8075223e 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/kt11696.kt +++ b/compiler/testData/codegen/boxAgainstJava/sam/kt11696.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // FILE: Promise.java import org.jetbrains.annotations.NotNull; diff --git a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/overrideOnlyGetter.kt b/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/overrideOnlyGetter.kt index b257e7ae6a0..bb86a09234a 100644 --- a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/overrideOnlyGetter.kt +++ b/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/overrideOnlyGetter.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // FILE: JavaClass2.java class JavaClass1 { diff --git a/compiler/testData/codegen/boxAgainstJava/throws/delegationAndThrows.kt b/compiler/testData/codegen/boxAgainstJava/throws/delegationAndThrows.kt index fff6cb67ef1..6a2d41ff92e 100644 --- a/compiler/testData/codegen/boxAgainstJava/throws/delegationAndThrows.kt +++ b/compiler/testData/codegen/boxAgainstJava/throws/delegationAndThrows.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME // FILE: A.java diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractFirBlackBoxAgainstJavaCodegenTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractFirBlackBoxAgainstJavaCodegenTest.kt new file mode 100644 index 00000000000..61f293c1736 --- /dev/null +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractFirBlackBoxAgainstJavaCodegenTest.kt @@ -0,0 +1,18 @@ +/* + * Copyright 2010-2019 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.ir + +import org.jetbrains.kotlin.config.CommonConfigurationKeys +import org.jetbrains.kotlin.config.CompilerConfiguration +import org.jetbrains.kotlin.config.JVMConfigurationKeys + +abstract class AbstractFirBlackBoxAgainstJavaCodegenTest : AbstractIrBlackBoxAgainstJavaCodegenTest() { + override fun updateConfiguration(configuration: CompilerConfiguration) { + super.updateConfiguration(configuration) + configuration.put(CommonConfigurationKeys.USE_FIR, true) + configuration.put(JVMConfigurationKeys.IR, true) + } +} diff --git a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt index 4653bf51975..e13394bd3e3 100644 --- a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt +++ b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt @@ -538,6 +538,10 @@ fun main(args: Array) { testClass { model("codegen/boxInline", targetBackend = TargetBackend.JVM_IR, excludeDirs = listOf("oldLanguageVersions")) } + + testClass { + model("codegen/boxAgainstJava", targetBackend = TargetBackend.JVM_IR, excludeDirs = listOf("oldLanguageVersions")) + } } testGroup(