K2: add & fix tests for JVM BE diagnostics
This commit is contained in:
committed by
Space Team
parent
185e74fd26
commit
1826d9b332
+896
@@ -0,0 +1,896 @@
|
||||
/*
|
||||
* Copyright 2010-2022 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.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 FirOldDiagnosticsTestWithJvmIrBackendGenerated extends AbstractFirDiagnosticsTestWithJvmIrBackend {
|
||||
@Test
|
||||
public void testAllFilesPresentInTestsWithJvmBackend() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("indirectInlineCycle.kt")
|
||||
public void testIndirectInlineCycle() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/indirectInlineCycle.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("indirectInlineCycle_ir.kt")
|
||||
public void testIndirectInlineCycle_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/indirectInlineCycle_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineCycle.kt")
|
||||
public void testInlineCycle() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/inlineCycle.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineCycle_ir.kt")
|
||||
public void testInlineCycle_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/inlineCycle_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("multipleBigArityFunsImplemented.kt")
|
||||
public void testMultipleBigArityFunsImplemented() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/multipleBigArityFunsImplemented.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("multipleBigArityFunsImplemented_ir.kt")
|
||||
public void testMultipleBigArityFunsImplemented_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/multipleBigArityFunsImplemented_ir.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");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("suspendInlineCycle.kt")
|
||||
public void testSuspendInlineCycle() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/suspendInlineCycle.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("suspendInlineCycle_ir.kt")
|
||||
public void testSuspendInlineCycle_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/suspendInlineCycle_ir.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/dataObjects")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class DataObjects {
|
||||
@Test
|
||||
public void testAllFilesPresentInDataObjects() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/dataObjects"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("customReadResolve.kt")
|
||||
public void testCustomReadResolve() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/dataObjects/customReadResolve.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$"), null, 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$"), null, 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("defaultFunction_ir.kt")
|
||||
public void testDefaultFunction_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/defaultFunction_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultFunction_old.kt")
|
||||
public void testDefaultFunction_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/defaultFunction_old.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("delegatedFunctionOverriddenByProperty_ir.kt")
|
||||
public void testDelegatedFunctionOverriddenByProperty_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/delegatedFunctionOverriddenByProperty_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("delegatedFunctionOverriddenByProperty_old.kt")
|
||||
public void testDelegatedFunctionOverriddenByProperty_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/delegatedFunctionOverriddenByProperty_old.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericClassFunction.kt")
|
||||
public void testGenericClassFunction() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/genericClassFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overridesNothing_ir.kt")
|
||||
public void testOverridesNothing_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/overridesNothing_ir.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("traitFunctionOverriddenByProperty_ir.kt")
|
||||
public void testTraitFunctionOverriddenByProperty_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByProperty_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("traitFunctionOverriddenByProperty_old.kt")
|
||||
public void testTraitFunctionOverriddenByProperty_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByProperty_old.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("traitPropertyOverriddenByFunctionNoImpl.kt")
|
||||
public void testTraitPropertyOverriddenByFunctionNoImpl() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunctionNoImpl.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("traitPropertyOverriddenByFunction_ir.kt")
|
||||
public void testTraitPropertyOverriddenByFunction_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunction_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("traitPropertyOverriddenByFunction_old.kt")
|
||||
public void testTraitPropertyOverriddenByFunction_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunction_old.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$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("class_ir.kt")
|
||||
public void testClass_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/bridges/class_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("class_old.kt")
|
||||
public void testClass_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/bridges/class_old.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("fakeOverrideTrait_ir.kt")
|
||||
public void testFakeOverrideTrait_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/bridges/fakeOverrideTrait_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("fakeOverrideTrait_old.kt")
|
||||
public void testFakeOverrideTrait_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/bridges/fakeOverrideTrait_old.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("trait_ir.kt")
|
||||
public void testTrait_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/bridges/trait_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("trait_old.kt")
|
||||
public void testTrait_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/bridges/trait_old.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@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$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("clashFromInterfaceAndSuperClass_ir.kt")
|
||||
public void testClashFromInterfaceAndSuperClass_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/clashFromInterfaceAndSuperClass_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("clashFromInterfaceAndSuperClass_old.kt")
|
||||
public void testClashFromInterfaceAndSuperClass_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/clashFromInterfaceAndSuperClass_old.kt");
|
||||
}
|
||||
|
||||
@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("inheritFromTwoTraits_ir.kt")
|
||||
public void testInheritFromTwoTraits_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/inheritFromTwoTraits_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inheritFromTwoTraits_old.kt")
|
||||
public void testInheritFromTwoTraits_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/inheritFromTwoTraits_old.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("superTraitAndDelegationToTraitImpl_ir.kt")
|
||||
public void testSuperTraitAndDelegationToTraitImpl_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/superTraitAndDelegationToTraitImpl_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superTraitAndDelegationToTraitImpl_old.kt")
|
||||
public void testSuperTraitAndDelegationToTraitImpl_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/superTraitAndDelegationToTraitImpl_old.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("twoTraitsAndOwnFunction_ir.kt")
|
||||
public void testTwoTraitsAndOwnFunction_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/twoTraitsAndOwnFunction_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("twoTraitsAndOwnFunction_old.kt")
|
||||
public void testTwoTraitsAndOwnFunction_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/twoTraitsAndOwnFunction_old.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$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("enumMembers.kt")
|
||||
public void testEnumMembers() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("waitNotifyGetClass_ir.kt")
|
||||
public void testWaitNotifyGetClass_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/waitNotifyGetClass_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("waitNotifyGetClass_old.kt")
|
||||
public void testWaitNotifyGetClass_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/waitNotifyGetClass_old.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$"), null, 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");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("trait_ir.kt")
|
||||
public void testTrait_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty/trait_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("trait_old.kt")
|
||||
public void testTrait_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty/trait_old.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@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$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classObjectCopiedField.kt")
|
||||
public void testClassObjectCopiedField() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/classObjectCopiedField.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classObjectCopiedFieldObject_ir.kt")
|
||||
public void testClassObjectCopiedFieldObject_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/classObjectCopiedFieldObject_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classObjectCopiedFieldObject_old.kt")
|
||||
public void testClassObjectCopiedFieldObject_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/classObjectCopiedFieldObject_old.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classObject_ir.kt")
|
||||
public void testClassObject_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/classObject_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classObject_old.kt")
|
||||
public void testClassObject_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/classObject_old.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dataClassCopy.kt")
|
||||
public void testDataClassCopy() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/dataClassCopy.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaults_ir.kt")
|
||||
public void testDefaults_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/defaults_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaults_old.kt")
|
||||
public void testDefaults_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/defaults_old.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("delegationBy_ir.kt")
|
||||
public void testDelegationBy_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/delegationBy_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("delegationBy_old.kt")
|
||||
public void testDelegationBy_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/delegationBy_old.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("enum.kt")
|
||||
public void testEnum() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/enum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("innerClassField_ir.kt")
|
||||
public void testInnerClassField_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/innerClassField_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("innerClassField_old.kt")
|
||||
public void testInnerClassField_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/innerClassField_old.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("instance_ir.kt")
|
||||
public void testInstance_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/instance_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("instance_old.kt")
|
||||
public void testInstance_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/instance_old.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("propertyMetadataCache_ir.kt")
|
||||
public void testPropertyMetadataCache_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/propertyMetadataCache_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("propertyMetadataCache_old.kt")
|
||||
public void testPropertyMetadataCache_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/propertyMetadataCache_old.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$"), null, 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$"), null, 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$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultVsNonDefault_ir.kt")
|
||||
public void testDefaultVsNonDefault_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/traitImpl/defaultVsNonDefault_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultVsNonDefault_old.kt")
|
||||
public void testDefaultVsNonDefault_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/traitImpl/defaultVsNonDefault_old.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt43611.kt")
|
||||
public void testKt43611() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/traitImpl/kt43611.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("oneTrait_ir.kt")
|
||||
public void testOneTrait_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/traitImpl/oneTrait_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("oneTrait_old.kt")
|
||||
public void testOneTrait_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/traitImpl/oneTrait_old.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("traitFunctionOverriddenByPropertyInTrait_ir.kt")
|
||||
public void testTraitFunctionOverriddenByPropertyInTrait_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/traitImpl/traitFunctionOverriddenByPropertyInTrait_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("traitFunctionOverriddenByPropertyInTrait_old.kt")
|
||||
public void testTraitFunctionOverriddenByPropertyInTrait_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/traitImpl/traitFunctionOverriddenByPropertyInTrait_old.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("traitPropertyOverriddenByFunctionInTrait_ir.kt")
|
||||
public void testTraitPropertyOverriddenByFunctionInTrait_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/traitImpl/traitPropertyOverriddenByFunctionInTrait_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("traitPropertyOverriddenByFunctionInTrait_old.kt")
|
||||
public void testTraitPropertyOverriddenByFunctionInTrait_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/traitImpl/traitPropertyOverriddenByFunctionInTrait_old.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("twoTraits_ir.kt")
|
||||
public void testTwoTraits_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/traitImpl/twoTraits_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("twoTraits_old.kt")
|
||||
public void testTwoTraits_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/traitImpl/twoTraits_old.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@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$"), null, 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$"), null, 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$"), null, 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$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("cloneable.kt")
|
||||
public void testCloneable() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/valueClasses/cloneable.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,7 +76,7 @@ open class KtDiagnosticReporterWithContext(
|
||||
}
|
||||
|
||||
@OptIn(InternalDiagnosticFactoryMethod::class)
|
||||
fun <A1 : Any, A2: Any> report(
|
||||
fun <A1 : Any, A2 : Any> report(
|
||||
factory: KtDiagnosticFactory2<A1, A2>,
|
||||
a1: A1,
|
||||
a2: A2,
|
||||
@@ -85,6 +85,13 @@ open class KtDiagnosticReporterWithContext(
|
||||
sourceElement?.let { report(factory.on(it, a1, a2, positioningStrategy), this) }
|
||||
}
|
||||
|
||||
fun reportAndCommit(factory: KtDiagnosticFactory0) {
|
||||
sourceElement?.let {
|
||||
reportOn(it, factory, this)
|
||||
checkAndCommitReportsOn(it, this)
|
||||
}
|
||||
}
|
||||
|
||||
fun <A : Any> reportAndCommit(factory: KtDiagnosticFactory1<A>, a: A) {
|
||||
sourceElement?.let {
|
||||
reportOn(it, factory, a, this)
|
||||
|
||||
+1
-1
@@ -874,7 +874,7 @@ class ExpressionCodegen(
|
||||
|
||||
private fun generateGlobalReturnFlagIfPossible(expression: IrExpression, label: String) {
|
||||
if (state.isInlineDisabled) {
|
||||
context.ktDiagnosticReporter.at(expression, irFunction).report(BackendErrors.NON_LOCAL_RETURN_IN_DISABLED_INLINE)
|
||||
context.ktDiagnosticReporter.at(expression, irFunction).reportAndCommit(BackendErrors.NON_LOCAL_RETURN_IN_DISABLED_INLINE)
|
||||
genThrow(mv, "java/lang/UnsupportedOperationException", "Non-local returns are not allowed with inlining disabled")
|
||||
} else {
|
||||
generateGlobalReturnFlag(mv, label)
|
||||
|
||||
+2
-2
@@ -119,12 +119,12 @@ class IrInlineIntrinsicsSupport(
|
||||
override fun toKotlinType(type: IrType): KotlinType = type.toIrBasedKotlinType()
|
||||
|
||||
override fun reportSuspendTypeUnsupported() {
|
||||
classCodegen.context.ktDiagnosticReporter.at(reportErrorsOn, containingFile).report(JvmBackendErrors.TYPEOF_SUSPEND_TYPE)
|
||||
classCodegen.context.ktDiagnosticReporter.at(reportErrorsOn, containingFile).reportAndCommit(JvmBackendErrors.TYPEOF_SUSPEND_TYPE)
|
||||
}
|
||||
|
||||
override fun reportNonReifiedTypeParameterWithRecursiveBoundUnsupported(typeParameterName: Name) {
|
||||
classCodegen.context.ktDiagnosticReporter.at(reportErrorsOn, containingFile)
|
||||
.report(JvmBackendErrors.TYPEOF_NON_REIFIED_TYPE_PARAMETER_WITH_RECURSIVE_BOUND, typeParameterName.asString())
|
||||
.reportAndCommit(JvmBackendErrors.TYPEOF_NON_REIFIED_TYPE_PARAMETER_WITH_RECURSIVE_BOUND, typeParameterName.asString())
|
||||
}
|
||||
|
||||
override fun rewritePluginDefinedOperationMarker(v: InstructionAdapter, reifiedInsn: AbstractInsnNode, instructions: InsnList, type: IrType): Boolean {
|
||||
|
||||
+1
-1
@@ -129,7 +129,7 @@ class IrSourceCompilerForInline(
|
||||
override fun reportSuspensionPointInsideMonitor(stackTraceElement: String) {
|
||||
codegen.context.ktDiagnosticReporter
|
||||
.at(callElement.symbol.owner as IrDeclaration)
|
||||
.report(JvmBackendErrors.SUSPENSION_POINT_INSIDE_MONITOR, stackTraceElement)
|
||||
.reportAndCommit(JvmBackendErrors.SUSPENSION_POINT_INSIDE_MONITOR, stackTraceElement)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -33,12 +33,12 @@ class ConstEvaluationLowering(val context: JvmBackendContext) : FileLoweringPass
|
||||
override fun lower(irFile: IrFile) {
|
||||
fun onError(element: IrElement, error: IrErrorExpression) {
|
||||
context.ktDiagnosticReporter.at(element, irFile)
|
||||
.report(JvmBackendErrors.EXCEPTION_IN_CONST_VAL_INITIALIZER, error.description)
|
||||
.reportAndCommit(JvmBackendErrors.EXCEPTION_IN_CONST_VAL_INITIALIZER, error.description)
|
||||
}
|
||||
|
||||
fun onWarning(element: IrElement, warning: IrErrorExpression) {
|
||||
context.ktDiagnosticReporter.at(element, irFile)
|
||||
.report(JvmBackendErrors.EXCEPTION_IN_CONST_EXPRESSION, warning.description)
|
||||
.reportAndCommit(JvmBackendErrors.EXCEPTION_IN_CONST_EXPRESSION, warning.description)
|
||||
}
|
||||
|
||||
val suppressErrors = context.configuration.getBoolean(JVMConfigurationKeys.IGNORE_CONST_OPTIMIZATION_ERRORS)
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// IGNORE_FIR
|
||||
|
||||
open class B {
|
||||
fun getX() = 1
|
||||
}
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_FIR
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
interface B {
|
||||
fun getX() = 1
|
||||
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
interface B {
|
||||
fun getX() = 1
|
||||
}
|
||||
|
||||
class C : B {
|
||||
<!ACCIDENTAL_OVERRIDE!><!NOTHING_TO_OVERRIDE!>override<!> val x<!> = 1
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package
|
||||
|
||||
public interface B {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun getX(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class C : B {
|
||||
public constructor C()
|
||||
public open val x: kotlin.Int = 1
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun getX(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// IGNORE_FIR
|
||||
|
||||
interface T {
|
||||
fun getX(): Int
|
||||
}
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_FIR
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
interface T {
|
||||
fun getX() = 1
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_FIR
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
interface Foo<T> {
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_FIR
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
interface Foo<T> {
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_FIR
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
interface Foo<T> {
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// IGNORE_FIR
|
||||
|
||||
class G<T>
|
||||
|
||||
val <T> G<T>.foo: Int
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// IGNORE_FIR
|
||||
|
||||
interface A<T> {
|
||||
fun foo(l: List<T>)
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// IGNORE_FIR
|
||||
|
||||
enum class E {
|
||||
ENTRY;
|
||||
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_FIR
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
class C {
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_FIR
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
class C {
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// IGNORE_FIR
|
||||
|
||||
val x: Int
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>get()<!> = 1
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun getX()<!> = 1
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_FIR
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
interface T {
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_FIR
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
// FILE: A.java
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_FIR
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
// FILE: A.java
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_FIR
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
// FILE: A.java
|
||||
|
||||
Vendored
+3
-1
@@ -1,6 +1,8 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
interface A {
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun f(a: List<Int>): String<!> = TODO()
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>private fun f(<!UNUSED_PARAMETER!>a<!>: List<String>): String<!> = TODO()
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>private fun f(a: List<String>): String<!> = TODO()
|
||||
}
|
||||
|
||||
class B : A
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_FIR
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
interface T {
|
||||
|
||||
+8
-6
@@ -1,8 +1,10 @@
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(vararg <!UNUSED_PARAMETER!>x<!>: Int)<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(<!UNUSED_PARAMETER!>x<!>: IntArray)<!> {}
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(vararg <!UNUSED_PARAMETER!>x<!>: Int?)<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(<!UNUSED_PARAMETER!>x<!>: Array<Int>)<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(vararg x: Int)<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(x: IntArray)<!> {}
|
||||
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(vararg <!UNUSED_PARAMETER!>nn<!>: Number)<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(<!UNUSED_PARAMETER!>nn<!>: Array<out Number>)<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(vararg x: Int?)<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(x: Array<Int>)<!> {}
|
||||
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(vararg nn: Number)<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(nn: Array<out Number>)<!> {}
|
||||
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
// !LANGUAGE: +InlineClasses, -JvmInlineValueClasses
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER, -PLATFORM_CLASS_MAPPED_TO_KOTLIN
|
||||
// WITH_STDLIB
|
||||
|
||||
package kotlin.jvm
|
||||
|
||||
annotation class JvmInline
|
||||
|
||||
<!VALUE_CLASS_CANNOT_BE_CLONEABLE!>inline<!> class IC0(val a: Any): Cloneable
|
||||
|
||||
@JvmInline
|
||||
<!VALUE_CLASS_CANNOT_BE_CLONEABLE!>value<!> class VC0(val a: Any): Cloneable
|
||||
|
||||
<!VALUE_CLASS_CANNOT_BE_CLONEABLE!>inline<!> class IC1(val a: Any): java.lang.Cloneable
|
||||
|
||||
@JvmInline
|
||||
<!VALUE_CLASS_CANNOT_BE_CLONEABLE!>value<!> class VC1(val a: Any): java.lang.Cloneable
|
||||
|
||||
interface MyCloneable1: Cloneable
|
||||
|
||||
<!VALUE_CLASS_CANNOT_BE_CLONEABLE!>inline<!> class IC2(val a: Any): MyCloneable1
|
||||
|
||||
@JvmInline
|
||||
<!VALUE_CLASS_CANNOT_BE_CLONEABLE!>value<!> class VC2(val a: Any): MyCloneable1
|
||||
|
||||
interface MyCloneable2: java.lang.Cloneable
|
||||
|
||||
<!VALUE_CLASS_CANNOT_BE_CLONEABLE!>inline<!> class IC3(val a: Any): MyCloneable2
|
||||
|
||||
@JvmInline
|
||||
<!VALUE_CLASS_CANNOT_BE_CLONEABLE!>value<!> class VC3(val a: Any): MyCloneable2
|
||||
-95
@@ -1,95 +0,0 @@
|
||||
package
|
||||
|
||||
package kotlin {
|
||||
|
||||
package kotlin.jvm {
|
||||
|
||||
public final inline class IC0 : kotlin.Cloneable {
|
||||
public constructor IC0(/*0*/ a: kotlin.Any)
|
||||
public final val a: kotlin.Any
|
||||
protected open override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final inline class IC1 : java.lang.Cloneable {
|
||||
public constructor IC1(/*0*/ a: kotlin.Any)
|
||||
public final val a: kotlin.Any
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final inline class IC2 : kotlin.jvm.MyCloneable1 {
|
||||
public constructor IC2(/*0*/ a: kotlin.Any)
|
||||
public final val a: kotlin.Any
|
||||
protected open override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final inline class IC3 : kotlin.jvm.MyCloneable2 {
|
||||
public constructor IC3(/*0*/ a: kotlin.Any)
|
||||
public final val a: kotlin.Any
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final annotation class JvmInline : kotlin.Annotation {
|
||||
public constructor JvmInline()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface MyCloneable1 : kotlin.Cloneable {
|
||||
protected open override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface MyCloneable2 : java.lang.Cloneable {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline public final value class VC0 : kotlin.Cloneable {
|
||||
public constructor VC0(/*0*/ a: kotlin.Any)
|
||||
public final val a: kotlin.Any
|
||||
protected open override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline public final value class VC1 : java.lang.Cloneable {
|
||||
public constructor VC1(/*0*/ a: kotlin.Any)
|
||||
public final val a: kotlin.Any
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline public final value class VC2 : kotlin.jvm.MyCloneable1 {
|
||||
public constructor VC2(/*0*/ a: kotlin.Any)
|
||||
public final val a: kotlin.Any
|
||||
protected open override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmInline public final value class VC3 : kotlin.jvm.MyCloneable2 {
|
||||
public constructor VC3(/*0*/ a: kotlin.Any)
|
||||
public final val a: kotlin.Any
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
}
|
||||
-12
@@ -167,12 +167,6 @@ public class DiagnosticsTestWithJvmIrBackendGenerated extends AbstractDiagnostic
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/overridesNothing_ir.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overridesNothing_old.kt")
|
||||
public void testOverridesNothing_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/overridesNothing_old.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateClassFunctionOverriddenByProperty.kt")
|
||||
public void testPrivateClassFunctionOverriddenByProperty() throws Exception {
|
||||
@@ -785,11 +779,5 @@ public class DiagnosticsTestWithJvmIrBackendGenerated extends AbstractDiagnostic
|
||||
public void testCloneable() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/valueClasses/cloneable.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("cloneable.fir.kt")
|
||||
public void testCloneable_fir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/valueClasses/cloneable.fir.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-6
@@ -707,11 +707,5 @@ public class DiagnosticsTestWithOldJvmBackendGenerated extends AbstractDiagnosti
|
||||
public void testCloneable() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/valueClasses/cloneable.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("cloneable.fir.kt")
|
||||
public void testCloneable_fir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/valueClasses/cloneable.fir.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+24
-5
@@ -7,6 +7,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.InTextDirectivesUtils
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
import org.jetbrains.kotlin.test.backend.classic.ClassicBackendInput
|
||||
import org.jetbrains.kotlin.test.backend.classic.ClassicJvmBackendFacade
|
||||
@@ -15,6 +16,7 @@ import org.jetbrains.kotlin.test.backend.ir.IrBackendInput
|
||||
import org.jetbrains.kotlin.test.backend.ir.JvmIrBackendFacade
|
||||
import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder
|
||||
import org.jetbrains.kotlin.test.builders.classicFrontendHandlersStep
|
||||
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.frontend.classic.ClassicFrontend2ClassicBackendConverter
|
||||
@@ -27,12 +29,14 @@ import org.jetbrains.kotlin.test.frontend.classic.handlers.OldNewInferenceMetaIn
|
||||
import org.jetbrains.kotlin.test.frontend.fir.Fir2IrResultsConverter
|
||||
import org.jetbrains.kotlin.test.frontend.fir.FirFrontendFacade
|
||||
import org.jetbrains.kotlin.test.frontend.fir.FirOutputArtifact
|
||||
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.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<R : ResultingArtifact.FrontendOutput<R>, I : ResultingArtifact.BackendInput<I>> : AbstractKotlinCompilerTest() {
|
||||
abstract val targetFrontend: FrontendKind<R>
|
||||
@@ -68,11 +72,17 @@ abstract class AbstractDiagnosticsTestWithJvmBackend<R : ResultingArtifact.Front
|
||||
)
|
||||
|
||||
facadeStep(frontend)
|
||||
classicFrontendHandlersStep {
|
||||
useHandlers(
|
||||
::DeclarationsDumpHandler,
|
||||
::ClassicDiagnosticsHandler,
|
||||
)
|
||||
if (targetFrontend == FrontendKinds.ClassicFrontend) {
|
||||
classicFrontendHandlersStep {
|
||||
useHandlers(
|
||||
::DeclarationsDumpHandler,
|
||||
::ClassicDiagnosticsHandler,
|
||||
)
|
||||
}
|
||||
} else {
|
||||
firHandlersStep {
|
||||
useHandlers(::FirDiagnosticsHandler)
|
||||
}
|
||||
}
|
||||
|
||||
facadeStep(converter)
|
||||
@@ -135,4 +145,13 @@ abstract class AbstractFirDiagnosticsTestWithJvmIrBackend : AbstractDiagnosticsT
|
||||
|
||||
override val backendFacade: Constructor<BackendFacade<IrBackendInput, BinaryArtifacts.Jvm>>
|
||||
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
|
||||
if (InTextDirectivesUtils.isDirectiveDefined(wholeText, "// IGNORE_FIR")) return
|
||||
super.runTest(filePath)
|
||||
}
|
||||
}
|
||||
|
||||
+4
@@ -264,6 +264,10 @@ fun generateJUnit5CompilerTests(args: Array<String>) {
|
||||
model("diagnostics/firTestWithJvmBackend")
|
||||
}
|
||||
|
||||
testClass<AbstractFirDiagnosticsTestWithJvmIrBackend>(suiteTestClassName = "FirOldDiagnosticsTestWithJvmIrBackendGenerated") {
|
||||
model("diagnostics/testsWithJvmBackend")
|
||||
}
|
||||
|
||||
testClass<AbstractFirSerializeCompileKotlinAgainstInlineKotlinTest> {
|
||||
model("codegen/boxInline")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user