From aaa3fa58452eb98e74b804d4f06138f48f37fc3c Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Mon, 18 Jan 2021 18:00:44 +0300 Subject: [PATCH] [Test] Migrate IrTextTestGenerated to new infrastructure --- .../kotlin/fir/Fir2IrTextTestGenerated.java | 6 +- .../ir/declarations/lazy/IrLazyFunction.kt | 4 + .../test/runners/ir/IrTextTestGenerated.java} | 665 +++++++++++++----- .../backend/classic/JavaCompilerFacade.kt | 13 +- .../backend/handlers/AbstractIrHandler.kt | 13 + .../backend/handlers/IrTextDumpHandler.kt | 116 +++ .../test/directives/CodegenTestDirectives.kt | 13 +- ...ractKotlinCompilerWithTargetBackendTest.kt | 10 +- .../test/runners/ir/AbstractIrTextTest.kt | 66 ++ .../kotlin/ir/AbstractIrTextTestCase.kt | 196 +----- .../org/jetbrains/kotlin/ir/IrVerifier.kt | 201 ++++++ .../kotlin/test/JvmCompilationUtils.kt | 10 +- .../generators/GenerateJUnit3CompilerTests.kt | 4 - .../generators/GenerateJUnit5CompilerTests.kt | 6 +- 14 files changed, 953 insertions(+), 370 deletions(-) rename compiler/{tests-gen/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java => tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/IrTextTestGenerated.java} (91%) create mode 100644 compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/AbstractIrHandler.kt create mode 100644 compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrTextDumpHandler.kt create mode 100644 compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt create mode 100644 compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/ir/IrVerifier.kt diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java index 6459d0e19a0..dfda9c6abff 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java @@ -1063,9 +1063,9 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { runTest("compiler/testData/ir/irText/expressions/interfaceThisRef.kt"); } - @TestMetadata("javaSyntheticGenericPropretyAccess.kt") - public void testJavaSyntheticGenericPropretyAccess() throws Exception { - runTest("compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.kt"); + @TestMetadata("javaSyntheticGenericPropertyAccess.kt") + public void testJavaSyntheticGenericPropertyAccess() throws Exception { + runTest("compiler/testData/ir/irText/expressions/javaSyntheticGenericPropertyAccess.kt"); } @TestMetadata("javaSyntheticPropertyAccess.kt") diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyFunction.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyFunction.kt index 1ca7751f7ff..b575411e7f2 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyFunction.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyFunction.kt @@ -44,6 +44,10 @@ class IrLazyFunction( override val stubGenerator: DeclarationStubGenerator, override val typeTranslator: TypeTranslator, ) : IrSimpleFunction(), IrLazyFunctionBase { + init { + @Suppress("UNUSED_VARIABLE") val x = 1 + } + override var parent: IrDeclarationParent by createLazyParent() override var annotations: List by createLazyAnnotations() diff --git a/compiler/tests-gen/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/IrTextTestGenerated.java similarity index 91% rename from compiler/tests-gen/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java rename to compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/IrTextTestGenerated.java index e64f9d6ebf1..9a902176101 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/IrTextTestGenerated.java @@ -3,728 +3,831 @@ * 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.ir; +package org.jetbrains.kotlin.test.runners.ir; import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.util.KtTestUtil; +import org.jetbrains.kotlin.test.TargetBackend; import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; import java.io.File; import java.util.regex.Pattern; -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ +/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") @TestMetadata("compiler/testData/ir/irText") @TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - +public class IrTextTestGenerated extends AbstractIrTextTest { + @Test public void testAllFilesPresentInIrText() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Nested @TestMetadata("compiler/testData/ir/irText/classes") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Classes extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class Classes extends AbstractIrTextTest { + @Test @TestMetadata("abstractMembers.kt") public void testAbstractMembers() throws Exception { runTest("compiler/testData/ir/irText/classes/abstractMembers.kt"); } + @Test public void testAllFilesPresentInClasses() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/classes"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/classes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("annotationClasses.kt") public void testAnnotationClasses() throws Exception { runTest("compiler/testData/ir/irText/classes/annotationClasses.kt"); } + @Test @TestMetadata("argumentReorderingInDelegatingConstructorCall.kt") public void testArgumentReorderingInDelegatingConstructorCall() throws Exception { runTest("compiler/testData/ir/irText/classes/argumentReorderingInDelegatingConstructorCall.kt"); } + @Test @TestMetadata("clashingFakeOverrideSignatures.kt") public void testClashingFakeOverrideSignatures() throws Exception { runTest("compiler/testData/ir/irText/classes/clashingFakeOverrideSignatures.kt"); } + @Test @TestMetadata("classMembers.kt") public void testClassMembers() throws Exception { runTest("compiler/testData/ir/irText/classes/classMembers.kt"); } + @Test @TestMetadata("classes.kt") public void testClasses() throws Exception { runTest("compiler/testData/ir/irText/classes/classes.kt"); } + @Test @TestMetadata("cloneable.kt") public void testCloneable() throws Exception { runTest("compiler/testData/ir/irText/classes/cloneable.kt"); } + @Test @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { runTest("compiler/testData/ir/irText/classes/companionObject.kt"); } + @Test @TestMetadata("dataClassWithArrayMembers.kt") public void testDataClassWithArrayMembers() throws Exception { runTest("compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt"); } + @Test @TestMetadata("dataClasses.kt") public void testDataClasses() throws Exception { runTest("compiler/testData/ir/irText/classes/dataClasses.kt"); } + @Test @TestMetadata("dataClassesGeneric.kt") public void testDataClassesGeneric() throws Exception { runTest("compiler/testData/ir/irText/classes/dataClassesGeneric.kt"); } + @Test @TestMetadata("delegatedGenericImplementation.kt") public void testDelegatedGenericImplementation() throws Exception { runTest("compiler/testData/ir/irText/classes/delegatedGenericImplementation.kt"); } + @Test @TestMetadata("delegatedImplementation.kt") public void testDelegatedImplementation() throws Exception { runTest("compiler/testData/ir/irText/classes/delegatedImplementation.kt"); } + @Test @TestMetadata("delegatedImplementationOfJavaInterface.kt") public void testDelegatedImplementationOfJavaInterface() throws Exception { runTest("compiler/testData/ir/irText/classes/delegatedImplementationOfJavaInterface.kt"); } + @Test @TestMetadata("delegatedImplementationWithExplicitOverride.kt") public void testDelegatedImplementationWithExplicitOverride() throws Exception { runTest("compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.kt"); } + @Test @TestMetadata("delegatingConstructorCallToTypeAliasConstructor.kt") public void testDelegatingConstructorCallToTypeAliasConstructor() throws Exception { runTest("compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.kt"); } + @Test @TestMetadata("delegatingConstructorCallsInSecondaryConstructors.kt") public void testDelegatingConstructorCallsInSecondaryConstructors() throws Exception { runTest("compiler/testData/ir/irText/classes/delegatingConstructorCallsInSecondaryConstructors.kt"); } + @Test @TestMetadata("enum.kt") public void testEnum() throws Exception { runTest("compiler/testData/ir/irText/classes/enum.kt"); } + @Test @TestMetadata("enumClassModality.kt") public void testEnumClassModality() throws Exception { runTest("compiler/testData/ir/irText/classes/enumClassModality.kt"); } + @Test @TestMetadata("enumWithMultipleCtors.kt") public void testEnumWithMultipleCtors() throws Exception { runTest("compiler/testData/ir/irText/classes/enumWithMultipleCtors.kt"); } + @Test @TestMetadata("enumWithSecondaryCtor.kt") public void testEnumWithSecondaryCtor() throws Exception { runTest("compiler/testData/ir/irText/classes/enumWithSecondaryCtor.kt"); } + @Test @TestMetadata("fakeOverridesForJavaStaticMembers.kt") public void testFakeOverridesForJavaStaticMembers() throws Exception { runTest("compiler/testData/ir/irText/classes/fakeOverridesForJavaStaticMembers.kt"); } + @Test @TestMetadata("implicitNotNullOnDelegatedImplementation.kt") public void testImplicitNotNullOnDelegatedImplementation() throws Exception { runTest("compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.kt"); } + @Test @TestMetadata("initBlock.kt") public void testInitBlock() throws Exception { runTest("compiler/testData/ir/irText/classes/initBlock.kt"); } + @Test @TestMetadata("initVal.kt") public void testInitVal() throws Exception { runTest("compiler/testData/ir/irText/classes/initVal.kt"); } + @Test @TestMetadata("initValInLambda.kt") public void testInitValInLambda() throws Exception { runTest("compiler/testData/ir/irText/classes/initValInLambda.kt"); } + @Test @TestMetadata("initVar.kt") public void testInitVar() throws Exception { runTest("compiler/testData/ir/irText/classes/initVar.kt"); } + @Test @TestMetadata("inlineClass.kt") public void testInlineClass() throws Exception { runTest("compiler/testData/ir/irText/classes/inlineClass.kt"); } + @Test @TestMetadata("inlineClassSyntheticMethods.kt") public void testInlineClassSyntheticMethods() throws Exception { runTest("compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt"); } + @Test @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { runTest("compiler/testData/ir/irText/classes/innerClass.kt"); } + @Test @TestMetadata("innerClassWithDelegatingConstructor.kt") public void testInnerClassWithDelegatingConstructor() throws Exception { runTest("compiler/testData/ir/irText/classes/innerClassWithDelegatingConstructor.kt"); } + @Test @TestMetadata("kt19306.kt") public void testKt19306() throws Exception { runTest("compiler/testData/ir/irText/classes/kt19306.kt"); } + @Test @TestMetadata("kt31649.kt") public void testKt31649() throws Exception { runTest("compiler/testData/ir/irText/classes/kt31649.kt"); } + @Test @TestMetadata("kt43217.kt") public void testKt43217() throws Exception { runTest("compiler/testData/ir/irText/classes/kt43217.kt"); } + @Test @TestMetadata("lambdaInDataClassDefaultParameter.kt") public void testLambdaInDataClassDefaultParameter() throws Exception { runTest("compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt"); } + @Test @TestMetadata("localClasses.kt") public void testLocalClasses() throws Exception { runTest("compiler/testData/ir/irText/classes/localClasses.kt"); } + @Test @TestMetadata("objectLiteralExpressions.kt") public void testObjectLiteralExpressions() throws Exception { runTest("compiler/testData/ir/irText/classes/objectLiteralExpressions.kt"); } + @Test @TestMetadata("objectWithInitializers.kt") public void testObjectWithInitializers() throws Exception { runTest("compiler/testData/ir/irText/classes/objectWithInitializers.kt"); } + @Test @TestMetadata("openDataClass.kt") public void testOpenDataClass() throws Exception { runTest("compiler/testData/ir/irText/classes/openDataClass.kt"); } + @Test @TestMetadata("outerClassAccess.kt") public void testOuterClassAccess() throws Exception { runTest("compiler/testData/ir/irText/classes/outerClassAccess.kt"); } + @Test @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { runTest("compiler/testData/ir/irText/classes/primaryConstructor.kt"); } + @Test @TestMetadata("primaryConstructorWithSuperConstructorCall.kt") public void testPrimaryConstructorWithSuperConstructorCall() throws Exception { runTest("compiler/testData/ir/irText/classes/primaryConstructorWithSuperConstructorCall.kt"); } + @Test @TestMetadata("qualifiedSuperCalls.kt") public void testQualifiedSuperCalls() throws Exception { runTest("compiler/testData/ir/irText/classes/qualifiedSuperCalls.kt"); } + @Test @TestMetadata("sealedClasses.kt") public void testSealedClasses() throws Exception { runTest("compiler/testData/ir/irText/classes/sealedClasses.kt"); } + @Test @TestMetadata("secondaryConstructorWithInitializersFromClassBody.kt") public void testSecondaryConstructorWithInitializersFromClassBody() throws Exception { runTest("compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.kt"); } + @Test @TestMetadata("secondaryConstructors.kt") public void testSecondaryConstructors() throws Exception { runTest("compiler/testData/ir/irText/classes/secondaryConstructors.kt"); } + @Test @TestMetadata("superCalls.kt") public void testSuperCalls() throws Exception { runTest("compiler/testData/ir/irText/classes/superCalls.kt"); } + @Test @TestMetadata("superCallsComposed.kt") public void testSuperCallsComposed() throws Exception { runTest("compiler/testData/ir/irText/classes/superCallsComposed.kt"); } } + @Nested @TestMetadata("compiler/testData/ir/irText/declarations") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Declarations extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class Declarations extends AbstractIrTextTest { + @Test public void testAllFilesPresentInDeclarations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("catchParameterInTopLevelProperty.kt") public void testCatchParameterInTopLevelProperty() throws Exception { runTest("compiler/testData/ir/irText/declarations/catchParameterInTopLevelProperty.kt"); } + @Test @TestMetadata("classLevelProperties.kt") public void testClassLevelProperties() throws Exception { runTest("compiler/testData/ir/irText/declarations/classLevelProperties.kt"); } + @Test @TestMetadata("constValInitializers.kt") public void testConstValInitializers() throws Exception { runTest("compiler/testData/ir/irText/declarations/constValInitializers.kt"); } + @Test @TestMetadata("defaultArguments.kt") public void testDefaultArguments() throws Exception { runTest("compiler/testData/ir/irText/declarations/defaultArguments.kt"); } + @Test @TestMetadata("delegatedProperties.kt") public void testDelegatedProperties() throws Exception { runTest("compiler/testData/ir/irText/declarations/delegatedProperties.kt"); } + @Test @TestMetadata("deprecatedProperty.kt") public void testDeprecatedProperty() throws Exception { runTest("compiler/testData/ir/irText/declarations/deprecatedProperty.kt"); } + @Test @TestMetadata("extensionProperties.kt") public void testExtensionProperties() throws Exception { runTest("compiler/testData/ir/irText/declarations/extensionProperties.kt"); } + @Test @TestMetadata("fakeOverrides.kt") public void testFakeOverrides() throws Exception { runTest("compiler/testData/ir/irText/declarations/fakeOverrides.kt"); } + @Test @TestMetadata("fileWithAnnotations.kt") public void testFileWithAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/fileWithAnnotations.kt"); } + @Test @TestMetadata("fileWithTypeAliasesOnly.kt") public void testFileWithTypeAliasesOnly() throws Exception { runTest("compiler/testData/ir/irText/declarations/fileWithTypeAliasesOnly.kt"); } + @Test @TestMetadata("genericDelegatedProperty.kt") public void testGenericDelegatedProperty() throws Exception { runTest("compiler/testData/ir/irText/declarations/genericDelegatedProperty.kt"); } + @Test @TestMetadata("inlineCollectionOfInlineClass.kt") public void testInlineCollectionOfInlineClass() throws Exception { runTest("compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.kt"); } + @Test @TestMetadata("interfaceProperties.kt") public void testInterfaceProperties() throws Exception { runTest("compiler/testData/ir/irText/declarations/interfaceProperties.kt"); } + @Test @TestMetadata("kt27005.kt") public void testKt27005() throws Exception { runTest("compiler/testData/ir/irText/declarations/kt27005.kt"); } + @Test @TestMetadata("kt29833.kt") public void testKt29833() throws Exception { runTest("compiler/testData/ir/irText/declarations/kt29833.kt"); } + @Test @TestMetadata("kt35550.kt") public void testKt35550() throws Exception { runTest("compiler/testData/ir/irText/declarations/kt35550.kt"); } + @Test @TestMetadata("localClassWithOverrides.kt") public void testLocalClassWithOverrides() throws Exception { runTest("compiler/testData/ir/irText/declarations/localClassWithOverrides.kt"); } + @Test @TestMetadata("localDelegatedProperties.kt") public void testLocalDelegatedProperties() throws Exception { runTest("compiler/testData/ir/irText/declarations/localDelegatedProperties.kt"); } + @Test @TestMetadata("localVarInDoWhile.kt") public void testLocalVarInDoWhile() throws Exception { runTest("compiler/testData/ir/irText/declarations/localVarInDoWhile.kt"); } + @Test @TestMetadata("packageLevelProperties.kt") public void testPackageLevelProperties() throws Exception { runTest("compiler/testData/ir/irText/declarations/packageLevelProperties.kt"); } + @Test @TestMetadata("primaryCtorDefaultArguments.kt") public void testPrimaryCtorDefaultArguments() throws Exception { runTest("compiler/testData/ir/irText/declarations/primaryCtorDefaultArguments.kt"); } + @Test @TestMetadata("primaryCtorProperties.kt") public void testPrimaryCtorProperties() throws Exception { runTest("compiler/testData/ir/irText/declarations/primaryCtorProperties.kt"); } + @Test @TestMetadata("typeAlias.kt") public void testTypeAlias() throws Exception { runTest("compiler/testData/ir/irText/declarations/typeAlias.kt"); } + @Nested @TestMetadata("compiler/testData/ir/irText/declarations/annotations") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Annotations extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class Annotations extends AbstractIrTextTest { + @Test public void testAllFilesPresentInAnnotations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/annotations"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("annotationsInAnnotationArguments.kt") public void testAnnotationsInAnnotationArguments() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/annotationsInAnnotationArguments.kt"); } + @Test @TestMetadata("annotationsOnDelegatedMembers.kt") public void testAnnotationsOnDelegatedMembers() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.kt"); } + @Test @TestMetadata("annotationsWithDefaultParameterValues.kt") public void testAnnotationsWithDefaultParameterValues() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.kt"); } + @Test @TestMetadata("annotationsWithVarargParameters.kt") public void testAnnotationsWithVarargParameters() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.kt"); } + @Test @TestMetadata("arrayInAnnotationArguments.kt") public void testArrayInAnnotationArguments() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.kt"); } + @Test @TestMetadata("classLiteralInAnnotation.kt") public void testClassLiteralInAnnotation() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/classLiteralInAnnotation.kt"); } + @Test @TestMetadata("classesWithAnnotations.kt") public void testClassesWithAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.kt"); } + @Test @TestMetadata("constExpressionsInAnnotationArguments.kt") public void testConstExpressionsInAnnotationArguments() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/constExpressionsInAnnotationArguments.kt"); } + @Test @TestMetadata("constructorsWithAnnotations.kt") public void testConstructorsWithAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/constructorsWithAnnotations.kt"); } + @Test @TestMetadata("delegateFieldWithAnnotations.kt") public void testDelegateFieldWithAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.kt"); } + @Test @TestMetadata("delegatedPropertyAccessorsWithAnnotations.kt") public void testDelegatedPropertyAccessorsWithAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.kt"); } + @Test @TestMetadata("enumEntriesWithAnnotations.kt") public void testEnumEntriesWithAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.kt"); } + @Test @TestMetadata("enumsInAnnotationArguments.kt") public void testEnumsInAnnotationArguments() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.kt"); } + @Test @TestMetadata("fieldsWithAnnotations.kt") public void testFieldsWithAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.kt"); } + @Test @TestMetadata("fileAnnotations.kt") public void testFileAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/fileAnnotations.kt"); } + @Test @TestMetadata("functionsWithAnnotations.kt") public void testFunctionsWithAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/functionsWithAnnotations.kt"); } + @Test @TestMetadata("inheritingDeprecation.kt") public void testInheritingDeprecation() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/inheritingDeprecation.kt"); } + @Test @TestMetadata("javaAnnotation.kt") public void testJavaAnnotation() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/javaAnnotation.kt"); } + @Test @TestMetadata("localDelegatedPropertiesWithAnnotations.kt") public void testLocalDelegatedPropertiesWithAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.kt"); } + @Test @TestMetadata("multipleAnnotationsInSquareBrackets.kt") public void testMultipleAnnotationsInSquareBrackets() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.kt"); } + @Test @TestMetadata("primaryConstructorParameterWithAnnotations.kt") public void testPrimaryConstructorParameterWithAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/primaryConstructorParameterWithAnnotations.kt"); } + @Test @TestMetadata("propertiesWithAnnotations.kt") public void testPropertiesWithAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.kt"); } + @Test @TestMetadata("propertyAccessorsFromClassHeaderWithAnnotations.kt") public void testPropertyAccessorsFromClassHeaderWithAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.kt"); } + @Test @TestMetadata("propertyAccessorsWithAnnotations.kt") public void testPropertyAccessorsWithAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.kt"); } + @Test @TestMetadata("propertySetterParameterWithAnnotations.kt") public void testPropertySetterParameterWithAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/propertySetterParameterWithAnnotations.kt"); } + @Test @TestMetadata("receiverParameterWithAnnotations.kt") public void testReceiverParameterWithAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.kt"); } + @Test @TestMetadata("spreadOperatorInAnnotationArguments.kt") public void testSpreadOperatorInAnnotationArguments() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.kt"); } + @Test @TestMetadata("typeAliasesWithAnnotations.kt") public void testTypeAliasesWithAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.kt"); } + @Test @TestMetadata("typeParametersWithAnnotations.kt") public void testTypeParametersWithAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.kt"); } + @Test @TestMetadata("valueParametersWithAnnotations.kt") public void testValueParametersWithAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.kt"); } + @Test @TestMetadata("varargsInAnnotationArguments.kt") public void testVarargsInAnnotationArguments() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.kt"); } + @Test @TestMetadata("variablesWithAnnotations.kt") public void testVariablesWithAnnotations() throws Exception { runTest("compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.kt"); } } + @Nested @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Multiplatform extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class Multiplatform extends AbstractIrTextTest { + @Test public void testAllFilesPresentInMultiplatform() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("expectClassInherited.kt") public void testExpectClassInherited() throws Exception { runTest("compiler/testData/ir/irText/declarations/multiplatform/expectClassInherited.kt"); } + @Test @TestMetadata("expectedEnumClass.kt") public void testExpectedEnumClass() throws Exception { runTest("compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.kt"); } + @Test @TestMetadata("expectedSealedClass.kt") public void testExpectedSealedClass() throws Exception { runTest("compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.kt"); } } + @Nested @TestMetadata("compiler/testData/ir/irText/declarations/parameters") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Parameters extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class Parameters extends AbstractIrTextTest { + @Test public void testAllFilesPresentInParameters() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/parameters"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/parameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("class.kt") public void testClass() throws Exception { runTest("compiler/testData/ir/irText/declarations/parameters/class.kt"); } + @Test @TestMetadata("constructor.kt") public void testConstructor() throws Exception { runTest("compiler/testData/ir/irText/declarations/parameters/constructor.kt"); } + @Test @TestMetadata("dataClassMembers.kt") public void testDataClassMembers() throws Exception { runTest("compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt"); } + @Test @TestMetadata("defaultPropertyAccessors.kt") public void testDefaultPropertyAccessors() throws Exception { runTest("compiler/testData/ir/irText/declarations/parameters/defaultPropertyAccessors.kt"); } + @Test @TestMetadata("delegatedMembers.kt") public void testDelegatedMembers() throws Exception { runTest("compiler/testData/ir/irText/declarations/parameters/delegatedMembers.kt"); } + @Test @TestMetadata("fun.kt") public void testFun() throws Exception { runTest("compiler/testData/ir/irText/declarations/parameters/fun.kt"); } + @Test @TestMetadata("genericInnerClass.kt") public void testGenericInnerClass() throws Exception { runTest("compiler/testData/ir/irText/declarations/parameters/genericInnerClass.kt"); } + @Test @TestMetadata("lambdas.kt") public void testLambdas() throws Exception { runTest("compiler/testData/ir/irText/declarations/parameters/lambdas.kt"); } + @Test @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { runTest("compiler/testData/ir/irText/declarations/parameters/localFun.kt"); } + @Test @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { runTest("compiler/testData/ir/irText/declarations/parameters/propertyAccessors.kt"); } + @Test @TestMetadata("typeParameterBeforeBound.kt") public void testTypeParameterBeforeBound() throws Exception { runTest("compiler/testData/ir/irText/declarations/parameters/typeParameterBeforeBound.kt"); } + @Test @TestMetadata("typeParameterBoundedBySubclass.kt") public void testTypeParameterBoundedBySubclass() throws Exception { runTest("compiler/testData/ir/irText/declarations/parameters/typeParameterBoundedBySubclass.kt"); } + @Test @TestMetadata("useNextParamInLambda.kt") public void testUseNextParamInLambda() throws Exception { runTest("compiler/testData/ir/irText/declarations/parameters/useNextParamInLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/ir/irText/declarations/provideDelegate") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProvideDelegate extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class ProvideDelegate extends AbstractIrTextTest { + @Test public void testAllFilesPresentInProvideDelegate() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/provideDelegate"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/provideDelegate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("differentReceivers.kt") public void testDifferentReceivers() throws Exception { runTest("compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.kt"); } + @Test @TestMetadata("local.kt") public void testLocal() throws Exception { runTest("compiler/testData/ir/irText/declarations/provideDelegate/local.kt"); } + @Test @TestMetadata("localDifferentReceivers.kt") public void testLocalDifferentReceivers() throws Exception { runTest("compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.kt"); } + @Test @TestMetadata("member.kt") public void testMember() throws Exception { runTest("compiler/testData/ir/irText/declarations/provideDelegate/member.kt"); } + @Test @TestMetadata("memberExtension.kt") public void testMemberExtension() throws Exception { runTest("compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.kt"); } + @Test @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { runTest("compiler/testData/ir/irText/declarations/provideDelegate/topLevel.kt"); @@ -732,1037 +835,1211 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { } } + @Nested @TestMetadata("compiler/testData/ir/irText/errors") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Errors extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class Errors extends AbstractIrTextTest { + @Test public void testAllFilesPresentInErrors() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/errors"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/errors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("suppressedNonPublicCall.kt") public void testSuppressedNonPublicCall() throws Exception { runTest("compiler/testData/ir/irText/errors/suppressedNonPublicCall.kt"); } + @Test @TestMetadata("unresolvedReference.kt") public void testUnresolvedReference() throws Exception { runTest("compiler/testData/ir/irText/errors/unresolvedReference.kt"); } } + @Nested @TestMetadata("compiler/testData/ir/irText/expressions") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Expressions extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class Expressions extends AbstractIrTextTest { + @Test public void testAllFilesPresentInExpressions() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("argumentMappedWithError.kt") public void testArgumentMappedWithError() throws Exception { runTest("compiler/testData/ir/irText/expressions/argumentMappedWithError.kt"); } + @Test @TestMetadata("arrayAccess.kt") public void testArrayAccess() throws Exception { runTest("compiler/testData/ir/irText/expressions/arrayAccess.kt"); } + @Test @TestMetadata("arrayAssignment.kt") public void testArrayAssignment() throws Exception { runTest("compiler/testData/ir/irText/expressions/arrayAssignment.kt"); } + @Test @TestMetadata("arrayAugmentedAssignment1.kt") public void testArrayAugmentedAssignment1() throws Exception { runTest("compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.kt"); } + @Test @TestMetadata("arrayAugmentedAssignment2.kt") public void testArrayAugmentedAssignment2() throws Exception { runTest("compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.kt"); } + @Test @TestMetadata("assignments.kt") public void testAssignments() throws Exception { runTest("compiler/testData/ir/irText/expressions/assignments.kt"); } + @Test @TestMetadata("augmentedAssignment1.kt") public void testAugmentedAssignment1() throws Exception { runTest("compiler/testData/ir/irText/expressions/augmentedAssignment1.kt"); } + @Test @TestMetadata("augmentedAssignment2.kt") public void testAugmentedAssignment2() throws Exception { runTest("compiler/testData/ir/irText/expressions/augmentedAssignment2.kt"); } + @Test @TestMetadata("augmentedAssignmentWithExpression.kt") public void testAugmentedAssignmentWithExpression() throws Exception { runTest("compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.kt"); } + @Test @TestMetadata("badBreakContinue.kt") public void testBadBreakContinue() throws Exception { runTest("compiler/testData/ir/irText/expressions/badBreakContinue.kt"); } + @Test @TestMetadata("bangbang.kt") public void testBangbang() throws Exception { runTest("compiler/testData/ir/irText/expressions/bangbang.kt"); } + @Test @TestMetadata("booleanConstsInAndAndOrOr.kt") public void testBooleanConstsInAndAndOrOr() throws Exception { runTest("compiler/testData/ir/irText/expressions/booleanConstsInAndAndOrOr.kt"); } + @Test @TestMetadata("booleanOperators.kt") public void testBooleanOperators() throws Exception { runTest("compiler/testData/ir/irText/expressions/booleanOperators.kt"); } + @Test @TestMetadata("boundCallableReferences.kt") public void testBoundCallableReferences() throws Exception { runTest("compiler/testData/ir/irText/expressions/boundCallableReferences.kt"); } + @Test @TestMetadata("boxOk.kt") public void testBoxOk() throws Exception { runTest("compiler/testData/ir/irText/expressions/boxOk.kt"); } + @Test @TestMetadata("breakContinue.kt") public void testBreakContinue() throws Exception { runTest("compiler/testData/ir/irText/expressions/breakContinue.kt"); } + @Test @TestMetadata("breakContinueInLoopHeader.kt") public void testBreakContinueInLoopHeader() throws Exception { runTest("compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.kt"); } + @Test @TestMetadata("breakContinueInWhen.kt") public void testBreakContinueInWhen() throws Exception { runTest("compiler/testData/ir/irText/expressions/breakContinueInWhen.kt"); } + @Test @TestMetadata("callWithReorderedArguments.kt") public void testCallWithReorderedArguments() throws Exception { runTest("compiler/testData/ir/irText/expressions/callWithReorderedArguments.kt"); } + @Test @TestMetadata("calls.kt") public void testCalls() throws Exception { runTest("compiler/testData/ir/irText/expressions/calls.kt"); } + @Test @TestMetadata("castToTypeParameter.kt") public void testCastToTypeParameter() throws Exception { runTest("compiler/testData/ir/irText/expressions/castToTypeParameter.kt"); } + @Test @TestMetadata("catchParameterAccess.kt") public void testCatchParameterAccess() throws Exception { runTest("compiler/testData/ir/irText/expressions/catchParameterAccess.kt"); } + @Test @TestMetadata("chainOfSafeCalls.kt") public void testChainOfSafeCalls() throws Exception { runTest("compiler/testData/ir/irText/expressions/chainOfSafeCalls.kt"); } + @Test @TestMetadata("classReference.kt") public void testClassReference() throws Exception { runTest("compiler/testData/ir/irText/expressions/classReference.kt"); } + @Test @TestMetadata("coercionToUnit.kt") public void testCoercionToUnit() throws Exception { runTest("compiler/testData/ir/irText/expressions/coercionToUnit.kt"); } + @Test @TestMetadata("complexAugmentedAssignment.kt") public void testComplexAugmentedAssignment() throws Exception { runTest("compiler/testData/ir/irText/expressions/complexAugmentedAssignment.kt"); } + @Test @TestMetadata("constructorWithOwnTypeParametersCall.kt") public void testConstructorWithOwnTypeParametersCall() throws Exception { runTest("compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.kt"); } + @Test @TestMetadata("contructorCall.kt") public void testContructorCall() throws Exception { runTest("compiler/testData/ir/irText/expressions/contructorCall.kt"); } + @Test @TestMetadata("conventionComparisons.kt") public void testConventionComparisons() throws Exception { runTest("compiler/testData/ir/irText/expressions/conventionComparisons.kt"); } + @Test @TestMetadata("destructuring1.kt") public void testDestructuring1() throws Exception { runTest("compiler/testData/ir/irText/expressions/destructuring1.kt"); } + @Test @TestMetadata("destructuringWithUnderscore.kt") public void testDestructuringWithUnderscore() throws Exception { runTest("compiler/testData/ir/irText/expressions/destructuringWithUnderscore.kt"); } + @Test @TestMetadata("dotQualified.kt") public void testDotQualified() throws Exception { runTest("compiler/testData/ir/irText/expressions/dotQualified.kt"); } + @Test @TestMetadata("elvis.kt") public void testElvis() throws Exception { runTest("compiler/testData/ir/irText/expressions/elvis.kt"); } + @Test @TestMetadata("enumEntryAsReceiver.kt") public void testEnumEntryAsReceiver() throws Exception { runTest("compiler/testData/ir/irText/expressions/enumEntryAsReceiver.kt"); } + @Test @TestMetadata("enumEntryReferenceFromEnumEntryClass.kt") public void testEnumEntryReferenceFromEnumEntryClass() throws Exception { runTest("compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.kt"); } + @Test @TestMetadata("equality.kt") public void testEquality() throws Exception { runTest("compiler/testData/ir/irText/expressions/equality.kt"); } + @Test @TestMetadata("equals.kt") public void testEquals() throws Exception { runTest("compiler/testData/ir/irText/expressions/equals.kt"); } + @Test @TestMetadata("exhaustiveWhenElseBranch.kt") public void testExhaustiveWhenElseBranch() throws Exception { runTest("compiler/testData/ir/irText/expressions/exhaustiveWhenElseBranch.kt"); } + @Test @TestMetadata("extFunInvokeAsFun.kt") public void testExtFunInvokeAsFun() throws Exception { runTest("compiler/testData/ir/irText/expressions/extFunInvokeAsFun.kt"); } + @Test @TestMetadata("extFunSafeInvoke.kt") public void testExtFunSafeInvoke() throws Exception { runTest("compiler/testData/ir/irText/expressions/extFunSafeInvoke.kt"); } + @Test @TestMetadata("extensionPropertyGetterCall.kt") public void testExtensionPropertyGetterCall() throws Exception { runTest("compiler/testData/ir/irText/expressions/extensionPropertyGetterCall.kt"); } + @Test @TestMetadata("field.kt") public void testField() throws Exception { runTest("compiler/testData/ir/irText/expressions/field.kt"); } + @Test @TestMetadata("for.kt") public void testFor() throws Exception { runTest("compiler/testData/ir/irText/expressions/for.kt"); } + @Test @TestMetadata("forWithBreakContinue.kt") public void testForWithBreakContinue() throws Exception { runTest("compiler/testData/ir/irText/expressions/forWithBreakContinue.kt"); } + @Test @TestMetadata("forWithImplicitReceivers.kt") public void testForWithImplicitReceivers() throws Exception { runTest("compiler/testData/ir/irText/expressions/forWithImplicitReceivers.kt"); } + @Test @TestMetadata("funImportedFromObject.kt") public void testFunImportedFromObject() throws Exception { runTest("compiler/testData/ir/irText/expressions/funImportedFromObject.kt"); } + @Test @TestMetadata("genericConstructorCallWithTypeArguments.kt") public void testGenericConstructorCallWithTypeArguments() throws Exception { runTest("compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.kt"); } + @Test @TestMetadata("genericPropertyCall.kt") public void testGenericPropertyCall() throws Exception { runTest("compiler/testData/ir/irText/expressions/genericPropertyCall.kt"); } + @Test @TestMetadata("genericPropertyRef.kt") public void testGenericPropertyRef() throws Exception { runTest("compiler/testData/ir/irText/expressions/genericPropertyRef.kt"); } + @Test @TestMetadata("identity.kt") public void testIdentity() throws Exception { runTest("compiler/testData/ir/irText/expressions/identity.kt"); } + @Test @TestMetadata("ifElseIf.kt") public void testIfElseIf() throws Exception { runTest("compiler/testData/ir/irText/expressions/ifElseIf.kt"); } + @Test @TestMetadata("implicitCastInReturnFromConstructor.kt") public void testImplicitCastInReturnFromConstructor() throws Exception { runTest("compiler/testData/ir/irText/expressions/implicitCastInReturnFromConstructor.kt"); } + @Test @TestMetadata("implicitCastOnPlatformType.kt") public void testImplicitCastOnPlatformType() throws Exception { runTest("compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.kt"); } + @Test @TestMetadata("implicitCastToNonNull.kt") public void testImplicitCastToNonNull() throws Exception { runTest("compiler/testData/ir/irText/expressions/implicitCastToNonNull.kt"); } + @Test @TestMetadata("implicitCastToTypeParameter.kt") public void testImplicitCastToTypeParameter() throws Exception { runTest("compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.kt"); } + @Test @TestMetadata("implicitNotNullInDestructuringAssignment.kt") public void testImplicitNotNullInDestructuringAssignment() throws Exception { runTest("compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.kt"); } + @Test @TestMetadata("in.kt") public void testIn() throws Exception { runTest("compiler/testData/ir/irText/expressions/in.kt"); } + @Test @TestMetadata("incrementDecrement.kt") public void testIncrementDecrement() throws Exception { runTest("compiler/testData/ir/irText/expressions/incrementDecrement.kt"); } + @Test @TestMetadata("interfaceThisRef.kt") public void testInterfaceThisRef() throws Exception { runTest("compiler/testData/ir/irText/expressions/interfaceThisRef.kt"); } + @Test @TestMetadata("javaSyntheticGenericPropretyAccess.kt") public void testJavaSyntheticGenericPropretyAccess() throws Exception { runTest("compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.kt"); } + @Test @TestMetadata("javaSyntheticPropertyAccess.kt") public void testJavaSyntheticPropertyAccess() throws Exception { runTest("compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.kt"); } + @Test @TestMetadata("jvmFieldReferenceWithIntersectionTypes.kt") public void testJvmFieldReferenceWithIntersectionTypes() throws Exception { runTest("compiler/testData/ir/irText/expressions/jvmFieldReferenceWithIntersectionTypes.kt"); } + @Test @TestMetadata("jvmInstanceFieldReference.kt") public void testJvmInstanceFieldReference() throws Exception { runTest("compiler/testData/ir/irText/expressions/jvmInstanceFieldReference.kt"); } + @Test @TestMetadata("jvmStaticFieldReference.kt") public void testJvmStaticFieldReference() throws Exception { runTest("compiler/testData/ir/irText/expressions/jvmStaticFieldReference.kt"); } + @Test @TestMetadata("kt16904.kt") public void testKt16904() throws Exception { runTest("compiler/testData/ir/irText/expressions/kt16904.kt"); } + @Test @TestMetadata("kt16905.kt") public void testKt16905() throws Exception { runTest("compiler/testData/ir/irText/expressions/kt16905.kt"); } + @Test @TestMetadata("kt23030.kt") public void testKt23030() throws Exception { runTest("compiler/testData/ir/irText/expressions/kt23030.kt"); } + @Test @TestMetadata("kt24804.kt") public void testKt24804() throws Exception { runTest("compiler/testData/ir/irText/expressions/kt24804.kt"); } + @Test @TestMetadata("kt27933.kt") public void testKt27933() throws Exception { runTest("compiler/testData/ir/irText/expressions/kt27933.kt"); } + @Test @TestMetadata("kt28006.kt") public void testKt28006() throws Exception { runTest("compiler/testData/ir/irText/expressions/kt28006.kt"); } + @Test @TestMetadata("kt28456.kt") public void testKt28456() throws Exception { runTest("compiler/testData/ir/irText/expressions/kt28456.kt"); } + @Test @TestMetadata("kt28456a.kt") public void testKt28456a() throws Exception { runTest("compiler/testData/ir/irText/expressions/kt28456a.kt"); } + @Test @TestMetadata("kt28456b.kt") public void testKt28456b() throws Exception { runTest("compiler/testData/ir/irText/expressions/kt28456b.kt"); } + @Test @TestMetadata("kt30020.kt") public void testKt30020() throws Exception { runTest("compiler/testData/ir/irText/expressions/kt30020.kt"); } + @Test @TestMetadata("kt30796.kt") public void testKt30796() throws Exception { runTest("compiler/testData/ir/irText/expressions/kt30796.kt"); } + @Test @TestMetadata("kt35730.kt") public void testKt35730() throws Exception { runTest("compiler/testData/ir/irText/expressions/kt35730.kt"); } + @Test @TestMetadata("kt36956.kt") public void testKt36956() throws Exception { runTest("compiler/testData/ir/irText/expressions/kt36956.kt"); } + @Test @TestMetadata("kt36963.kt") public void testKt36963() throws Exception { runTest("compiler/testData/ir/irText/expressions/kt36963.kt"); } + @Test @TestMetadata("kt37570.kt") public void testKt37570() throws Exception { runTest("compiler/testData/ir/irText/expressions/kt37570.kt"); } + @Test @TestMetadata("kt37779.kt") public void testKt37779() throws Exception { runTest("compiler/testData/ir/irText/expressions/kt37779.kt"); } + @Test @TestMetadata("lambdaInCAO.kt") public void testLambdaInCAO() throws Exception { runTest("compiler/testData/ir/irText/expressions/lambdaInCAO.kt"); } + @Test @TestMetadata("literals.kt") public void testLiterals() throws Exception { runTest("compiler/testData/ir/irText/expressions/literals.kt"); } + @Test @TestMetadata("memberTypeArguments.kt") public void testMemberTypeArguments() throws Exception { runTest("compiler/testData/ir/irText/expressions/memberTypeArguments.kt"); } + @Test @TestMetadata("membersImportedFromObject.kt") public void testMembersImportedFromObject() throws Exception { runTest("compiler/testData/ir/irText/expressions/membersImportedFromObject.kt"); } + @Test @TestMetadata("multipleSmartCasts.kt") public void testMultipleSmartCasts() throws Exception { runTest("compiler/testData/ir/irText/expressions/multipleSmartCasts.kt"); } + @Test @TestMetadata("multipleThisReferences.kt") public void testMultipleThisReferences() throws Exception { runTest("compiler/testData/ir/irText/expressions/multipleThisReferences.kt"); } + @Test @TestMetadata("nullCheckOnGenericLambdaReturn.kt") public void testNullCheckOnGenericLambdaReturn() throws Exception { runTest("compiler/testData/ir/irText/expressions/nullCheckOnGenericLambdaReturn.kt"); } + @Test @TestMetadata("nullCheckOnLambdaReturn.kt") public void testNullCheckOnLambdaReturn() throws Exception { runTest("compiler/testData/ir/irText/expressions/nullCheckOnLambdaReturn.kt"); } + @Test @TestMetadata("objectAsCallable.kt") public void testObjectAsCallable() throws Exception { runTest("compiler/testData/ir/irText/expressions/objectAsCallable.kt"); } + @Test @TestMetadata("objectByNameInsideObject.kt") public void testObjectByNameInsideObject() throws Exception { runTest("compiler/testData/ir/irText/expressions/objectByNameInsideObject.kt"); } + @Test @TestMetadata("objectClassReference.kt") public void testObjectClassReference() throws Exception { runTest("compiler/testData/ir/irText/expressions/objectClassReference.kt"); } + @Test @TestMetadata("objectReference.kt") public void testObjectReference() throws Exception { runTest("compiler/testData/ir/irText/expressions/objectReference.kt"); } + @Test @TestMetadata("objectReferenceInClosureInSuperConstructorCall.kt") public void testObjectReferenceInClosureInSuperConstructorCall() throws Exception { runTest("compiler/testData/ir/irText/expressions/objectReferenceInClosureInSuperConstructorCall.kt"); } + @Test @TestMetadata("objectReferenceInFieldInitializer.kt") public void testObjectReferenceInFieldInitializer() throws Exception { runTest("compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.kt"); } + @Test @TestMetadata("outerClassInstanceReference.kt") public void testOuterClassInstanceReference() throws Exception { runTest("compiler/testData/ir/irText/expressions/outerClassInstanceReference.kt"); } + @Test @TestMetadata("primitiveComparisons.kt") public void testPrimitiveComparisons() throws Exception { runTest("compiler/testData/ir/irText/expressions/primitiveComparisons.kt"); } + @Test @TestMetadata("primitivesImplicitConversions.kt") public void testPrimitivesImplicitConversions() throws Exception { runTest("compiler/testData/ir/irText/expressions/primitivesImplicitConversions.kt"); } + @Test @TestMetadata("propertyReferences.kt") public void testPropertyReferences() throws Exception { runTest("compiler/testData/ir/irText/expressions/propertyReferences.kt"); } + @Test @TestMetadata("references.kt") public void testReferences() throws Exception { runTest("compiler/testData/ir/irText/expressions/references.kt"); } + @Test @TestMetadata("reflectionLiterals.kt") public void testReflectionLiterals() throws Exception { runTest("compiler/testData/ir/irText/expressions/reflectionLiterals.kt"); } + @Test @TestMetadata("safeAssignment.kt") public void testSafeAssignment() throws Exception { runTest("compiler/testData/ir/irText/expressions/safeAssignment.kt"); } + @Test @TestMetadata("safeCallWithIncrementDecrement.kt") public void testSafeCallWithIncrementDecrement() throws Exception { runTest("compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.kt"); } + @Test @TestMetadata("safeCalls.kt") public void testSafeCalls() throws Exception { runTest("compiler/testData/ir/irText/expressions/safeCalls.kt"); } + @Test @TestMetadata("setFieldWithImplicitCast.kt") public void testSetFieldWithImplicitCast() throws Exception { runTest("compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.kt"); } + @Test @TestMetadata("signedToUnsignedConversions.kt") public void testSignedToUnsignedConversions() throws Exception { runTest("compiler/testData/ir/irText/expressions/signedToUnsignedConversions.kt"); } + @Test @TestMetadata("simpleOperators.kt") public void testSimpleOperators() throws Exception { runTest("compiler/testData/ir/irText/expressions/simpleOperators.kt"); } + @Test @TestMetadata("simpleUnaryOperators.kt") public void testSimpleUnaryOperators() throws Exception { runTest("compiler/testData/ir/irText/expressions/simpleUnaryOperators.kt"); } + @Test @TestMetadata("smartCasts.kt") public void testSmartCasts() throws Exception { runTest("compiler/testData/ir/irText/expressions/smartCasts.kt"); } + @Test @TestMetadata("smartCastsWithDestructuring.kt") public void testSmartCastsWithDestructuring() throws Exception { runTest("compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.kt"); } + @Test @TestMetadata("specializedTypeAliasConstructorCall.kt") public void testSpecializedTypeAliasConstructorCall() throws Exception { runTest("compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.kt"); } + @Test @TestMetadata("stringComparisons.kt") public void testStringComparisons() throws Exception { runTest("compiler/testData/ir/irText/expressions/stringComparisons.kt"); } + @Test @TestMetadata("stringPlus.kt") public void testStringPlus() throws Exception { runTest("compiler/testData/ir/irText/expressions/stringPlus.kt"); } + @Test @TestMetadata("stringTemplates.kt") public void testStringTemplates() throws Exception { runTest("compiler/testData/ir/irText/expressions/stringTemplates.kt"); } + @Test @TestMetadata("suspendConversionOnArbitraryExpression.kt") public void testSuspendConversionOnArbitraryExpression() throws Exception { runTest("compiler/testData/ir/irText/expressions/suspendConversionOnArbitraryExpression.kt"); } + @Test @TestMetadata("temporaryInEnumEntryInitializer.kt") public void testTemporaryInEnumEntryInitializer() throws Exception { runTest("compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.kt"); } + @Test @TestMetadata("temporaryInInitBlock.kt") public void testTemporaryInInitBlock() throws Exception { runTest("compiler/testData/ir/irText/expressions/temporaryInInitBlock.kt"); } + @Test @TestMetadata("thisOfGenericOuterClass.kt") public void testThisOfGenericOuterClass() throws Exception { runTest("compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.kt"); } + @Test @TestMetadata("thisRefToObjectInNestedClassConstructorCall.kt") public void testThisRefToObjectInNestedClassConstructorCall() throws Exception { runTest("compiler/testData/ir/irText/expressions/thisRefToObjectInNestedClassConstructorCall.kt"); } + @Test @TestMetadata("thisReferenceBeforeClassDeclared.kt") public void testThisReferenceBeforeClassDeclared() throws Exception { runTest("compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.kt"); } + @Test @TestMetadata("throw.kt") public void testThrow() throws Exception { runTest("compiler/testData/ir/irText/expressions/throw.kt"); } + @Test @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { runTest("compiler/testData/ir/irText/expressions/tryCatch.kt"); } + @Test @TestMetadata("tryCatchWithImplicitCast.kt") public void testTryCatchWithImplicitCast() throws Exception { runTest("compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.kt"); } + @Test @TestMetadata("typeAliasConstructorReference.kt") public void testTypeAliasConstructorReference() throws Exception { runTest("compiler/testData/ir/irText/expressions/typeAliasConstructorReference.kt"); } + @Test @TestMetadata("typeArguments.kt") public void testTypeArguments() throws Exception { runTest("compiler/testData/ir/irText/expressions/typeArguments.kt"); } + @Test @TestMetadata("typeOperators.kt") public void testTypeOperators() throws Exception { runTest("compiler/testData/ir/irText/expressions/typeOperators.kt"); } + @Test @TestMetadata("typeParameterClassLiteral.kt") public void testTypeParameterClassLiteral() throws Exception { runTest("compiler/testData/ir/irText/expressions/typeParameterClassLiteral.kt"); } + @Test @TestMetadata("unsignedIntegerLiterals.kt") public void testUnsignedIntegerLiterals() throws Exception { runTest("compiler/testData/ir/irText/expressions/unsignedIntegerLiterals.kt"); } + @Test @TestMetadata("useImportedMember.kt") public void testUseImportedMember() throws Exception { runTest("compiler/testData/ir/irText/expressions/useImportedMember.kt"); } + @Test @TestMetadata("values.kt") public void testValues() throws Exception { runTest("compiler/testData/ir/irText/expressions/values.kt"); } + @Test @TestMetadata("vararg.kt") public void testVararg() throws Exception { runTest("compiler/testData/ir/irText/expressions/vararg.kt"); } + @Test @TestMetadata("varargWithImplicitCast.kt") public void testVarargWithImplicitCast() throws Exception { runTest("compiler/testData/ir/irText/expressions/varargWithImplicitCast.kt"); } + @Test @TestMetadata("variableAsFunctionCall.kt") public void testVariableAsFunctionCall() throws Exception { runTest("compiler/testData/ir/irText/expressions/variableAsFunctionCall.kt"); } + @Test @TestMetadata("variableAsFunctionCallWithGenerics.kt") public void testVariableAsFunctionCallWithGenerics() throws Exception { runTest("compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.kt"); } + @Test @TestMetadata("when.kt") public void testWhen() throws Exception { runTest("compiler/testData/ir/irText/expressions/when.kt"); } + @Test @TestMetadata("whenCoercedToUnit.kt") public void testWhenCoercedToUnit() throws Exception { runTest("compiler/testData/ir/irText/expressions/whenCoercedToUnit.kt"); } + @Test @TestMetadata("whenElse.kt") public void testWhenElse() throws Exception { runTest("compiler/testData/ir/irText/expressions/whenElse.kt"); } + @Test @TestMetadata("whenReturn.kt") public void testWhenReturn() throws Exception { runTest("compiler/testData/ir/irText/expressions/whenReturn.kt"); } + @Test @TestMetadata("whenReturnUnit.kt") public void testWhenReturnUnit() throws Exception { runTest("compiler/testData/ir/irText/expressions/whenReturnUnit.kt"); } + @Test @TestMetadata("whenSmartCastToEnum.kt") public void testWhenSmartCastToEnum() throws Exception { runTest("compiler/testData/ir/irText/expressions/whenSmartCastToEnum.kt"); } + @Test @TestMetadata("whenUnusedExpression.kt") public void testWhenUnusedExpression() throws Exception { runTest("compiler/testData/ir/irText/expressions/whenUnusedExpression.kt"); } + @Test @TestMetadata("whenWithSubjectVariable.kt") public void testWhenWithSubjectVariable() throws Exception { runTest("compiler/testData/ir/irText/expressions/whenWithSubjectVariable.kt"); } + @Test @TestMetadata("whileDoWhile.kt") public void testWhileDoWhile() throws Exception { runTest("compiler/testData/ir/irText/expressions/whileDoWhile.kt"); } + @Nested @TestMetadata("compiler/testData/ir/irText/expressions/callableReferences") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReferences extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class CallableReferences extends AbstractIrTextTest { + @Test @TestMetadata("adaptedExtensionFunctions.kt") public void testAdaptedExtensionFunctions() throws Exception { runTest("compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.kt"); } + @Test @TestMetadata("adaptedWithCoercionToUnit.kt") public void testAdaptedWithCoercionToUnit() throws Exception { runTest("compiler/testData/ir/irText/expressions/callableReferences/adaptedWithCoercionToUnit.kt"); } + @Test public void testAllFilesPresentInCallableReferences() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/callableReferences"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/callableReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("boundInlineAdaptedReference.kt") public void testBoundInlineAdaptedReference() throws Exception { runTest("compiler/testData/ir/irText/expressions/callableReferences/boundInlineAdaptedReference.kt"); } + @Test @TestMetadata("boundInnerGenericConstructor.kt") public void testBoundInnerGenericConstructor() throws Exception { runTest("compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.kt"); } + @Test @TestMetadata("caoWithAdaptationForSam.kt") public void testCaoWithAdaptationForSam() throws Exception { runTest("compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.kt"); } + @Test @TestMetadata("constructorWithAdaptedArguments.kt") public void testConstructorWithAdaptedArguments() throws Exception { runTest("compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.kt"); } + @Test @TestMetadata("funWithDefaultParametersAsKCallableStar.kt") public void testFunWithDefaultParametersAsKCallableStar() throws Exception { runTest("compiler/testData/ir/irText/expressions/callableReferences/funWithDefaultParametersAsKCallableStar.kt"); } + @Test @TestMetadata("genericLocalClassConstructorReference.kt") public void testGenericLocalClassConstructorReference() throws Exception { runTest("compiler/testData/ir/irText/expressions/callableReferences/genericLocalClassConstructorReference.kt"); } + @Test @TestMetadata("genericMember.kt") public void testGenericMember() throws Exception { runTest("compiler/testData/ir/irText/expressions/callableReferences/genericMember.kt"); } + @Test @TestMetadata("importedFromObject.kt") public void testImportedFromObject() throws Exception { runTest("compiler/testData/ir/irText/expressions/callableReferences/importedFromObject.kt"); } + @Test @TestMetadata("kt37131.kt") public void testKt37131() throws Exception { runTest("compiler/testData/ir/irText/expressions/callableReferences/kt37131.kt"); } + @Test @TestMetadata("suspendConversion.kt") public void testSuspendConversion() throws Exception { runTest("compiler/testData/ir/irText/expressions/callableReferences/suspendConversion.kt"); } + @Test @TestMetadata("typeArguments.kt") public void testTypeArguments() throws Exception { runTest("compiler/testData/ir/irText/expressions/callableReferences/typeArguments.kt"); } + @Test @TestMetadata("unboundMemberReferenceWithAdaptedArguments.kt") public void testUnboundMemberReferenceWithAdaptedArguments() throws Exception { runTest("compiler/testData/ir/irText/expressions/callableReferences/unboundMemberReferenceWithAdaptedArguments.kt"); } + @Test @TestMetadata("withAdaptationForSam.kt") public void testWithAdaptationForSam() throws Exception { runTest("compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.kt"); } + @Test @TestMetadata("withAdaptedArguments.kt") public void testWithAdaptedArguments() throws Exception { runTest("compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.kt"); } + @Test @TestMetadata("withArgumentAdaptationAndReceiver.kt") public void testWithArgumentAdaptationAndReceiver() throws Exception { runTest("compiler/testData/ir/irText/expressions/callableReferences/withArgumentAdaptationAndReceiver.kt"); } + @Test @TestMetadata("withVarargViewedAsArray.kt") public void testWithVarargViewedAsArray() throws Exception { runTest("compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt"); } } + @Nested @TestMetadata("compiler/testData/ir/irText/expressions/floatingPointComparisons") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FloatingPointComparisons extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class FloatingPointComparisons extends AbstractIrTextTest { + @Test public void testAllFilesPresentInFloatingPointComparisons() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/floatingPointComparisons"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/floatingPointComparisons"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("comparableWithDoubleOrFloat.kt") public void testComparableWithDoubleOrFloat() throws Exception { runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/comparableWithDoubleOrFloat.kt"); } + @Test @TestMetadata("eqeqRhsConditionPossiblyAffectingLhs.kt") public void testEqeqRhsConditionPossiblyAffectingLhs() throws Exception { runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/eqeqRhsConditionPossiblyAffectingLhs.kt"); } + @Test @TestMetadata("floatingPointCompareTo.kt") public void testFloatingPointCompareTo() throws Exception { runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointCompareTo.kt"); } + @Test @TestMetadata("floatingPointEqeq.kt") public void testFloatingPointEqeq() throws Exception { runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEqeq.kt"); } + @Test @TestMetadata("floatingPointEquals.kt") public void testFloatingPointEquals() throws Exception { runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.kt"); } + @Test @TestMetadata("floatingPointExcleq.kt") public void testFloatingPointExcleq() throws Exception { runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointExcleq.kt"); } + @Test @TestMetadata("floatingPointLess.kt") public void testFloatingPointLess() throws Exception { runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointLess.kt"); } + @Test @TestMetadata("nullableAnyAsIntToDouble.kt") public void testNullableAnyAsIntToDouble() throws Exception { runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableAnyAsIntToDouble.kt"); } + @Test @TestMetadata("nullableFloatingPointEqeq.kt") public void testNullableFloatingPointEqeq() throws Exception { runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableFloatingPointEqeq.kt"); } + @Test @TestMetadata("typeParameterWithPrimitiveNumericSupertype.kt") public void testTypeParameterWithPrimitiveNumericSupertype() throws Exception { runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/typeParameterWithPrimitiveNumericSupertype.kt"); } + @Test @TestMetadata("whenByFloatingPoint.kt") public void testWhenByFloatingPoint() throws Exception { runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.kt"); } } + @Nested @TestMetadata("compiler/testData/ir/irText/expressions/funInterface") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FunInterface extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class FunInterface extends AbstractIrTextTest { + @Test public void testAllFilesPresentInFunInterface() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("arrayAsVarargAfterSamArgument_fi.kt") public void testArrayAsVarargAfterSamArgument_fi() throws Exception { runTest("compiler/testData/ir/irText/expressions/funInterface/arrayAsVarargAfterSamArgument_fi.kt"); } + @Test @TestMetadata("basicFunInterfaceConversion.kt") public void testBasicFunInterfaceConversion() throws Exception { runTest("compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.kt"); } + @Test @TestMetadata("castFromAny.kt") public void testCastFromAny() throws Exception { runTest("compiler/testData/ir/irText/expressions/funInterface/castFromAny.kt"); } + @Test @TestMetadata("partialSam.kt") public void testPartialSam() throws Exception { runTest("compiler/testData/ir/irText/expressions/funInterface/partialSam.kt"); } + @Test @TestMetadata("samConversionInVarargs.kt") public void testSamConversionInVarargs() throws Exception { runTest("compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.kt"); } + @Test @TestMetadata("samConversionInVarargsMixed.kt") public void testSamConversionInVarargsMixed() throws Exception { runTest("compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargsMixed.kt"); } + @Test @TestMetadata("samConversionOnCallableReference.kt") public void testSamConversionOnCallableReference() throws Exception { runTest("compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.kt"); } + @Test @TestMetadata("samConversionsWithSmartCasts.kt") public void testSamConversionsWithSmartCasts() throws Exception { runTest("compiler/testData/ir/irText/expressions/funInterface/samConversionsWithSmartCasts.kt"); } } + @Nested @TestMetadata("compiler/testData/ir/irText/expressions/sam") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Sam extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class Sam extends AbstractIrTextTest { + @Test public void testAllFilesPresentInSam() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/sam"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("arrayAsVarargAfterSamArgument.kt") public void testArrayAsVarargAfterSamArgument() throws Exception { runTest("compiler/testData/ir/irText/expressions/sam/arrayAsVarargAfterSamArgument.kt"); } + @Test @TestMetadata("genericSamProjectedOut.kt") public void testGenericSamProjectedOut() throws Exception { runTest("compiler/testData/ir/irText/expressions/sam/genericSamProjectedOut.kt"); } + @Test @TestMetadata("genericSamSmartcast.kt") public void testGenericSamSmartcast() throws Exception { runTest("compiler/testData/ir/irText/expressions/sam/genericSamSmartcast.kt"); } + @Test @TestMetadata("samByProjectedType.kt") public void testSamByProjectedType() throws Exception { runTest("compiler/testData/ir/irText/expressions/sam/samByProjectedType.kt"); } + @Test @TestMetadata("samConstructors.kt") public void testSamConstructors() throws Exception { runTest("compiler/testData/ir/irText/expressions/sam/samConstructors.kt"); } + @Test @TestMetadata("samConversionInGenericConstructorCall.kt") public void testSamConversionInGenericConstructorCall() throws Exception { runTest("compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.kt"); } + @Test @TestMetadata("samConversionInGenericConstructorCall_NI.kt") public void testSamConversionInGenericConstructorCall_NI() throws Exception { runTest("compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.kt"); } + @Test @TestMetadata("samConversionToGeneric.kt") public void testSamConversionToGeneric() throws Exception { runTest("compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.kt"); } + @Test @TestMetadata("samConversions.kt") public void testSamConversions() throws Exception { runTest("compiler/testData/ir/irText/expressions/sam/samConversions.kt"); } + @Test @TestMetadata("samConversionsWithSmartCasts.kt") public void testSamConversionsWithSmartCasts() throws Exception { runTest("compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.kt"); } + @Test @TestMetadata("samOperators.kt") public void testSamOperators() throws Exception { runTest("compiler/testData/ir/irText/expressions/sam/samOperators.kt"); @@ -1770,251 +2047,279 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { } } + @Nested @TestMetadata("compiler/testData/ir/irText/firProblems") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FirProblems extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class FirProblems extends AbstractIrTextTest { + @Test @TestMetadata("AbstractMutableMap.kt") public void testAbstractMutableMap() throws Exception { runTest("compiler/testData/ir/irText/firProblems/AbstractMutableMap.kt"); } + @Test @TestMetadata("AllCandidates.kt") public void testAllCandidates() throws Exception { runTest("compiler/testData/ir/irText/firProblems/AllCandidates.kt"); } + @Test public void testAllFilesPresentInFirProblems() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/firProblems"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/firProblems"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("AnnotationInAnnotation.kt") public void testAnnotationInAnnotation() throws Exception { runTest("compiler/testData/ir/irText/firProblems/AnnotationInAnnotation.kt"); } + @Test @TestMetadata("candidateSymbol.kt") public void testCandidateSymbol() throws Exception { runTest("compiler/testData/ir/irText/firProblems/candidateSymbol.kt"); } + @Test @TestMetadata("ClashResolutionDescriptor.kt") public void testClashResolutionDescriptor() throws Exception { runTest("compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.kt"); } + @Test @TestMetadata("coercionToUnitForNestedWhen.kt") public void testCoercionToUnitForNestedWhen() throws Exception { runTest("compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.kt"); } + @Test @TestMetadata("DeepCopyIrTree.kt") public void testDeepCopyIrTree() throws Exception { runTest("compiler/testData/ir/irText/firProblems/DeepCopyIrTree.kt"); } + @Test @TestMetadata("DelegationAndInheritanceFromJava.kt") public void testDelegationAndInheritanceFromJava() throws Exception { runTest("compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.kt"); } + @Test @TestMetadata("deprecated.kt") public void testDeprecated() throws Exception { runTest("compiler/testData/ir/irText/firProblems/deprecated.kt"); } + @Test @TestMetadata("FirBuilder.kt") public void testFirBuilder() throws Exception { runTest("compiler/testData/ir/irText/firProblems/FirBuilder.kt"); } + @Test @TestMetadata("ImplicitReceiverStack.kt") public void testImplicitReceiverStack() throws Exception { runTest("compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt"); } + @Test @TestMetadata("inapplicableCollectionSet.kt") public void testInapplicableCollectionSet() throws Exception { runTest("compiler/testData/ir/irText/firProblems/inapplicableCollectionSet.kt"); } + @Test @TestMetadata("InnerClassInAnonymous.kt") public void testInnerClassInAnonymous() throws Exception { runTest("compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.kt"); } + @Test @TestMetadata("kt43342.kt") public void testKt43342() throws Exception { runTest("compiler/testData/ir/irText/firProblems/kt43342.kt"); } + @Test @TestMetadata("MultiList.kt") public void testMultiList() throws Exception { runTest("compiler/testData/ir/irText/firProblems/MultiList.kt"); } + @Test @TestMetadata("putIfAbsent.kt") public void testPutIfAbsent() throws Exception { runTest("compiler/testData/ir/irText/firProblems/putIfAbsent.kt"); } + @Test @TestMetadata("readWriteProperty.kt") public void testReadWriteProperty() throws Exception { runTest("compiler/testData/ir/irText/firProblems/readWriteProperty.kt"); } + @Test @TestMetadata("recursiveCapturedTypeInPropertyReference.kt") public void testRecursiveCapturedTypeInPropertyReference() throws Exception { runTest("compiler/testData/ir/irText/firProblems/recursiveCapturedTypeInPropertyReference.kt"); } + @Test @TestMetadata("SameJavaFieldReferences.kt") public void testSameJavaFieldReferences() throws Exception { runTest("compiler/testData/ir/irText/firProblems/SameJavaFieldReferences.kt"); } + @Test @TestMetadata("SignatureClash.kt") public void testSignatureClash() throws Exception { runTest("compiler/testData/ir/irText/firProblems/SignatureClash.kt"); } + @Test @TestMetadata("SyntheticSetterType.kt") public void testSyntheticSetterType() throws Exception { runTest("compiler/testData/ir/irText/firProblems/SyntheticSetterType.kt"); } + @Test @TestMetadata("throwableStackTrace.kt") public void testThrowableStackTrace() throws Exception { runTest("compiler/testData/ir/irText/firProblems/throwableStackTrace.kt"); } + @Test @TestMetadata("typeParameterFromJavaClass.kt") public void testTypeParameterFromJavaClass() throws Exception { runTest("compiler/testData/ir/irText/firProblems/typeParameterFromJavaClass.kt"); } + @Test @TestMetadata("typeVariableAfterBuildMap.kt") public void testTypeVariableAfterBuildMap() throws Exception { runTest("compiler/testData/ir/irText/firProblems/typeVariableAfterBuildMap.kt"); } + @Test @TestMetadata("V8ArrayToList.kt") public void testV8ArrayToList() throws Exception { runTest("compiler/testData/ir/irText/firProblems/V8ArrayToList.kt"); } + @Test @TestMetadata("VarInInit.kt") public void testVarInInit() throws Exception { runTest("compiler/testData/ir/irText/firProblems/VarInInit.kt"); } } + @Nested @TestMetadata("compiler/testData/ir/irText/lambdas") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Lambdas extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class Lambdas extends AbstractIrTextTest { + @Test public void testAllFilesPresentInLambdas() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("anonymousFunction.kt") public void testAnonymousFunction() throws Exception { runTest("compiler/testData/ir/irText/lambdas/anonymousFunction.kt"); } + @Test @TestMetadata("destructuringInLambda.kt") public void testDestructuringInLambda() throws Exception { runTest("compiler/testData/ir/irText/lambdas/destructuringInLambda.kt"); } + @Test @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { runTest("compiler/testData/ir/irText/lambdas/extensionLambda.kt"); } + @Test @TestMetadata("justLambda.kt") public void testJustLambda() throws Exception { runTest("compiler/testData/ir/irText/lambdas/justLambda.kt"); } + @Test @TestMetadata("localFunction.kt") public void testLocalFunction() throws Exception { runTest("compiler/testData/ir/irText/lambdas/localFunction.kt"); } + @Test @TestMetadata("multipleImplicitReceivers.kt") public void testMultipleImplicitReceivers() throws Exception { runTest("compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.kt"); } + @Test @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { runTest("compiler/testData/ir/irText/lambdas/nonLocalReturn.kt"); } + @Test @TestMetadata("samAdapter.kt") public void testSamAdapter() throws Exception { runTest("compiler/testData/ir/irText/lambdas/samAdapter.kt"); } } + @Nested @TestMetadata("compiler/testData/ir/irText/regressions") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Regressions extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class Regressions extends AbstractIrTextTest { + @Test public void testAllFilesPresentInRegressions() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/regressions"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/regressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("coercionInLoop.kt") public void testCoercionInLoop() throws Exception { runTest("compiler/testData/ir/irText/regressions/coercionInLoop.kt"); } + @Test @TestMetadata("integerCoercionToT.kt") public void testIntegerCoercionToT() throws Exception { runTest("compiler/testData/ir/irText/regressions/integerCoercionToT.kt"); } + @Test @TestMetadata("kt24114.kt") public void testKt24114() throws Exception { runTest("compiler/testData/ir/irText/regressions/kt24114.kt"); } + @Test @TestMetadata("typeAliasCtorForGenericClass.kt") public void testTypeAliasCtorForGenericClass() throws Exception { runTest("compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.kt"); } + @Test @TestMetadata("typeParametersInImplicitCast.kt") public void testTypeParametersInImplicitCast() throws Exception { runTest("compiler/testData/ir/irText/regressions/typeParametersInImplicitCast.kt"); } + @Nested @TestMetadata("compiler/testData/ir/irText/regressions/newInference") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NewInference extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class NewInference extends AbstractIrTextTest { + @Test public void testAllFilesPresentInNewInference() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/regressions/newInference"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/regressions/newInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("fixationOrder1.kt") public void testFixationOrder1() throws Exception { runTest("compiler/testData/ir/irText/regressions/newInference/fixationOrder1.kt"); @@ -2022,348 +2327,390 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { } } + @Nested @TestMetadata("compiler/testData/ir/irText/singletons") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Singletons extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class Singletons extends AbstractIrTextTest { + @Test public void testAllFilesPresentInSingletons() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/singletons"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/singletons"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("companion.kt") public void testCompanion() throws Exception { runTest("compiler/testData/ir/irText/singletons/companion.kt"); } + @Test @TestMetadata("enumEntry.kt") public void testEnumEntry() throws Exception { runTest("compiler/testData/ir/irText/singletons/enumEntry.kt"); } + @Test @TestMetadata("object.kt") public void testObject() throws Exception { runTest("compiler/testData/ir/irText/singletons/object.kt"); } } + @Nested @TestMetadata("compiler/testData/ir/irText/stubs") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Stubs extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class Stubs extends AbstractIrTextTest { + @Test public void testAllFilesPresentInStubs() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/stubs"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/stubs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("builtinMap.kt") public void testBuiltinMap() throws Exception { runTest("compiler/testData/ir/irText/stubs/builtinMap.kt"); } + @Test @TestMetadata("constFromBuiltins.kt") public void testConstFromBuiltins() throws Exception { runTest("compiler/testData/ir/irText/stubs/constFromBuiltins.kt"); } + @Test @TestMetadata("genericClassInDifferentModule.kt") public void testGenericClassInDifferentModule() throws Exception { runTest("compiler/testData/ir/irText/stubs/genericClassInDifferentModule.kt"); } + @Test @TestMetadata("javaConstructorWithTypeParameters.kt") public void testJavaConstructorWithTypeParameters() throws Exception { runTest("compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.kt"); } + @Test @TestMetadata("javaEnum.kt") public void testJavaEnum() throws Exception { runTest("compiler/testData/ir/irText/stubs/javaEnum.kt"); } + @Test @TestMetadata("javaInnerClass.kt") public void testJavaInnerClass() throws Exception { runTest("compiler/testData/ir/irText/stubs/javaInnerClass.kt"); } + @Test @TestMetadata("javaMethod.kt") public void testJavaMethod() throws Exception { runTest("compiler/testData/ir/irText/stubs/javaMethod.kt"); } + @Test @TestMetadata("javaNestedClass.kt") public void testJavaNestedClass() throws Exception { runTest("compiler/testData/ir/irText/stubs/javaNestedClass.kt"); } + @Test @TestMetadata("javaStaticMethod.kt") public void testJavaStaticMethod() throws Exception { runTest("compiler/testData/ir/irText/stubs/javaStaticMethod.kt"); } + @Test @TestMetadata("javaSyntheticProperty.kt") public void testJavaSyntheticProperty() throws Exception { runTest("compiler/testData/ir/irText/stubs/javaSyntheticProperty.kt"); } + @Test @TestMetadata("jdkClassSyntheticProperty.kt") public void testJdkClassSyntheticProperty() throws Exception { runTest("compiler/testData/ir/irText/stubs/jdkClassSyntheticProperty.kt"); } + @Test @TestMetadata("kotlinInnerClass.kt") public void testKotlinInnerClass() throws Exception { runTest("compiler/testData/ir/irText/stubs/kotlinInnerClass.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/ir/irText/stubs/simple.kt"); } } + @Nested @TestMetadata("compiler/testData/ir/irText/types") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Types extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class Types extends AbstractIrTextTest { + @Test @TestMetadata("abbreviatedTypes.kt") public void testAbbreviatedTypes() throws Exception { runTest("compiler/testData/ir/irText/types/abbreviatedTypes.kt"); } + @Test public void testAllFilesPresentInTypes() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/types"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/types"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("asOnPlatformType.kt") public void testAsOnPlatformType() throws Exception { runTest("compiler/testData/ir/irText/types/asOnPlatformType.kt"); } + @Test @TestMetadata("castsInsideCoroutineInference.kt") public void testCastsInsideCoroutineInference() throws Exception { runTest("compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt"); } + @Test @TestMetadata("coercionToUnitInLambdaReturnValue.kt") public void testCoercionToUnitInLambdaReturnValue() throws Exception { runTest("compiler/testData/ir/irText/types/coercionToUnitInLambdaReturnValue.kt"); } + @Test @TestMetadata("genericDelegatedDeepProperty.kt") public void testGenericDelegatedDeepProperty() throws Exception { runTest("compiler/testData/ir/irText/types/genericDelegatedDeepProperty.kt"); } + @Test @TestMetadata("genericFunWithStar.kt") public void testGenericFunWithStar() throws Exception { runTest("compiler/testData/ir/irText/types/genericFunWithStar.kt"); } + @Test @TestMetadata("genericPropertyReferenceType.kt") public void testGenericPropertyReferenceType() throws Exception { runTest("compiler/testData/ir/irText/types/genericPropertyReferenceType.kt"); } + @Test @TestMetadata("inStarProjectionInReceiverType.kt") public void testInStarProjectionInReceiverType() throws Exception { runTest("compiler/testData/ir/irText/types/inStarProjectionInReceiverType.kt"); } + @Test @TestMetadata("intersectionType1_NI.kt") public void testIntersectionType1_NI() throws Exception { runTest("compiler/testData/ir/irText/types/intersectionType1_NI.kt"); } + @Test @TestMetadata("intersectionType1_OI.kt") public void testIntersectionType1_OI() throws Exception { runTest("compiler/testData/ir/irText/types/intersectionType1_OI.kt"); } + @Test @TestMetadata("intersectionType2_NI.kt") public void testIntersectionType2_NI() throws Exception { runTest("compiler/testData/ir/irText/types/intersectionType2_NI.kt"); } + @Test @TestMetadata("intersectionType2_OI.kt") public void testIntersectionType2_OI() throws Exception { runTest("compiler/testData/ir/irText/types/intersectionType2_OI.kt"); } + @Test @TestMetadata("intersectionType3_NI.kt") public void testIntersectionType3_NI() throws Exception { runTest("compiler/testData/ir/irText/types/intersectionType3_NI.kt"); } + @Test @TestMetadata("intersectionType3_OI.kt") public void testIntersectionType3_OI() throws Exception { runTest("compiler/testData/ir/irText/types/intersectionType3_OI.kt"); } + @Test @TestMetadata("javaWildcardType.kt") public void testJavaWildcardType() throws Exception { runTest("compiler/testData/ir/irText/types/javaWildcardType.kt"); } + @Test @TestMetadata("kt36143.kt") public void testKt36143() throws Exception { runTest("compiler/testData/ir/irText/types/kt36143.kt"); } + @Test @TestMetadata("localVariableOfIntersectionType_NI.kt") public void testLocalVariableOfIntersectionType_NI() throws Exception { runTest("compiler/testData/ir/irText/types/localVariableOfIntersectionType_NI.kt"); } + @Test @TestMetadata("rawTypeInSignature.kt") public void testRawTypeInSignature() throws Exception { runTest("compiler/testData/ir/irText/types/rawTypeInSignature.kt"); } + @Test @TestMetadata("receiverOfIntersectionType.kt") public void testReceiverOfIntersectionType() throws Exception { runTest("compiler/testData/ir/irText/types/receiverOfIntersectionType.kt"); } + @Test @TestMetadata("smartCastOnFakeOverrideReceiver.kt") public void testSmartCastOnFakeOverrideReceiver() throws Exception { runTest("compiler/testData/ir/irText/types/smartCastOnFakeOverrideReceiver.kt"); } + @Test @TestMetadata("smartCastOnFieldReceiverOfGenericType.kt") public void testSmartCastOnFieldReceiverOfGenericType() throws Exception { runTest("compiler/testData/ir/irText/types/smartCastOnFieldReceiverOfGenericType.kt"); } + @Test @TestMetadata("smartCastOnReceiverOfGenericType.kt") public void testSmartCastOnReceiverOfGenericType() throws Exception { runTest("compiler/testData/ir/irText/types/smartCastOnReceiverOfGenericType.kt"); } + @Test @TestMetadata("starProjection_OI.kt") public void testStarProjection_OI() throws Exception { runTest("compiler/testData/ir/irText/types/starProjection_OI.kt"); } + @Test @TestMetadata("typeAliasWithUnsafeVariance.kt") public void testTypeAliasWithUnsafeVariance() throws Exception { runTest("compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.kt"); } + @Nested @TestMetadata("compiler/testData/ir/irText/types/nullChecks") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NullChecks extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class NullChecks extends AbstractIrTextTest { + @Test public void testAllFilesPresentInNullChecks() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/types/nullChecks"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/types/nullChecks"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("enhancedNullability.kt") public void testEnhancedNullability() throws Exception { runTest("compiler/testData/ir/irText/types/nullChecks/enhancedNullability.kt"); } + @Test @TestMetadata("enhancedNullabilityInDestructuringAssignment.kt") public void testEnhancedNullabilityInDestructuringAssignment() throws Exception { runTest("compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.kt"); } + @Test @TestMetadata("enhancedNullabilityInForLoop.kt") public void testEnhancedNullabilityInForLoop() throws Exception { runTest("compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.kt"); } + @Test @TestMetadata("explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.kt") public void testExplicitEqualsAndCompareToCallsOnPlatformTypeReceiver() throws Exception { runTest("compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.kt"); } + @Test @TestMetadata("implicitNotNullOnPlatformType.kt") public void testImplicitNotNullOnPlatformType() throws Exception { runTest("compiler/testData/ir/irText/types/nullChecks/implicitNotNullOnPlatformType.kt"); } + @Test @TestMetadata("nullabilityAssertionOnExtensionReceiver.kt") public void testNullabilityAssertionOnExtensionReceiver() throws Exception { runTest("compiler/testData/ir/irText/types/nullChecks/nullabilityAssertionOnExtensionReceiver.kt"); } + @Test @TestMetadata("platformTypeReceiver.kt") public void testPlatformTypeReceiver() throws Exception { runTest("compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.kt"); } + @Nested @TestMetadata("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NullCheckOnLambdaResult extends AbstractIrTextTestCase { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - + public class NullCheckOnLambdaResult extends AbstractIrTextTest { + @Test public void testAllFilesPresentInNullCheckOnLambdaResult() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("nnStringVsT.kt") public void testNnStringVsT() throws Exception { runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsT.kt"); } + @Test @TestMetadata("nnStringVsTAny.kt") public void testNnStringVsTAny() throws Exception { runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTAny.kt"); } + @Test @TestMetadata("nnStringVsTConstrained.kt") public void testNnStringVsTConstrained() throws Exception { runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTConstrained.kt"); } + @Test @TestMetadata("nnStringVsTXArray.kt") public void testNnStringVsTXArray() throws Exception { runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTXArray.kt"); } + @Test @TestMetadata("nnStringVsTXString.kt") public void testNnStringVsTXString() throws Exception { runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTXString.kt"); } + @Test @TestMetadata("stringVsT.kt") public void testStringVsT() throws Exception { runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsT.kt"); } + @Test @TestMetadata("stringVsTAny.kt") public void testStringVsTAny() throws Exception { runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTAny.kt"); } + @Test @TestMetadata("stringVsTConstrained.kt") public void testStringVsTConstrained() throws Exception { runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTConstrained.kt"); } + @Test @TestMetadata("stringVsTXArray.kt") public void testStringVsTXArray() throws Exception { runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXArray.kt"); } + @Test @TestMetadata("stringVsTXString.kt") public void testStringVsTXString() throws Exception { runTest("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXString.kt"); diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/classic/JavaCompilerFacade.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/classic/JavaCompilerFacade.kt index 36dbf239d20..cba8fcead40 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/classic/JavaCompilerFacade.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/classic/JavaCompilerFacade.kt @@ -23,7 +23,6 @@ import org.jetbrains.kotlin.test.services.jvm.compiledClassesManager import org.jetbrains.kotlin.test.services.sourceFileProvider import org.jetbrains.kotlin.test.util.KtTestUtil import java.io.File -import java.nio.file.Paths class JavaCompilerFacade(private val testServices: TestServices) { @OptIn(ExperimentalStdlibApi::class) @@ -51,7 +50,8 @@ class JavaCompilerFacade(private val testServices: TestServices) { ) val javaFiles = module.javaFiles.map { testServices.sourceFileProvider.getRealFileForSourceFile(it) } - compileJavaFiles(configuration[JVMConfigurationKeys.JVM_TARGET] ?: JvmTarget.DEFAULT, javaFiles, finalJavacOptions) + val ignoreErrors = CodegenTestDirectives.IGNORE_JAVA_ERRORS in module.directives + compileJavaFiles(configuration[JVMConfigurationKeys.JVM_TARGET] ?: JvmTarget.DEFAULT, javaFiles, finalJavacOptions, ignoreErrors) } @OptIn(ExperimentalStdlibApi::class) @@ -73,10 +73,15 @@ class JavaCompilerFacade(private val testServices: TestServices) { } } - private fun compileJavaFiles(jvmTarget: JvmTarget, files: List, javacOptions: List) { + private fun compileJavaFiles(jvmTarget: JvmTarget, files: List, javacOptions: List, ignoreErrors: Boolean) { val targetIsJava8OrLower = System.getProperty("java.version").startsWith("1.") if (targetIsJava8OrLower) { - org.jetbrains.kotlin.test.compileJavaFiles(files, javacOptions, assertions = testServices.assertions) + org.jetbrains.kotlin.test.compileJavaFiles( + files, + javacOptions, + assertions = testServices.assertions, + ignoreJavaErrors = ignoreErrors + ) return } val jdkHome = when (jvmTarget) { diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/AbstractIrHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/AbstractIrHandler.kt new file mode 100644 index 00000000000..bc259a5f85b --- /dev/null +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/AbstractIrHandler.kt @@ -0,0 +1,13 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.test.backend.handlers + +import org.jetbrains.kotlin.test.backend.ir.IrBackendInput +import org.jetbrains.kotlin.test.model.BackendInputHandler +import org.jetbrains.kotlin.test.model.BackendKinds +import org.jetbrains.kotlin.test.services.TestServices + +abstract class AbstractIrHandler(testServices: TestServices) : BackendInputHandler(testServices, BackendKinds.IrBackend) diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrTextDumpHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrTextDumpHandler.kt new file mode 100644 index 00000000000..c012607e5de --- /dev/null +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrTextDumpHandler.kt @@ -0,0 +1,116 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.test.backend.handlers + +import org.jetbrains.kotlin.backend.common.serialization.signature.IdSignatureDescriptor +import org.jetbrains.kotlin.config.languageVersionSettings +import org.jetbrains.kotlin.descriptors.ModuleDescriptor +import org.jetbrains.kotlin.descriptors.findClassAcrossModuleDependencies +import org.jetbrains.kotlin.ir.IrVerifier +import org.jetbrains.kotlin.ir.backend.js.lower.serialization.ir.JsManglerDesc +import org.jetbrains.kotlin.ir.declarations.IrClass +import org.jetbrains.kotlin.ir.declarations.IrFile +import org.jetbrains.kotlin.ir.declarations.impl.IrFactoryImpl +import org.jetbrains.kotlin.ir.util.* +import org.jetbrains.kotlin.name.ClassId +import org.jetbrains.kotlin.name.FqName +import org.jetbrains.kotlin.test.backend.ir.IrBackendInput +import org.jetbrains.kotlin.test.directives.CodegenTestDirectives +import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.DUMP_EXTERNAL_CLASS +import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.DUMP_IR +import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.EXTERNAL_FILE +import org.jetbrains.kotlin.test.directives.FirDiagnosticsDirectives +import org.jetbrains.kotlin.test.directives.FirDiagnosticsDirectives.FIR_IDENTICAL +import org.jetbrains.kotlin.test.directives.model.DirectivesContainer +import org.jetbrains.kotlin.test.model.FrontendKinds +import org.jetbrains.kotlin.test.model.TestModule +import org.jetbrains.kotlin.test.services.TestServices +import org.jetbrains.kotlin.test.services.moduleStructure +import org.jetbrains.kotlin.test.utils.MultiModuleInfoDumperImpl +import org.jetbrains.kotlin.test.utils.withExtension +import org.jetbrains.kotlin.test.utils.withSuffixAndExtension +import java.io.File + +class IrTextDumpHandler(testServices: TestServices) : AbstractIrHandler(testServices) { + override val directivesContainers: List + get() = listOf(CodegenTestDirectives, FirDiagnosticsDirectives) + + private val baseDumper = MultiModuleInfoDumperImpl() + private val buildersForSeparateFileDumps: MutableMap = mutableMapOf() + + @OptIn(ExperimentalStdlibApi::class) + override fun processModule(module: TestModule, info: IrBackendInput) { + if (DUMP_IR !in module.directives) return + val irFiles = info.backendInput.irModuleFragment.files + val testFileToIrFile = irFiles.mapNotNull { irFile -> + val name = irFile.fileEntry.name.removePrefix("/") + val testFile = module.files.firstOrNull { it.name == name } ?: return@mapNotNull null + testFile to irFile + } + val builder = baseDumper.builderForModule(module) + for ((testFile, irFile) in testFileToIrFile) { + if (EXTERNAL_FILE in testFile.directives) continue + val actualDump = irFile.dumpTreesFromLineNumber(lineNumber = 0, normalizeNames = true) + builder.append(actualDump) + verify(irFile) + + val irFileCopy = irFile.deepCopyWithSymbols() + val dumpOfCopy = irFileCopy.dumpTreesFromLineNumber(lineNumber = 0, normalizeNames = true) + assertions.assertEquals(actualDump, dumpOfCopy) { "IR dump mismatch after deep copy with symbols" } + } + compareDumpsOfExternalClasses(module, info) + } + + private fun compareDumpsOfExternalClasses(module: TestModule, info: IrBackendInput) { + val externalClassFqns = module.directives[DUMP_EXTERNAL_CLASS] + if (externalClassFqns.isEmpty()) return + + // TODO: why JS one is used here in original AbstractIrTextTestCase? + val mangler = JsManglerDesc + val signaturer = IdSignatureDescriptor(mangler) + val irModule = info.backendInput.irModuleFragment + val stubGenerator = DeclarationStubGenerator( + irModule.descriptor, + SymbolTable(signaturer, IrFactoryImpl), // TODO + module.languageVersionSettings + ) + + val baseFile = testServices.moduleStructure.originalTestDataFiles.first() + for (externalClassFqn in externalClassFqns) { + val classDump = stubGenerator.generateExternalClass(irModule.descriptor, externalClassFqn).dump() + val expectedFile = baseFile.withSuffixAndExtension("__$externalClassFqn", module.dumpExtension) + assertions.assertEqualsToFile(expectedFile, classDump) + } + } + + private fun DeclarationStubGenerator.generateExternalClass(descriptor: ModuleDescriptor, externalClassFqn: String): IrClass { + val classDescriptor = + descriptor.findClassAcrossModuleDependencies(ClassId.topLevel(FqName(externalClassFqn))) + ?: throw AssertionError("Can't find a class in external dependencies: $externalClassFqn") + + return generateMemberStub(classDescriptor) as IrClass + } + + override fun processAfterAllModules(someAssertionWasFailed: Boolean) { + val moduleStructure = testServices.moduleStructure + val defaultExpectedFile = moduleStructure.originalTestDataFiles.first().withExtension(moduleStructure.modules.first().dumpExtension) + checkOneExpectedFile(defaultExpectedFile, baseDumper.generateResultingDump()) + buildersForSeparateFileDumps.entries.forEach { (expectedFile, dump) -> checkOneExpectedFile(expectedFile, dump.toString()) } + } + + private fun checkOneExpectedFile(expectedFile: File, actualDump: String) { + if (actualDump.isNotEmpty()) { + assertions.assertEqualsToFile(expectedFile, actualDump) + } + } + + private fun verify(irFile: IrFile) { + IrVerifier(assertions).verifyWithAssert(irFile) + } + + private val TestModule.dumpExtension: String + get() = if (frontendKind == FrontendKinds.ClassicFrontend || FIR_IDENTICAL in directives) "txt" else "fir.txt" +} diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/CodegenTestDirectives.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/CodegenTestDirectives.kt index 3fc068dcdf4..5a3dbfcd17b 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/CodegenTestDirectives.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/CodegenTestDirectives.kt @@ -6,9 +6,9 @@ package org.jetbrains.kotlin.test.directives import org.jetbrains.kotlin.test.TargetBackend +import org.jetbrains.kotlin.test.backend.handlers.IrTextDumpHandler import org.jetbrains.kotlin.test.backend.handlers.NoCompilationErrorsHandler import org.jetbrains.kotlin.test.backend.ir.JvmIrBackendFacade -import org.jetbrains.kotlin.test.directives.model.DirectiveApplicability import org.jetbrains.kotlin.test.directives.model.DirectiveApplicability.File import org.jetbrains.kotlin.test.directives.model.DirectiveApplicability.Global import org.jetbrains.kotlin.test.directives.model.SimpleDirectivesContainer @@ -56,13 +56,16 @@ object CodegenTestDirectives : SimpleDirectivesContainer() { """.trimIndent() ) + val IGNORE_JAVA_ERRORS by directive( + description = "Ignore compilation errors from java" + ) + val IGNORE_FIR_DIAGNOSTICS by directive( description = "Run backend even FIR reported some diagnostics with ERROR severity" ) - val IR_FILE by stringDirective( - description = "Specifies file name for IR text dump", - applicability = File + val DUMP_IR by directive( + description = "Dumps generated backend IR (enables ${IrTextDumpHandler::class})" ) val DUMP_EXTERNAL_CLASS by stringDirective( @@ -70,7 +73,7 @@ object CodegenTestDirectives : SimpleDirectivesContainer() { ) val EXTERNAL_FILE by directive( - description = "Indicates that test file is external", + description = "Indicates that test file is external and should be skipped in ${IrTextDumpHandler::class}", applicability = File ) } diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/AbstractKotlinCompilerWithTargetBackendTest.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/AbstractKotlinCompilerWithTargetBackendTest.kt index a53260e7cac..7386e0d6428 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/AbstractKotlinCompilerWithTargetBackendTest.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/AbstractKotlinCompilerWithTargetBackendTest.kt @@ -15,7 +15,15 @@ abstract class AbstractKotlinCompilerWithTargetBackendTest( super.configure(builder) with(builder) { globalDefaults { - targetBackend = this@AbstractKotlinCompilerWithTargetBackendTest.targetBackend + val targetBackendFromMarker = this@AbstractKotlinCompilerWithTargetBackendTest.targetBackend + if (targetBackend == null) { + targetBackend = this@AbstractKotlinCompilerWithTargetBackendTest.targetBackend + } else { + require(targetBackend == targetBackendFromMarker) { + """Target backend in configuration specified to $targetBackend but in + |AbstractKotlinCompilerWithTargetBackendTest parent it is set to $targetBackendFromMarker""".trimMargin() + } + } } } } diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt new file mode 100644 index 00000000000..6908a7392fa --- /dev/null +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt @@ -0,0 +1,66 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.test.runners.ir + +import org.jetbrains.kotlin.platform.jvm.JvmPlatforms +import org.jetbrains.kotlin.test.TargetBackend +import org.jetbrains.kotlin.test.backend.BlackBoxCodegenSuppressor +import org.jetbrains.kotlin.test.backend.handlers.* +import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder +import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.DUMP_IR +import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontend2IrConverter +import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontendFacade +import org.jetbrains.kotlin.test.frontend.fir.Fir2IrResultsConverter +import org.jetbrains.kotlin.test.frontend.fir.FirFrontendFacade +import org.jetbrains.kotlin.test.model.* +import org.jetbrains.kotlin.test.runners.AbstractKotlinCompilerWithTargetBackendTest +import org.jetbrains.kotlin.test.services.configuration.CommonEnvironmentConfigurator +import org.jetbrains.kotlin.test.services.configuration.JvmEnvironmentConfigurator +import org.jetbrains.kotlin.test.services.sourceProviders.AdditionalDiagnosticsSourceFilesProvider +import org.jetbrains.kotlin.test.services.sourceProviders.CodegenHelpersSourceFilesProvider +import org.jetbrains.kotlin.test.services.sourceProviders.CoroutineHelpersSourceFilesProvider + +abstract class AbstractIrTextTestBase( + private val frontend: FrontendKind<*> +) : AbstractKotlinCompilerWithTargetBackendTest(TargetBackend.JVM_IR) { + override fun TestConfigurationBuilder.configuration() { + globalDefaults { + frontend = this@AbstractIrTextTestBase.frontend + targetPlatform = JvmPlatforms.defaultJvmPlatform + artifactKind = BinaryKind.NoArtifact + targetBackend = TargetBackend.JVM_IR + dependencyKind = DependencyKind.Source + } + + defaultDirectives { + +DUMP_IR + } + + useConfigurators( + ::CommonEnvironmentConfigurator, + ::JvmEnvironmentConfigurator + ) + + useAdditionalSourceProviders( + ::AdditionalDiagnosticsSourceFilesProvider, + ::CoroutineHelpersSourceFilesProvider, + ::CodegenHelpersSourceFilesProvider, + ) + + useFrontendFacades( + ::ClassicFrontendFacade, + ::FirFrontendFacade + ) + useFrontend2BackendConverters( + ::ClassicFrontend2IrConverter, + ::Fir2IrResultsConverter + ) + + useBackendHandlers(::IrTextDumpHandler) + } +} + +open class AbstractIrTextTest : AbstractIrTextTestBase(FrontendKinds.ClassicFrontend) diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractIrTextTestCase.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractIrTextTestCase.kt index 897dac34dd2..7ade4a7b952 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractIrTextTestCase.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractIrTextTestCase.kt @@ -11,23 +11,20 @@ import org.jetbrains.kotlin.backend.common.serialization.signature.IdSignatureDe import org.jetbrains.kotlin.cli.js.loadPluginsForTests import org.jetbrains.kotlin.config.CompilerConfiguration import org.jetbrains.kotlin.config.languageVersionSettings -import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.descriptors.ModuleDescriptor -import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor import org.jetbrains.kotlin.descriptors.findClassAcrossModuleDependencies import org.jetbrains.kotlin.ir.backend.js.lower.serialization.ir.JsManglerDesc -import org.jetbrains.kotlin.ir.declarations.* +import org.jetbrains.kotlin.ir.declarations.IrClass +import org.jetbrains.kotlin.ir.declarations.IrFile +import org.jetbrains.kotlin.ir.declarations.IrModuleFragment import org.jetbrains.kotlin.ir.declarations.impl.IrFactoryImpl -import org.jetbrains.kotlin.ir.expressions.* -import org.jetbrains.kotlin.ir.symbols.IrSymbol import org.jetbrains.kotlin.ir.util.* -import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid -import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.scripting.compiler.plugin.loadScriptConfiguration import org.jetbrains.kotlin.test.KotlinTestUtils import org.jetbrains.kotlin.test.testFramework.KtUsefulTestCase +import org.jetbrains.kotlin.test.util.JUnit4Assertions import org.jetbrains.kotlin.utils.fileUtils.withReplacedExtensionOrNull import org.jetbrains.kotlin.utils.rethrow import java.io.File @@ -141,190 +138,7 @@ abstract class AbstractIrTextTestCase : AbstractIrGeneratorTestCase() { } private fun verify(irFile: IrFile) { - IrVerifier().verifyWithAssert(irFile) - } - - private class IrVerifier : IrElementVisitorVoid { - private val errors = ArrayList() - - private val symbolForDeclaration = HashMap() - - val hasErrors get() = errors.isNotEmpty() - - val errorsAsMessage get() = errors.joinToString(prefix = "IR verifier errors:\n", separator = "\n") - - private fun error(message: String) { - errors.add(message) - } - - private inline fun require(condition: Boolean, message: () -> String) { - if (!condition) { - errors.add(message()) - } - } - - private val elementsAreUniqueChecker = object : IrElementVisitorVoid { - private val elements = HashSet() - - override fun visitElement(element: IrElement) { - require(elements.add(element)) { "Non-unique element: ${element.render()}" } - element.acceptChildrenVoid(this) - } - } - - fun verifyWithAssert(irFile: IrFile) { - irFile.acceptChildrenVoid(this) - irFile.acceptChildrenVoid(elementsAreUniqueChecker) - TestCase.assertFalse(errorsAsMessage + "\n\n\n" + irFile.dump(), hasErrors) - } - - override fun visitElement(element: IrElement) { - element.acceptChildrenVoid(this) - } - - @OptIn(ObsoleteDescriptorBasedAPI::class) - override fun visitDeclaration(declaration: IrDeclarationBase) { - declaration.symbol.checkBinding("decl", declaration) - - require(declaration.symbol.owner == declaration) { - "Symbol is not bound to declaration: ${declaration.render()}" - } - - val containingDeclarationDescriptor = declaration.descriptor.containingDeclaration - if (containingDeclarationDescriptor != null) { - val parent = declaration.parent - if (parent is IrDeclaration) { - require(parent.descriptor == containingDeclarationDescriptor) { - "In declaration ${declaration.descriptor}: " + - "Mismatching parent descriptor (${parent.descriptor}) " + - "and containing declaration descriptor ($containingDeclarationDescriptor)" - } - } - } - } - - override fun visitProperty(declaration: IrProperty) { - visitDeclaration(declaration) - - require((declaration.origin == IrDeclarationOrigin.FAKE_OVERRIDE) == declaration.isFakeOverride) { - "${declaration.render()}: origin: ${declaration.origin}; isFakeOverride: ${declaration.isFakeOverride}" - } - } - - @OptIn(ObsoleteDescriptorBasedAPI::class) - override fun visitFunction(declaration: IrFunction) { - visitDeclaration(declaration) - - val functionDescriptor = declaration.descriptor - - checkTypeParameters(functionDescriptor, declaration, functionDescriptor.typeParameters) - - val expectedDispatchReceiver = functionDescriptor.dispatchReceiverParameter - val actualDispatchReceiver = declaration.dispatchReceiverParameter?.descriptor - require(expectedDispatchReceiver == actualDispatchReceiver) { - "$functionDescriptor: Dispatch receiver parameter mismatch: " + - "expected $expectedDispatchReceiver, actual $actualDispatchReceiver" - - } - - val expectedExtensionReceiver = functionDescriptor.extensionReceiverParameter - val actualExtensionReceiver = declaration.extensionReceiverParameter?.descriptor - require(expectedExtensionReceiver == actualExtensionReceiver) { - "$functionDescriptor: Extension receiver parameter mismatch: " + - "expected $expectedExtensionReceiver, actual $actualExtensionReceiver" - - } - - val declaredValueParameters = declaration.valueParameters.map { it.descriptor } - val actualValueParameters = functionDescriptor.valueParameters - if (declaredValueParameters.size != actualValueParameters.size) { - error("$functionDescriptor: Value parameters mismatch: $declaredValueParameters != $actualValueParameters") - } else { - declaredValueParameters.zip(actualValueParameters).forEach { (declaredValueParameter, actualValueParameter) -> - require(declaredValueParameter == actualValueParameter) { - "$functionDescriptor: Value parameters mismatch: $declaredValueParameter != $actualValueParameter" - } - } - } - } - - override fun visitSimpleFunction(declaration: IrSimpleFunction) { - visitFunction(declaration) - - require((declaration.origin == IrDeclarationOrigin.FAKE_OVERRIDE) == declaration.isFakeOverride) { - "${declaration.render()}: origin: ${declaration.origin}; isFakeOverride: ${declaration.isFakeOverride}" - } - } - - override fun visitDeclarationReference(expression: IrDeclarationReference) { - expression.symbol.checkBinding("ref", expression) - } - - override fun visitFunctionReference(expression: IrFunctionReference) { - expression.symbol.checkBinding("ref", expression) - } - - override fun visitPropertyReference(expression: IrPropertyReference) { - expression.field?.checkBinding("field", expression) - expression.getter?.checkBinding("getter", expression) - expression.setter?.checkBinding("setter", expression) - } - - override fun visitLocalDelegatedPropertyReference(expression: IrLocalDelegatedPropertyReference) { - expression.delegate.checkBinding("delegate", expression) - expression.getter.checkBinding("getter", expression) - expression.setter?.checkBinding("setter", expression) - } - - private fun IrSymbol.checkBinding(kind: String, irElement: IrElement) { - if (!isBound) { - error("${javaClass.simpleName} descriptor is unbound @$kind ${irElement.render()}") - } else { - val irDeclaration = owner as? IrDeclaration - if (irDeclaration != null) { - try { - irDeclaration.parent - } catch (e: Throwable) { - error("Referenced declaration has no parent: ${irDeclaration.render()}") - } - } - } - - val otherSymbol = symbolForDeclaration.getOrPut(owner) { this } - if (this != otherSymbol) { - error("Multiple symbols for descriptor of @$kind ${irElement.render()}") - } - } - - @OptIn(ObsoleteDescriptorBasedAPI::class) - override fun visitClass(declaration: IrClass) { - visitDeclaration(declaration) - - checkTypeParameters(declaration.descriptor, declaration, declaration.descriptor.declaredTypeParameters) - } - - @ObsoleteDescriptorBasedAPI - private fun checkTypeParameters( - descriptor: DeclarationDescriptor, - declaration: IrTypeParametersContainer, - expectedTypeParameters: List - ) { - val declaredTypeParameters = declaration.typeParameters.map { it.descriptor } - - if (declaredTypeParameters.size != expectedTypeParameters.size) { - error("$descriptor: Type parameters mismatch: $declaredTypeParameters != $expectedTypeParameters") - } else { - declaredTypeParameters.zip(expectedTypeParameters).forEach { (declaredTypeParameter, expectedTypeParameter) -> - require(declaredTypeParameter == expectedTypeParameter) { - "$descriptor: Type parameters mismatch: $declaredTypeParameter != $expectedTypeParameter" - } - } - } - } - - override fun visitTypeOperator(expression: IrTypeOperatorCall) { - expression.typeOperandClassifier.checkBinding("type operand", expression) - } + IrVerifier(JUnit4Assertions).verifyWithAssert(irFile) } internal class Expectations(val regexps: List, val irTreeFileLabels: List) diff --git a/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/ir/IrVerifier.kt b/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/ir/IrVerifier.kt new file mode 100644 index 00000000000..29ac8e9be42 --- /dev/null +++ b/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/ir/IrVerifier.kt @@ -0,0 +1,201 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.ir + +import org.jetbrains.kotlin.descriptors.DeclarationDescriptor +import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor +import org.jetbrains.kotlin.ir.declarations.* +import org.jetbrains.kotlin.ir.expressions.* +import org.jetbrains.kotlin.ir.symbols.IrSymbol +import org.jetbrains.kotlin.ir.util.dump +import org.jetbrains.kotlin.ir.util.render +import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid +import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid +import org.jetbrains.kotlin.test.Assertions + +class IrVerifier(private val assertions: Assertions) : IrElementVisitorVoid { + private val errors = ArrayList() + + private val symbolForDeclaration = HashMap() + + val hasErrors get() = errors.isNotEmpty() + + val errorsAsMessage get() = errors.joinToString(prefix = "IR verifier errors:\n", separator = "\n") + + private fun error(message: String) { + errors.add(message) + } + + private inline fun require(condition: Boolean, message: () -> String) { + if (!condition) { + errors.add(message()) + } + } + + private val elementsAreUniqueChecker = object : IrElementVisitorVoid { + private val elements = HashSet() + + override fun visitElement(element: IrElement) { + require(elements.add(element)) { "Non-unique element: ${element.render()}" } + element.acceptChildrenVoid(this) + } + } + + fun verifyWithAssert(irFile: IrFile) { + irFile.acceptChildrenVoid(this) + irFile.acceptChildrenVoid(elementsAreUniqueChecker) + assertions.assertFalse(hasErrors) { errorsAsMessage + "\n\n\n" + irFile.dump() } + } + + override fun visitElement(element: IrElement) { + element.acceptChildrenVoid(this) + } + + @OptIn(ObsoleteDescriptorBasedAPI::class) + override fun visitDeclaration(declaration: IrDeclarationBase) { + declaration.symbol.checkBinding("decl", declaration) + + require(declaration.symbol.owner == declaration) { + "Symbol is not bound to declaration: ${declaration.render()}" + } + + val containingDeclarationDescriptor = declaration.descriptor.containingDeclaration + if (containingDeclarationDescriptor != null) { + val parent = declaration.parent + if (parent is IrDeclaration) { + require(parent.descriptor == containingDeclarationDescriptor) { + "In declaration ${declaration.descriptor}: " + + "Mismatching parent descriptor (${parent.descriptor}) " + + "and containing declaration descriptor ($containingDeclarationDescriptor)" + } + } + } + } + + override fun visitProperty(declaration: IrProperty) { + visitDeclaration(declaration) + + require((declaration.origin == IrDeclarationOrigin.FAKE_OVERRIDE) == declaration.isFakeOverride) { + "${declaration.render()}: origin: ${declaration.origin}; isFakeOverride: ${declaration.isFakeOverride}" + } + } + + @OptIn(ObsoleteDescriptorBasedAPI::class) + override fun visitFunction(declaration: IrFunction) { + visitDeclaration(declaration) + + val functionDescriptor = declaration.descriptor + + checkTypeParameters(functionDescriptor, declaration, functionDescriptor.typeParameters) + + val expectedDispatchReceiver = functionDescriptor.dispatchReceiverParameter + val actualDispatchReceiver = declaration.dispatchReceiverParameter?.descriptor + require(expectedDispatchReceiver == actualDispatchReceiver) { + "$functionDescriptor: Dispatch receiver parameter mismatch: " + + "expected $expectedDispatchReceiver, actual $actualDispatchReceiver" + + } + + val expectedExtensionReceiver = functionDescriptor.extensionReceiverParameter + val actualExtensionReceiver = declaration.extensionReceiverParameter?.descriptor + require(expectedExtensionReceiver == actualExtensionReceiver) { + "$functionDescriptor: Extension receiver parameter mismatch: " + + "expected $expectedExtensionReceiver, actual $actualExtensionReceiver" + + } + + val declaredValueParameters = declaration.valueParameters.map { it.descriptor } + val actualValueParameters = functionDescriptor.valueParameters + if (declaredValueParameters.size != actualValueParameters.size) { + error("$functionDescriptor: Value parameters mismatch: $declaredValueParameters != $actualValueParameters") + } else { + declaredValueParameters.zip(actualValueParameters).forEach { (declaredValueParameter, actualValueParameter) -> + require(declaredValueParameter == actualValueParameter) { + "$functionDescriptor: Value parameters mismatch: $declaredValueParameter != $actualValueParameter" + } + } + } + } + + override fun visitSimpleFunction(declaration: IrSimpleFunction) { + visitFunction(declaration) + + require((declaration.origin == IrDeclarationOrigin.FAKE_OVERRIDE) == declaration.isFakeOverride) { + "${declaration.render()}: origin: ${declaration.origin}; isFakeOverride: ${declaration.isFakeOverride}" + } + } + + override fun visitDeclarationReference(expression: IrDeclarationReference) { + expression.symbol.checkBinding("ref", expression) + } + + override fun visitFunctionReference(expression: IrFunctionReference) { + expression.symbol.checkBinding("ref", expression) + } + + override fun visitPropertyReference(expression: IrPropertyReference) { + expression.field?.checkBinding("field", expression) + expression.getter?.checkBinding("getter", expression) + expression.setter?.checkBinding("setter", expression) + } + + override fun visitLocalDelegatedPropertyReference(expression: IrLocalDelegatedPropertyReference) { + expression.delegate.checkBinding("delegate", expression) + expression.getter.checkBinding("getter", expression) + expression.setter?.checkBinding("setter", expression) + } + + private fun IrSymbol.checkBinding(kind: String, irElement: IrElement) { + if (!isBound) { + error("${javaClass.simpleName} descriptor is unbound @$kind ${irElement.render()}") + } else { + val irDeclaration = owner as? IrDeclaration + if (irDeclaration != null) { + try { + irDeclaration.parent + } catch (e: Throwable) { + error("Referenced declaration has no parent: ${irDeclaration.render()}") + } + } + } + + val otherSymbol = symbolForDeclaration.getOrPut(owner) { this } + if (this != otherSymbol) { + error("Multiple symbols for descriptor of @$kind ${irElement.render()}") + } + } + + @OptIn(ObsoleteDescriptorBasedAPI::class) + override fun visitClass(declaration: IrClass) { + visitDeclaration(declaration) + + checkTypeParameters(declaration.descriptor, declaration, declaration.descriptor.declaredTypeParameters) + } + + @ObsoleteDescriptorBasedAPI + private fun checkTypeParameters( + descriptor: DeclarationDescriptor, + declaration: IrTypeParametersContainer, + expectedTypeParameters: List + ) { + val declaredTypeParameters = declaration.typeParameters.map { it.descriptor } + + if (declaredTypeParameters.size != expectedTypeParameters.size) { + error("$descriptor: Type parameters mismatch: $declaredTypeParameters != $expectedTypeParameters") + } else { + declaredTypeParameters.zip(expectedTypeParameters).forEach { (declaredTypeParameter, expectedTypeParameter) -> + require(declaredTypeParameter == expectedTypeParameter) { + "$descriptor: Type parameters mismatch: $declaredTypeParameter != $expectedTypeParameter" + } + } + } + } + + override fun visitTypeOperator(expression: IrTypeOperatorCall) { + expression.typeOperandClassifier.checkBinding("type operand", expression) + } +} + diff --git a/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/test/JvmCompilationUtils.kt b/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/test/JvmCompilationUtils.kt index ec832e7e1e1..099e1460c83 100644 --- a/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/test/JvmCompilationUtils.kt +++ b/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/test/JvmCompilationUtils.kt @@ -21,7 +21,13 @@ import javax.tools.ToolProvider @JvmOverloads @Throws(IOException::class) -fun compileJavaFiles(files: Collection, options: List?, javaErrorFile: File? = null, assertions: Assertions): Boolean { +fun compileJavaFiles( + files: Collection, + options: List?, + javaErrorFile: File? = null, + assertions: Assertions, + ignoreJavaErrors: Boolean = false +): Boolean { val javaCompiler = ToolProvider.getSystemJavaCompiler() val diagnosticCollector = DiagnosticCollector() javaCompiler.getStandardFileManager(diagnosticCollector, Locale.ENGLISH, Charset.forName("utf-8")).use { fileManager -> @@ -36,7 +42,7 @@ fun compileJavaFiles(files: Collection, options: List?, javaError ) val success = task.call() // do NOT inline this variable, call() should complete before errorsToString() if (javaErrorFile == null || !javaErrorFile.exists()) { - assertions.assertTrue(success) { errorsToString(diagnosticCollector, true) } + assertions.assertTrue(success || ignoreJavaErrors) { errorsToString(diagnosticCollector, true) } } else { assertions.assertEqualsToFile(javaErrorFile, errorsToString(diagnosticCollector, false)) } diff --git a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt index 2bf92c94611..16d624c8299 100644 --- a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt +++ b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt @@ -144,10 +144,6 @@ fun generateJUnit3CompilerTests(args: Array) { model("codegen/bytecodeText", targetBackend = TargetBackend.JVM) } - testClass { - model("ir/irText") - } - testClass { model("ir/irJsText", pattern = "^(.+)\\.kt(s)?\$") } diff --git a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt index adf3bf71f13..26f4475dbf3 100644 --- a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt +++ b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt @@ -5,7 +5,6 @@ package org.jetbrains.kotlin.test.generators -import org.jetbrains.kotlin.generators.model.AnnotationModel import org.jetbrains.kotlin.generators.model.annotation import org.jetbrains.kotlin.generators.util.TestGeneratorUtil import org.jetbrains.kotlin.test.TargetBackend @@ -13,6 +12,7 @@ import org.jetbrains.kotlin.test.runners.* import org.jetbrains.kotlin.test.runners.codegen.AbstractBlackBoxCodegenTest import org.jetbrains.kotlin.test.runners.codegen.AbstractFirBlackBoxCodegenTest import org.jetbrains.kotlin.test.runners.codegen.AbstractIrBlackBoxCodegenTest +import org.jetbrains.kotlin.test.runners.ir.AbstractIrTextTest import org.junit.jupiter.api.parallel.Execution import org.junit.jupiter.api.parallel.ExecutionMode @@ -68,6 +68,10 @@ fun generateJUnit5CompilerTests(args: Array) { testClass { model("codegen/box", excludeDirs = listOf("oldLanguageVersions")) } + + testClass { + model("ir/irText") + } } // ---------------------------------------------- FIR tests ----------------------------------------------