diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticsTestWithOldJvmBackendGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticsTestWithOldJvmBackendGenerated.java deleted file mode 100644 index 51378061e9c..00000000000 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticsTestWithOldJvmBackendGenerated.java +++ /dev/null @@ -1,559 +0,0 @@ -/* - * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.test.runners; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TargetBackend; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.jupiter.api.Nested; -import org.junit.jupiter.api.Test; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.test.generators.GenerateCompilerTestsKt}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend") -@TestDataPath("$PROJECT_ROOT") -public class DiagnosticsTestWithOldJvmBackendGenerated extends AbstractDiagnosticsTestWithOldJvmBackend { - @Test - public void testAllFilesPresentInTestsWithJvmBackend() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_OLD, true); - } - - @Test - @TestMetadata("kt57104.kt") - public void testKt57104() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/kt57104.kt"); - } - - @Test - @TestMetadata("kt57104_2.kt") - public void testKt57104_2() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/kt57104_2.kt"); - } - - @Test - @TestMetadata("noWarningInLV1_5.kt") - public void testNoWarningInLV1_5() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/noWarningInLV1_5.kt"); - } - - @Test - @TestMetadata("propertyInlineCycle.kt") - public void testPropertyInlineCycle() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/propertyInlineCycle.kt"); - } - - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature") - @TestDataPath("$PROJECT_ROOT") - public class DuplicateJvmSignature { - @Test - public void testAllFilesPresentInDuplicateJvmSignature() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_OLD, true); - } - - @Test - @TestMetadata("caseInProperties.kt") - public void testCaseInProperties() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/caseInProperties.kt"); - } - - @Test - @TestMetadata("changingNullabilityOfOrdinaryClassIsBinaryCompatibleChange.kt") - public void testChangingNullabilityOfOrdinaryClassIsBinaryCompatibleChange() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/changingNullabilityOfOrdinaryClassIsBinaryCompatibleChange.kt"); - } - - @Test - @TestMetadata("vararg.kt") - public void testVararg() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/vararg.kt"); - } - - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides") - @TestDataPath("$PROJECT_ROOT") - public class AccidentalOverrides { - @Test - @TestMetadata("accidentalOverrideFromGrandparent.kt") - public void testAccidentalOverrideFromGrandparent() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/accidentalOverrideFromGrandparent.kt"); - } - - @Test - public void testAllFilesPresentInAccidentalOverrides() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_OLD, true); - } - - @Test - @TestMetadata("classFunctionOverriddenByProperty.kt") - public void testClassFunctionOverriddenByProperty() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/classFunctionOverriddenByProperty.kt"); - } - - @Test - @TestMetadata("classFunctionOverriddenByPropertyInConstructor.kt") - public void testClassFunctionOverriddenByPropertyInConstructor() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/classFunctionOverriddenByPropertyInConstructor.kt"); - } - - @Test - @TestMetadata("classFunctionOverriddenByPropertyNoGetter.kt") - public void testClassFunctionOverriddenByPropertyNoGetter() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/classFunctionOverriddenByPropertyNoGetter.kt"); - } - - @Test - @TestMetadata("classPropertyOverriddenByFunction.kt") - public void testClassPropertyOverriddenByFunction() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/classPropertyOverriddenByFunction.kt"); - } - - @Test - @TestMetadata("genericClassFunction.kt") - public void testGenericClassFunction() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/genericClassFunction.kt"); - } - - @Test - @TestMetadata("privateClassFunctionOverriddenByProperty.kt") - public void testPrivateClassFunctionOverriddenByProperty() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/privateClassFunctionOverriddenByProperty.kt"); - } - - @Test - @TestMetadata("traitFunctionOverriddenByPropertyNoImpl.kt") - public void testTraitFunctionOverriddenByPropertyNoImpl() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByPropertyNoImpl.kt"); - } - - @Test - @TestMetadata("traitPropertyOverriddenByFunctionNoImpl.kt") - public void testTraitPropertyOverriddenByFunctionNoImpl() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunctionNoImpl.kt"); - } - } - - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/bridges") - @TestDataPath("$PROJECT_ROOT") - public class Bridges { - @Test - public void testAllFilesPresentInBridges() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/bridges"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_OLD, true); - } - } - - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure") - @TestDataPath("$PROJECT_ROOT") - public class Erasure { - @Test - public void testAllFilesPresentInErasure() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_OLD, true); - } - - @Test - @TestMetadata("collections.kt") - public void testCollections() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/collections.kt"); - } - - @Test - @TestMetadata("delegateToTwoTraits.kt") - public void testDelegateToTwoTraits() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegateToTwoTraits.kt"); - } - - @Test - @TestMetadata("delegationAndOwnMethod.kt") - public void testDelegationAndOwnMethod() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationAndOwnMethod.kt"); - } - - @Test - @TestMetadata("delegationToTraitImplAndOwnMethod.kt") - public void testDelegationToTraitImplAndOwnMethod() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod.kt"); - } - - @Test - @TestMetadata("extensionProperties.kt") - public void testExtensionProperties() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/extensionProperties.kt"); - } - - @Test - @TestMetadata("genericType.kt") - public void testGenericType() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/genericType.kt"); - } - - @Test - @TestMetadata("kotlinAndJavaCollections.kt") - public void testKotlinAndJavaCollections() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/kotlinAndJavaCollections.kt"); - } - - @Test - @TestMetadata("nullableType.kt") - public void testNullableType() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/nullableType.kt"); - } - - @Test - @TestMetadata("typeMappedToJava.kt") - public void testTypeMappedToJava() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/typeMappedToJava.kt"); - } - - @Test - @TestMetadata("typeParameter.kt") - public void testTypeParameter() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/typeParameter.kt"); - } - - @Test - @TestMetadata("typeParameterWithBound.kt") - public void testTypeParameterWithBound() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/typeParameterWithBound.kt"); - } - - @Test - @TestMetadata("typeParameterWithTwoBounds.kt") - public void testTypeParameterWithTwoBounds() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/typeParameterWithTwoBounds.kt"); - } - - @Test - @TestMetadata("typeParameterWithTwoBoundsInWhere.kt") - public void testTypeParameterWithTwoBoundsInWhere() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/typeParameterWithTwoBoundsInWhere.kt"); - } - } - - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns") - @TestDataPath("$PROJECT_ROOT") - public class FinalMembersFromBuiltIns { - @Test - public void testAllFilesPresentInFinalMembersFromBuiltIns() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_OLD, true); - } - - @Test - @TestMetadata("enumMembers.kt") - public void testEnumMembers() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.kt"); - } - } - - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty") - @TestDataPath("$PROJECT_ROOT") - public class FunctionAndProperty { - @Test - public void testAllFilesPresentInFunctionAndProperty() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_OLD, true); - } - - @Test - @TestMetadata("class.kt") - public void testClass() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty/class.kt"); - } - - @Test - @TestMetadata("classObject.kt") - public void testClassObject() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty/classObject.kt"); - } - - @Test - @TestMetadata("classPropertyInConstructor.kt") - public void testClassPropertyInConstructor() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty/classPropertyInConstructor.kt"); - } - - @Test - @TestMetadata("extensionFunctionAndNormalFunction.kt") - public void testExtensionFunctionAndNormalFunction() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty/extensionFunctionAndNormalFunction.kt"); - } - - @Test - @TestMetadata("extensionPropertyAndFunction.kt") - public void testExtensionPropertyAndFunction() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty/extensionPropertyAndFunction.kt"); - } - - @Test - @TestMetadata("functionAndSetter.kt") - public void testFunctionAndSetter() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty/functionAndSetter.kt"); - } - - @Test - @TestMetadata("functionAndVar.kt") - public void testFunctionAndVar() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty/functionAndVar.kt"); - } - - @Test - @TestMetadata("localClass.kt") - public void testLocalClass() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty/localClass.kt"); - } - - @Test - @TestMetadata("localClassInClass.kt") - public void testLocalClassInClass() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty/localClassInClass.kt"); - } - - @Test - @TestMetadata("nestedClass.kt") - public void testNestedClass() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty/nestedClass.kt"); - } - - @Test - @TestMetadata("object.kt") - public void testObject() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty/object.kt"); - } - - @Test - @TestMetadata("objectExpression.kt") - public void testObjectExpression() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty/objectExpression.kt"); - } - - @Test - @TestMetadata("objectExpressionInConstructor.kt") - public void testObjectExpressionInConstructor() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty/objectExpressionInConstructor.kt"); - } - - @Test - @TestMetadata("privateClassPropertyNoClash.kt") - public void testPrivateClassPropertyNoClash() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty/privateClassPropertyNoClash.kt"); - } - - @Test - @TestMetadata("topLevel.kt") - public void testTopLevel() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty/topLevel.kt"); - } - - @Test - @TestMetadata("topLevelDifferentFiles.kt") - public void testTopLevelDifferentFiles() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty/topLevelDifferentFiles.kt"); - } - - @Test - @TestMetadata("topLevelGetter.kt") - public void testTopLevelGetter() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty/topLevelGetter.kt"); - } - } - - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/inlineClasses") - @TestDataPath("$PROJECT_ROOT") - public class InlineClasses { - @Test - public void testAllFilesPresentInInlineClasses() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_OLD, true); - } - } - - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames") - @TestDataPath("$PROJECT_ROOT") - public class SpecialNames { - @Test - public void testAllFilesPresentInSpecialNames() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_OLD, true); - } - - @Test - @TestMetadata("classObjectCopiedField.kt") - public void testClassObjectCopiedField() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/classObjectCopiedField.kt"); - } - - @Test - @TestMetadata("dataClassCopy.kt") - public void testDataClassCopy() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/dataClassCopy.kt"); - } - - @Test - @TestMetadata("enum.kt") - public void testEnum() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/enum.kt"); - } - } - - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/statics") - @TestDataPath("$PROJECT_ROOT") - public class Statics { - @Test - public void testAllFilesPresentInStatics() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/statics"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_OLD, true); - } - - @Test - @TestMetadata("jkjk.kt") - public void testJkjk() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/statics/jkjk.kt"); - } - - @Test - @TestMetadata("kotlinClassExtendsJavaClass.kt") - public void testKotlinClassExtendsJavaClass() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/statics/kotlinClassExtendsJavaClass.kt"); - } - - @Test - @TestMetadata("kotlinClassExtendsJavaClassExtendsJavaClass.kt") - public void testKotlinClassExtendsJavaClassExtendsJavaClass() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/statics/kotlinClassExtendsJavaClassExtendsJavaClass.kt"); - } - - @Test - @TestMetadata("kotlinClassImplementsJavaInterface.kt") - public void testKotlinClassImplementsJavaInterface() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/statics/kotlinClassImplementsJavaInterface.kt"); - } - - @Test - @TestMetadata("kotlinClassImplementsJavaInterfaceExtendsJavaInteface.kt") - public void testKotlinClassImplementsJavaInterfaceExtendsJavaInteface() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/statics/kotlinClassImplementsJavaInterfaceExtendsJavaInteface.kt"); - } - - @Test - @TestMetadata("kotlinMembersVsJavaNonVisibleStatics.kt") - public void testKotlinMembersVsJavaNonVisibleStatics() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/statics/kotlinMembersVsJavaNonVisibleStatics.kt"); - } - } - - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/synthesized") - @TestDataPath("$PROJECT_ROOT") - public class Synthesized { - @Test - public void testAllFilesPresentInSynthesized() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/synthesized"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_OLD, true); - } - - @Test - @TestMetadata("enumValuesValueOf.kt") - public void testEnumValuesValueOf() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/synthesized/enumValuesValueOf.kt"); - } - } - - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/traitImpl") - @TestDataPath("$PROJECT_ROOT") - public class TraitImpl { - @Test - public void testAllFilesPresentInTraitImpl() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/traitImpl"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_OLD, true); - } - - @Test - @TestMetadata("kt43611.kt") - public void testKt43611() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/traitImpl/kt43611.kt"); - } - } - - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/valueClasses") - @TestDataPath("$PROJECT_ROOT") - public class ValueClasses { - @Test - public void testAllFilesPresentInValueClasses() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/valueClasses"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_OLD, true); - } - } - } - - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/multifileClasses") - @TestDataPath("$PROJECT_ROOT") - public class MultifileClasses { - @Test - public void testAllFilesPresentInMultifileClasses() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_OLD, true); - } - - @Test - @TestMetadata("jvmSynthetic.kt") - public void testJvmSynthetic() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/multifileClasses/jvmSynthetic.kt"); - } - } - - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/scripts") - @TestDataPath("$PROJECT_ROOT") - public class Scripts { - @Test - public void testAllFilesPresentInScripts() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/scripts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_OLD, true); - } - } - - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/typeOf") - @TestDataPath("$PROJECT_ROOT") - public class TypeOf { - @Test - public void testAllFilesPresentInTypeOf() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/typeOf"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_OLD, true); - } - - @Test - @TestMetadata("nonReifiedTypeParameterWithRecursiveBound.kt") - public void testNonReifiedTypeParameterWithRecursiveBound() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/typeOf/nonReifiedTypeParameterWithRecursiveBound.kt"); - } - - @Test - @TestMetadata("suspendType.kt") - public void testSuspendType() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/typeOf/suspendType.kt"); - } - } - - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/valueClasses") - @TestDataPath("$PROJECT_ROOT") - public class ValueClasses { - @Test - public void testAllFilesPresentInValueClasses() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/valueClasses"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_OLD, true); - } - - @Test - @TestMetadata("cloneable.kt") - public void testCloneable() throws Exception { - runTest("compiler/testData/diagnostics/testsWithJvmBackend/valueClasses/cloneable.kt"); - } - } -} diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/AbstractDiagnosticsTestWithJvmBackend.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/AbstractDiagnosticsTestWithJvmBackend.kt index 1a89eb23211..c9d61fe8c77 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/AbstractDiagnosticsTestWithJvmBackend.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/AbstractDiagnosticsTestWithJvmBackend.kt @@ -8,10 +8,7 @@ package org.jetbrains.kotlin.test.runners import org.jetbrains.kotlin.platform.jvm.JvmPlatforms import org.jetbrains.kotlin.test.Constructor import org.jetbrains.kotlin.test.FirParser -import org.jetbrains.kotlin.test.InTextDirectivesUtils import org.jetbrains.kotlin.test.TargetBackend -import org.jetbrains.kotlin.test.backend.classic.ClassicBackendInput -import org.jetbrains.kotlin.test.backend.classic.ClassicJvmBackendFacade import org.jetbrains.kotlin.test.backend.handlers.JvmBackendDiagnosticsHandler import org.jetbrains.kotlin.test.backend.ir.IrBackendInput import org.jetbrains.kotlin.test.backend.ir.JvmIrBackendFacade @@ -21,7 +18,6 @@ import org.jetbrains.kotlin.test.builders.firHandlersStep import org.jetbrains.kotlin.test.builders.jvmArtifactsHandlersStep import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives import org.jetbrains.kotlin.test.directives.configureFirParser -import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontend2ClassicBackendConverter import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontend2IrConverter import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontendFacade import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontendOutputArtifact @@ -36,23 +32,20 @@ import org.jetbrains.kotlin.test.frontend.fir.handlers.FirDiagnosticsHandler import org.jetbrains.kotlin.test.model.* import org.jetbrains.kotlin.test.services.configuration.CommonEnvironmentConfigurator import org.jetbrains.kotlin.test.services.configuration.JvmEnvironmentConfigurator +import org.jetbrains.kotlin.test.services.configuration.ScriptingEnvironmentConfigurator import org.jetbrains.kotlin.test.services.sourceProviders.AdditionalDiagnosticsSourceFilesProvider import org.jetbrains.kotlin.test.services.sourceProviders.CoroutineHelpersSourceFilesProvider -import org.jetbrains.kotlin.test.services.configuration.ScriptingEnvironmentConfigurator -import java.io.File abstract class AbstractDiagnosticsTestWithJvmBackend, I : ResultingArtifact.BackendInput> : AbstractKotlinCompilerTest() { abstract val targetFrontend: FrontendKind - abstract val targetBackend: TargetBackend abstract val frontend: Constructor> abstract val converter: Constructor> - abstract val backendFacade: Constructor> override fun TestConfigurationBuilder.configuration() { globalDefaults { frontend = targetFrontend - targetBackend = this@AbstractDiagnosticsTestWithJvmBackend.targetBackend + targetBackend = TargetBackend.JVM_IR targetPlatform = JvmPlatforms.defaultJvmPlatform dependencyKind = DependencyKind.Binary } @@ -90,11 +83,7 @@ abstract class AbstractDiagnosticsTestWithJvmBackend() { - override val targetFrontend: FrontendKind - get() = FrontendKinds.ClassicFrontend - - override val targetBackend: TargetBackend - get() = TargetBackend.JVM_OLD - - override val frontend: Constructor> - get() = ::ClassicFrontendFacade - - override val converter: Constructor> - get() = ::ClassicFrontend2ClassicBackendConverter - - override val backendFacade: Constructor> - get() = ::ClassicJvmBackendFacade -} - abstract class AbstractDiagnosticsTestWithJvmIrBackend : AbstractDiagnosticsTestWithJvmBackend() { override val targetFrontend: FrontendKind get() = FrontendKinds.ClassicFrontend - override val targetBackend: TargetBackend - get() = TargetBackend.JVM_IR - override val frontend: Constructor> get() = ::ClassicFrontendFacade override val converter: Constructor> get() = ::ClassicFrontend2IrConverter - - override val backendFacade: Constructor> - get() = ::JvmIrBackendFacade } abstract class AbstractFirDiagnosticsTestWithJvmIrBackendBase( @@ -154,26 +119,12 @@ abstract class AbstractFirDiagnosticsTestWithJvmIrBackendBase( override val targetFrontend: FrontendKind get() = FrontendKinds.FIR - override val targetBackend: TargetBackend - get() = TargetBackend.JVM_IR - override val frontend: Constructor> get() = ::FirFrontendFacade override val converter: Constructor> get() = ::Fir2IrJvmResultsConverter - override val backendFacade: Constructor> - get() = ::JvmIrBackendFacade - - override fun runTest(filePath: String) { - val wholeFile = File(filePath) - val wholeText = wholeFile.readText() - // TODO: test infrastructure shouldn't allow to run such tests anyway - if (InTextDirectivesUtils.isDirectiveDefined(wholeText, "// TARGET_BACKEND: JVM_OLD")) return - super.runTest(filePath) - } - override fun configure(builder: TestConfigurationBuilder) { super.configure(builder) builder.configureFirParser(parser) 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 79a764a7f9c..3afacad1126 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 @@ -41,14 +41,6 @@ fun generateJUnit5CompilerTests(args: Array) { model("diagnostics/testsWithJsStdLib", excludedPattern = excludedCustomTestdataPattern) } - testClass { - model( - "diagnostics/testsWithJvmBackend", - targetBackend = TargetBackend.JVM_OLD, - excludedPattern = excludedCustomTestdataPattern - ) - } - testClass { model( "diagnostics/testsWithJvmBackend",