From ee53c5780f808df21194466c5ff49c83ad458d92 Mon Sep 17 00:00:00 2001 From: Ivan Kochurkin Date: Mon, 27 Feb 2023 20:07:17 +0100 Subject: [PATCH] [FIR] Extract K2 MPP test data to the separated directory --- ...LightTreeBlackBoxCodegenTestGenerated.java | 448 +++++++++++++----- .../FirPsiBlackBoxCodegenTestGenerated.java | 448 +++++++++++++----- .../defaultArguments/bothInExpectAndActual.kt | 5 +- .../bothInExpectAndActual2.kt | 5 +- .../defaultArguments/constructor.kt | 3 +- .../delegatedExpectedInterface.kt | 3 +- .../defaultArguments/dispatchReceiverValue.kt | 7 +- .../extensionReceiverValue.kt | 5 +- .../defaultArguments/function.kt | 4 +- .../inheritedFromCommonClass.kt | 5 +- .../inheritedFromExpectedClass.kt | 3 +- .../inheritedFromExpectedInterface.kt | 3 +- .../inheritedFromExpectedMethod.kt | 3 +- .../inheritedInExpectedDeclarations.kt | 3 +- .../inheritedViaAnotherInterfaceIndirectly.kt | 3 +- .../inlineFunctionWithDefaultLambda.kt | 3 +- .../multiplatform/defaultArguments/kt23239.kt | 3 +- .../multiplatform/defaultArguments/kt23739.kt | 3 +- .../parametersInArgumentValues.kt | 3 +- .../defaultArguments/superCall.kt | 1 + .../multiplatform/defaultArguments/suspend.kt | 3 +- .../defaultArguments/typeAlias.kt | 4 +- .../expectClassInJvmMultifileFacade.kt | 2 + .../box/multiplatform/expectProperty.kt | 5 +- ...annotationsViaActualTypeAliasFromBinary.kt | 99 ++++ .../expectClassInJvmMultifileFacade.kt | 28 ++ .../k2/annotations/optionalExpectation.kt | 42 ++ .../basic}/accessToLocalClassFromBackend.kt | 0 .../basic}/correctParentForTypeParameter.kt | 0 .../basic}/enumEntryNameCall.kt | 0 .../basic}/expectActualCallableReference.kt | 0 ...lDifferentExtensionReceiversOnOverloads.kt | 0 .../basic}/expectActualDifferentPackages.kt | 0 .../basic}/expectActualFakeOverrides.kt | 0 .../basic}/expectActualMultiCommon.kt | 0 .../basic}/expectActualOverloads.kt | 0 .../basic}/expectActualSimple.kt | 0 .../basic}/expectActualSimpleJs.kt | 0 .../basic}/expectActualTypealias.kt | 0 .../basic}/expectInterfaceInSupertypes.kt | 0 .../multiplatform/k2/basic/expectProperty.kt | 31 ++ .../basic}/fakeOverridesInPlatformModule.kt | 0 ...tRidOfDoubleBindingInFir2IrLazyProperty.kt | 0 .../basic}/independentCommonSourceModules.kt | 0 .../{multiModule => k2/basic}/kt-51753-1.kt | 0 .../{multiModule => k2/basic}/kt-51753-2.kt | 0 .../{multiModule => k2/basic}/kt-56329.kt | 0 .../k2/basic/noArgActualConstructor.kt | 35 ++ .../{multiModule => k2/basic}/valueClasses.kt | 0 .../k2/defaultArguments/annotations.kt | 38 ++ .../defaultArguments/bothInExpectAndActual.kt | 32 ++ .../bothInExpectAndActual2.kt | 34 ++ .../k2/defaultArguments/constructor.kt | 26 + .../delegatedExpectedInterface.kt | 72 +++ .../defaultArguments/dispatchReceiverValue.kt | 23 + .../extensionReceiverValue.kt | 19 + .../k2/defaultArguments/function.kt | 37 ++ .../functionFromOtherModule.kt | 21 + .../inheritedFromCommonClass.kt | 29 ++ .../inheritedFromExpectedClass.kt | 33 ++ .../inheritedFromExpectedInterface.kt | 21 + .../inheritedFromExpectedMethod.kt | 34 ++ .../inheritedInExpectedDeclarations.kt | 38 ++ .../inheritedViaAnotherInterfaceIndirectly.kt | 52 ++ .../inlineFunctionWithDefaultLambda.kt | 37 ++ .../k2/defaultArguments/jvmOverloads.kt | 35 ++ .../k2/defaultArguments/kt23239.kt | 39 ++ .../k2/defaultArguments/kt23739.kt | 19 + .../defaultArguments/nestedEnumEntryValue.kt | 33 ++ .../parametersInArgumentValues.kt | 20 + .../k2/defaultArguments/superCall.kt | 44 ++ .../k2/defaultArguments/suspend.kt | 38 ++ .../k2/defaultArguments/typeAlias.kt | 25 + .../k2/defaultArguments/withTypeParameter.kt | 64 +++ .../codegen/BlackBoxCodegenTestGenerated.java | 340 ++++++++++--- .../IrBlackBoxCodegenTestGenerated.java | 448 +++++++++++++----- .../LightAnalysisModeTestGenerated.java | 302 ++++++++++-- .../js/test/JsCodegenBoxTestGenerated.java | 190 ++++++++ .../fir/FirJsCodegenBoxTestGenerated.java | 202 +++++++- .../test/ir/IrJsCodegenBoxTestGenerated.java | 202 +++++++- .../ir/IrJsES6CodegenBoxTestGenerated.java | 202 +++++++- .../K2NativeCodegenBoxTestGenerated.java | 202 ++++++++ .../NativeCodegenBoxTestGenerated.java | 198 ++++++++ .../test/IrCodegenBoxWasmTestGenerated.java | 177 +++++++ 84 files changed, 4036 insertions(+), 500 deletions(-) create mode 100644 compiler/testData/codegen/box/multiplatform/k2/annotations/annotationsViaActualTypeAliasFromBinary.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/annotations/expectClassInJvmMultifileFacade.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/annotations/optionalExpectation.kt rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/accessToLocalClassFromBackend.kt (100%) rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/correctParentForTypeParameter.kt (100%) rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/enumEntryNameCall.kt (100%) rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/expectActualCallableReference.kt (100%) rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/expectActualDifferentExtensionReceiversOnOverloads.kt (100%) rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/expectActualDifferentPackages.kt (100%) rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/expectActualFakeOverrides.kt (100%) rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/expectActualMultiCommon.kt (100%) rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/expectActualOverloads.kt (100%) rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/expectActualSimple.kt (100%) rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/expectActualSimpleJs.kt (100%) rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/expectActualTypealias.kt (100%) rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/expectInterfaceInSupertypes.kt (100%) create mode 100644 compiler/testData/codegen/box/multiplatform/k2/basic/expectProperty.kt rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/fakeOverridesInPlatformModule.kt (100%) rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/getRidOfDoubleBindingInFir2IrLazyProperty.kt (100%) rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/independentCommonSourceModules.kt (100%) rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/kt-51753-1.kt (100%) rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/kt-51753-2.kt (100%) rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/kt-56329.kt (100%) create mode 100644 compiler/testData/codegen/box/multiplatform/k2/basic/noArgActualConstructor.kt rename compiler/testData/codegen/box/multiplatform/{multiModule => k2/basic}/valueClasses.kt (100%) create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/annotations.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual2.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/constructor.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/delegatedExpectedInterface.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/dispatchReceiverValue.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/extensionReceiverValue.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/function.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/functionFromOtherModule.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromCommonClass.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedClass.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedInterface.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedMethod.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedInExpectedDeclarations.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inlineFunctionWithDefaultLambda.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/jvmOverloads.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23239.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23739.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/nestedEnumEntryValue.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/parametersInArgumentValues.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/superCall.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/suspend.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/typeAlias.kt create mode 100644 compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java index 2bbd72170b4..dee7a88cfcc 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java @@ -33119,140 +33119,360 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr } } + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + public class K2 { + @Test + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations") + @TestDataPath("$PROJECT_ROOT") + public class Annotations { + @Test + public void testAllFilesPresentInAnnotations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("annotationsViaActualTypeAliasFromBinary.kt") + public void testAnnotationsViaActualTypeAliasFromBinary() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/annotationsViaActualTypeAliasFromBinary.kt"); + } + + @Test + @TestMetadata("expectClassInJvmMultifileFacade.kt") + public void testExpectClassInJvmMultifileFacade() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/expectClassInJvmMultifileFacade.kt"); + } + + @Test + @TestMetadata("optionalExpectation.kt") + public void testOptionalExpectation() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/optionalExpectation.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/basic") + @TestDataPath("$PROJECT_ROOT") + public class Basic { + @Test + @TestMetadata("accessToLocalClassFromBackend.kt") + public void testAccessToLocalClassFromBackend() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/accessToLocalClassFromBackend.kt"); + } + + @Test + public void testAllFilesPresentInBasic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/basic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("correctParentForTypeParameter.kt") + public void testCorrectParentForTypeParameter() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/correctParentForTypeParameter.kt"); + } + + @Test + @TestMetadata("enumEntryNameCall.kt") + public void testEnumEntryNameCall() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/enumEntryNameCall.kt"); + } + + @Test + @TestMetadata("expectActualCallableReference.kt") + public void testExpectActualCallableReference() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualCallableReference.kt"); + } + + @Test + @TestMetadata("expectActualDifferentExtensionReceiversOnOverloads.kt") + public void testExpectActualDifferentExtensionReceiversOnOverloads() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualDifferentExtensionReceiversOnOverloads.kt"); + } + + @Test + @TestMetadata("expectActualDifferentPackages.kt") + public void testExpectActualDifferentPackages() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualDifferentPackages.kt"); + } + + @Test + @TestMetadata("expectActualFakeOverrides.kt") + public void testExpectActualFakeOverrides() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt"); + } + + @Test + @TestMetadata("expectActualMultiCommon.kt") + public void testExpectActualMultiCommon() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualMultiCommon.kt"); + } + + @Test + @TestMetadata("expectActualOverloads.kt") + public void testExpectActualOverloads() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualOverloads.kt"); + } + + @Test + @TestMetadata("expectActualSimple.kt") + public void testExpectActualSimple() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualSimple.kt"); + } + + @Test + @TestMetadata("expectActualTypealias.kt") + public void testExpectActualTypealias() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualTypealias.kt"); + } + + @Test + @TestMetadata("expectInterfaceInSupertypes.kt") + public void testExpectInterfaceInSupertypes() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt"); + } + + @Test + @TestMetadata("expectProperty.kt") + public void testExpectProperty() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectProperty.kt"); + } + + @Test + @TestMetadata("fakeOverridesInPlatformModule.kt") + public void testFakeOverridesInPlatformModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/fakeOverridesInPlatformModule.kt"); + } + + @Test + @TestMetadata("getRidOfDoubleBindingInFir2IrLazyProperty.kt") + public void testGetRidOfDoubleBindingInFir2IrLazyProperty() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/getRidOfDoubleBindingInFir2IrLazyProperty.kt"); + } + + @Test + @TestMetadata("independentCommonSourceModules.kt") + public void testIndependentCommonSourceModules() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt"); + } + + @Test + @TestMetadata("kt-51753-1.kt") + public void testKt_51753_1() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-51753-1.kt"); + } + + @Test + @TestMetadata("kt-51753-2.kt") + public void testKt_51753_2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-51753-2.kt"); + } + + @Test + @TestMetadata("kt-56329.kt") + public void testKt_56329() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); + } + + @Test + @TestMetadata("noArgActualConstructor.kt") + public void testNoArgActualConstructor() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/noArgActualConstructor.kt"); + } + + @Test + @TestMetadata("valueClasses.kt") + public void testValueClasses() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/valueClasses.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/defaultArguments") + @TestDataPath("$PROJECT_ROOT") + public class DefaultArguments { + @Test + public void testAllFilesPresentInDefaultArguments() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("annotations.kt") + public void testAnnotations() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/annotations.kt"); + } + + @Test + @TestMetadata("bothInExpectAndActual.kt") + public void testBothInExpectAndActual() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual.kt"); + } + + @Test + @TestMetadata("bothInExpectAndActual2.kt") + public void testBothInExpectAndActual2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual2.kt"); + } + + @Test + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/constructor.kt"); + } + + @Test + @TestMetadata("delegatedExpectedInterface.kt") + public void testDelegatedExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/delegatedExpectedInterface.kt"); + } + + @Test + @TestMetadata("dispatchReceiverValue.kt") + public void testDispatchReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/dispatchReceiverValue.kt"); + } + + @Test + @TestMetadata("extensionReceiverValue.kt") + public void testExtensionReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/extensionReceiverValue.kt"); + } + + @Test + @TestMetadata("function.kt") + public void testFunction() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/function.kt"); + } + + @Test + @TestMetadata("functionFromOtherModule.kt") + public void testFunctionFromOtherModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/functionFromOtherModule.kt"); + } + + @Test + @TestMetadata("inheritedFromCommonClass.kt") + public void testInheritedFromCommonClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromCommonClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedClass.kt") + public void testInheritedFromExpectedClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedInterface.kt") + public void testInheritedFromExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedInterface.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedMethod.kt") + public void testInheritedFromExpectedMethod() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedMethod.kt"); + } + + @Test + @TestMetadata("inheritedInExpectedDeclarations.kt") + public void testInheritedInExpectedDeclarations() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedInExpectedDeclarations.kt"); + } + + @Test + @TestMetadata("inheritedViaAnotherInterfaceIndirectly.kt") + public void testInheritedViaAnotherInterfaceIndirectly() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt"); + } + + @Test + @TestMetadata("inlineFunctionWithDefaultLambda.kt") + public void testInlineFunctionWithDefaultLambda() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inlineFunctionWithDefaultLambda.kt"); + } + + @Test + @TestMetadata("jvmOverloads.kt") + public void testJvmOverloads() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/jvmOverloads.kt"); + } + + @Test + @TestMetadata("kt23239.kt") + public void testKt23239() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23239.kt"); + } + + @Test + @TestMetadata("kt23739.kt") + public void testKt23739() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23739.kt"); + } + + @Test + @TestMetadata("nestedEnumEntryValue.kt") + public void testNestedEnumEntryValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/nestedEnumEntryValue.kt"); + } + + @Test + @TestMetadata("parametersInArgumentValues.kt") + public void testParametersInArgumentValues() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/parametersInArgumentValues.kt"); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/superCall.kt"); + } + + @Test + @TestMetadata("suspend.kt") + public void testSuspend() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/suspend.kt"); + } + + @Test + @TestMetadata("typeAlias.kt") + public void testTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/typeAlias.kt"); + } + + @Test + @TestMetadata("withTypeParameter.kt") + public void testWithTypeParameter() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") public class MultiModule { - @Test - @TestMetadata("accessToLocalClassFromBackend.kt") - public void testAccessToLocalClassFromBackend() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/accessToLocalClassFromBackend.kt"); - } - @Test public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } - @Test - @TestMetadata("correctParentForTypeParameter.kt") - public void testCorrectParentForTypeParameter() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/correctParentForTypeParameter.kt"); - } - - @Test - @TestMetadata("enumEntryNameCall.kt") - public void testEnumEntryNameCall() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/enumEntryNameCall.kt"); - } - - @Test - @TestMetadata("expectActualCallableReference.kt") - public void testExpectActualCallableReference() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualCallableReference.kt"); - } - - @Test - @TestMetadata("expectActualDifferentExtensionReceiversOnOverloads.kt") - public void testExpectActualDifferentExtensionReceiversOnOverloads() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualDifferentExtensionReceiversOnOverloads.kt"); - } - - @Test - @TestMetadata("expectActualDifferentPackages.kt") - public void testExpectActualDifferentPackages() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualDifferentPackages.kt"); - } - - @Test - @TestMetadata("expectActualFakeOverrides.kt") - public void testExpectActualFakeOverrides() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualFakeOverrides.kt"); - } - - @Test - @TestMetadata("expectActualMultiCommon.kt") - public void testExpectActualMultiCommon() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualMultiCommon.kt"); - } - - @Test - @TestMetadata("expectActualOverloads.kt") - public void testExpectActualOverloads() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualOverloads.kt"); - } - - @Test - @TestMetadata("expectActualSimple.kt") - public void testExpectActualSimple() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualSimple.kt"); - } - - @Test - @TestMetadata("expectActualTypealias.kt") - public void testExpectActualTypealias() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualTypealias.kt"); - } - - @Test - @TestMetadata("expectInterfaceInSupertypes.kt") - public void testExpectInterfaceInSupertypes() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectInterfaceInSupertypes.kt"); - } - @Test @TestMetadata("expectInterfaceInheritance.kt") public void testExpectInterfaceInheritance() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectInterfaceInheritance.kt"); } - @Test - @TestMetadata("fakeOverridesInPlatformModule.kt") - public void testFakeOverridesInPlatformModule() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/fakeOverridesInPlatformModule.kt"); - } - - @Test - @TestMetadata("getRidOfDoubleBindingInFir2IrLazyProperty.kt") - public void testGetRidOfDoubleBindingInFir2IrLazyProperty() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/getRidOfDoubleBindingInFir2IrLazyProperty.kt"); - } - @Test @TestMetadata("hmppSimple.kt") public void testHmppSimple() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/multiModule/hmppSimple.kt"); } - - @Test - @TestMetadata("independentCommonSourceModules.kt") - public void testIndependentCommonSourceModules() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/independentCommonSourceModules.kt"); - } - - @Test - @TestMetadata("kt-51753-1.kt") - public void testKt_51753_1() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/kt-51753-1.kt"); - } - - @Test - @TestMetadata("kt-51753-2.kt") - public void testKt_51753_2() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/kt-51753-2.kt"); - } - - @Test - @TestMetadata("kt-56329.kt") - public void testKt_56329() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/kt-56329.kt"); - } - - @Test - @TestMetadata("valueClasses.kt") - public void testValueClasses() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/valueClasses.kt"); - } } } diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java index e916bab3b8c..02606775f0b 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java @@ -33119,140 +33119,360 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo } } + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + public class K2 { + @Test + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations") + @TestDataPath("$PROJECT_ROOT") + public class Annotations { + @Test + public void testAllFilesPresentInAnnotations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("annotationsViaActualTypeAliasFromBinary.kt") + public void testAnnotationsViaActualTypeAliasFromBinary() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/annotationsViaActualTypeAliasFromBinary.kt"); + } + + @Test + @TestMetadata("expectClassInJvmMultifileFacade.kt") + public void testExpectClassInJvmMultifileFacade() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/expectClassInJvmMultifileFacade.kt"); + } + + @Test + @TestMetadata("optionalExpectation.kt") + public void testOptionalExpectation() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/optionalExpectation.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/basic") + @TestDataPath("$PROJECT_ROOT") + public class Basic { + @Test + @TestMetadata("accessToLocalClassFromBackend.kt") + public void testAccessToLocalClassFromBackend() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/accessToLocalClassFromBackend.kt"); + } + + @Test + public void testAllFilesPresentInBasic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/basic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("correctParentForTypeParameter.kt") + public void testCorrectParentForTypeParameter() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/correctParentForTypeParameter.kt"); + } + + @Test + @TestMetadata("enumEntryNameCall.kt") + public void testEnumEntryNameCall() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/enumEntryNameCall.kt"); + } + + @Test + @TestMetadata("expectActualCallableReference.kt") + public void testExpectActualCallableReference() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualCallableReference.kt"); + } + + @Test + @TestMetadata("expectActualDifferentExtensionReceiversOnOverloads.kt") + public void testExpectActualDifferentExtensionReceiversOnOverloads() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualDifferentExtensionReceiversOnOverloads.kt"); + } + + @Test + @TestMetadata("expectActualDifferentPackages.kt") + public void testExpectActualDifferentPackages() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualDifferentPackages.kt"); + } + + @Test + @TestMetadata("expectActualFakeOverrides.kt") + public void testExpectActualFakeOverrides() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt"); + } + + @Test + @TestMetadata("expectActualMultiCommon.kt") + public void testExpectActualMultiCommon() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualMultiCommon.kt"); + } + + @Test + @TestMetadata("expectActualOverloads.kt") + public void testExpectActualOverloads() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualOverloads.kt"); + } + + @Test + @TestMetadata("expectActualSimple.kt") + public void testExpectActualSimple() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualSimple.kt"); + } + + @Test + @TestMetadata("expectActualTypealias.kt") + public void testExpectActualTypealias() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualTypealias.kt"); + } + + @Test + @TestMetadata("expectInterfaceInSupertypes.kt") + public void testExpectInterfaceInSupertypes() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt"); + } + + @Test + @TestMetadata("expectProperty.kt") + public void testExpectProperty() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectProperty.kt"); + } + + @Test + @TestMetadata("fakeOverridesInPlatformModule.kt") + public void testFakeOverridesInPlatformModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/fakeOverridesInPlatformModule.kt"); + } + + @Test + @TestMetadata("getRidOfDoubleBindingInFir2IrLazyProperty.kt") + public void testGetRidOfDoubleBindingInFir2IrLazyProperty() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/getRidOfDoubleBindingInFir2IrLazyProperty.kt"); + } + + @Test + @TestMetadata("independentCommonSourceModules.kt") + public void testIndependentCommonSourceModules() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt"); + } + + @Test + @TestMetadata("kt-51753-1.kt") + public void testKt_51753_1() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-51753-1.kt"); + } + + @Test + @TestMetadata("kt-51753-2.kt") + public void testKt_51753_2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-51753-2.kt"); + } + + @Test + @TestMetadata("kt-56329.kt") + public void testKt_56329() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); + } + + @Test + @TestMetadata("noArgActualConstructor.kt") + public void testNoArgActualConstructor() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/noArgActualConstructor.kt"); + } + + @Test + @TestMetadata("valueClasses.kt") + public void testValueClasses() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/valueClasses.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/defaultArguments") + @TestDataPath("$PROJECT_ROOT") + public class DefaultArguments { + @Test + public void testAllFilesPresentInDefaultArguments() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("annotations.kt") + public void testAnnotations() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/annotations.kt"); + } + + @Test + @TestMetadata("bothInExpectAndActual.kt") + public void testBothInExpectAndActual() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual.kt"); + } + + @Test + @TestMetadata("bothInExpectAndActual2.kt") + public void testBothInExpectAndActual2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual2.kt"); + } + + @Test + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/constructor.kt"); + } + + @Test + @TestMetadata("delegatedExpectedInterface.kt") + public void testDelegatedExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/delegatedExpectedInterface.kt"); + } + + @Test + @TestMetadata("dispatchReceiverValue.kt") + public void testDispatchReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/dispatchReceiverValue.kt"); + } + + @Test + @TestMetadata("extensionReceiverValue.kt") + public void testExtensionReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/extensionReceiverValue.kt"); + } + + @Test + @TestMetadata("function.kt") + public void testFunction() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/function.kt"); + } + + @Test + @TestMetadata("functionFromOtherModule.kt") + public void testFunctionFromOtherModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/functionFromOtherModule.kt"); + } + + @Test + @TestMetadata("inheritedFromCommonClass.kt") + public void testInheritedFromCommonClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromCommonClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedClass.kt") + public void testInheritedFromExpectedClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedInterface.kt") + public void testInheritedFromExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedInterface.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedMethod.kt") + public void testInheritedFromExpectedMethod() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedMethod.kt"); + } + + @Test + @TestMetadata("inheritedInExpectedDeclarations.kt") + public void testInheritedInExpectedDeclarations() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedInExpectedDeclarations.kt"); + } + + @Test + @TestMetadata("inheritedViaAnotherInterfaceIndirectly.kt") + public void testInheritedViaAnotherInterfaceIndirectly() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt"); + } + + @Test + @TestMetadata("inlineFunctionWithDefaultLambda.kt") + public void testInlineFunctionWithDefaultLambda() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inlineFunctionWithDefaultLambda.kt"); + } + + @Test + @TestMetadata("jvmOverloads.kt") + public void testJvmOverloads() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/jvmOverloads.kt"); + } + + @Test + @TestMetadata("kt23239.kt") + public void testKt23239() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23239.kt"); + } + + @Test + @TestMetadata("kt23739.kt") + public void testKt23739() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23739.kt"); + } + + @Test + @TestMetadata("nestedEnumEntryValue.kt") + public void testNestedEnumEntryValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/nestedEnumEntryValue.kt"); + } + + @Test + @TestMetadata("parametersInArgumentValues.kt") + public void testParametersInArgumentValues() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/parametersInArgumentValues.kt"); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/superCall.kt"); + } + + @Test + @TestMetadata("suspend.kt") + public void testSuspend() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/suspend.kt"); + } + + @Test + @TestMetadata("typeAlias.kt") + public void testTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/typeAlias.kt"); + } + + @Test + @TestMetadata("withTypeParameter.kt") + public void testWithTypeParameter() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") public class MultiModule { - @Test - @TestMetadata("accessToLocalClassFromBackend.kt") - public void testAccessToLocalClassFromBackend() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/accessToLocalClassFromBackend.kt"); - } - @Test public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } - @Test - @TestMetadata("correctParentForTypeParameter.kt") - public void testCorrectParentForTypeParameter() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/correctParentForTypeParameter.kt"); - } - - @Test - @TestMetadata("enumEntryNameCall.kt") - public void testEnumEntryNameCall() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/enumEntryNameCall.kt"); - } - - @Test - @TestMetadata("expectActualCallableReference.kt") - public void testExpectActualCallableReference() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualCallableReference.kt"); - } - - @Test - @TestMetadata("expectActualDifferentExtensionReceiversOnOverloads.kt") - public void testExpectActualDifferentExtensionReceiversOnOverloads() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualDifferentExtensionReceiversOnOverloads.kt"); - } - - @Test - @TestMetadata("expectActualDifferentPackages.kt") - public void testExpectActualDifferentPackages() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualDifferentPackages.kt"); - } - - @Test - @TestMetadata("expectActualFakeOverrides.kt") - public void testExpectActualFakeOverrides() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualFakeOverrides.kt"); - } - - @Test - @TestMetadata("expectActualMultiCommon.kt") - public void testExpectActualMultiCommon() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualMultiCommon.kt"); - } - - @Test - @TestMetadata("expectActualOverloads.kt") - public void testExpectActualOverloads() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualOverloads.kt"); - } - - @Test - @TestMetadata("expectActualSimple.kt") - public void testExpectActualSimple() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualSimple.kt"); - } - - @Test - @TestMetadata("expectActualTypealias.kt") - public void testExpectActualTypealias() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualTypealias.kt"); - } - - @Test - @TestMetadata("expectInterfaceInSupertypes.kt") - public void testExpectInterfaceInSupertypes() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectInterfaceInSupertypes.kt"); - } - @Test @TestMetadata("expectInterfaceInheritance.kt") public void testExpectInterfaceInheritance() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectInterfaceInheritance.kt"); } - @Test - @TestMetadata("fakeOverridesInPlatformModule.kt") - public void testFakeOverridesInPlatformModule() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/fakeOverridesInPlatformModule.kt"); - } - - @Test - @TestMetadata("getRidOfDoubleBindingInFir2IrLazyProperty.kt") - public void testGetRidOfDoubleBindingInFir2IrLazyProperty() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/getRidOfDoubleBindingInFir2IrLazyProperty.kt"); - } - @Test @TestMetadata("hmppSimple.kt") public void testHmppSimple() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/multiModule/hmppSimple.kt"); } - - @Test - @TestMetadata("independentCommonSourceModules.kt") - public void testIndependentCommonSourceModules() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/independentCommonSourceModules.kt"); - } - - @Test - @TestMetadata("kt-51753-1.kt") - public void testKt_51753_1() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/kt-51753-1.kt"); - } - - @Test - @TestMetadata("kt-51753-2.kt") - public void testKt_51753_2() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/kt-51753-2.kt"); - } - - @Test - @TestMetadata("kt-56329.kt") - public void testKt_56329() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/kt-56329.kt"); - } - - @Test - @TestMetadata("valueClasses.kt") - public void testValueClasses() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/valueClasses.kt"); - } } } diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/bothInExpectAndActual.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/bothInExpectAndActual.kt index 5144b47ce02..ff917b9d893 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/bothInExpectAndActual.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/bothInExpectAndActual.kt @@ -1,7 +1,8 @@ // !LANGUAGE: +MultiPlatformProjects // IGNORE_BACKEND: NATIVE -// IGNORE_BACKEND_K2: JVM_IR, JS_IR -// FIR status: default argument mapping in MPP isn't designed yet +// IGNORE_BACKEND_K2: ANY +// FIR status: outdated code (expect and actual in the same module) + // FILE: common.kt public expect fun Array.copyInto( diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/bothInExpectAndActual2.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/bothInExpectAndActual2.kt index 0c626746e52..3a7cab2e617 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/bothInExpectAndActual2.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/bothInExpectAndActual2.kt @@ -1,7 +1,8 @@ // !LANGUAGE: +MultiPlatformProjects // IGNORE_BACKEND: NATIVE -// IGNORE_BACKEND_K2: JVM_IR, JS_IR -// FIR status: default argument mapping in MPP isn't designed yet +// IGNORE_BACKEND_K2: ANY +// FIR status: outdated code (expect and actual in the same module) + // FILE: common.kt expect interface I { diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/constructor.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/constructor.kt index 23b3cb3b601..cc7a97cfdd5 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/constructor.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/constructor.kt @@ -1,5 +1,6 @@ // !LANGUAGE: +MultiPlatformProjects -// IGNORE_BACKEND_K2: NATIVE +// IGNORE_BACKEND_K2: ANY +// FIR status: outdated code (expect and actual in the same module) // WITH_STDLIB // FILE: common.kt diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/delegatedExpectedInterface.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/delegatedExpectedInterface.kt index 369b5353185..a3548bead25 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/delegatedExpectedInterface.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/delegatedExpectedInterface.kt @@ -1,5 +1,6 @@ // !LANGUAGE: +MultiPlatformProjects -// IGNORE_BACKEND_K2: NATIVE +// IGNORE_BACKEND_K2: ANY +// FIR status: outdated code (expect and actual in the same module) // FILE: lib.kt expect interface I { diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/dispatchReceiverValue.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/dispatchReceiverValue.kt index 1d5bfcdf35a..7b28e025619 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/dispatchReceiverValue.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/dispatchReceiverValue.kt @@ -1,8 +1,7 @@ -// IGNORE_BACKEND: WASM -// IGNORE_BACKEND: JS_IR, JS_IR_ES6 +// IGNORE_BACKEND: WASM, JS_IR, JS_IR_ES6, NATIVE // WASM_MUTE_REASON: EXPECT_DEFAULT_PARAMETERS -// IGNORE_BACKEND_K2: JVM_IR, NATIVE -// FIR status: default argument mapping in MPP isn't designed yet +// IGNORE_BACKEND_K2: JVM, JVM_IR +// FIR status: outdated code (expect and actual in the same module) // !LANGUAGE: +MultiPlatformProjects // KT-41901 diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/extensionReceiverValue.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/extensionReceiverValue.kt index 23ed6286f35..99141b02ea7 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/extensionReceiverValue.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/extensionReceiverValue.kt @@ -1,6 +1,7 @@ -// IGNORE_BACKEND_K2: JVM_IR, JS_IR, NATIVE -// FIR status: default argument mapping in MPP isn't designed yet +// IGNORE_BACKEND_K2: ANY // !LANGUAGE: +MultiPlatformProjects +// FIR status: outdated code (expect and actual in the same module) + // FILE: common.kt class Receiver(val value: String) diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/function.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/function.kt index 26e86cfb137..bd8816de315 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/function.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/function.kt @@ -1,6 +1,6 @@ // !LANGUAGE: +MultiPlatformProjects -// IGNORE_BACKEND_K2: NATIVE -// FIR status: default argument mapping in MPP isn't designed yet +// IGNORE_BACKEND_K2: ANY +// FIR status: outdated code (expect and actual in the same module) // WITH_STDLIB // FILE: common.kt diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromCommonClass.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromCommonClass.kt index 0ad1c806edd..dba5048021b 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromCommonClass.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromCommonClass.kt @@ -1,7 +1,8 @@ // !LANGUAGE: +MultiPlatformProjects -// IGNORE_BACKEND_K2: JVM_IR, JS_IR, NATIVE -// FIR status: default argument mapping in MPP isn't designed yet +// IGNORE_BACKEND_K2: ANY +// FIR status: outdated code (expect and actual in the same module) // WITH_STDLIB + // FILE: common.kt open class A() { diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedClass.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedClass.kt index 5402f4947ff..52479215b82 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedClass.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedClass.kt @@ -1,5 +1,6 @@ // !LANGUAGE: +MultiPlatformProjects -// IGNORE_BACKEND_K2: NATIVE +// IGNORE_BACKEND_K2: ANY +// FIR status: outdated code (expect and actual in the same module) // WITH_STDLIB // FILE: common.kt diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedInterface.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedInterface.kt index 7362356f9b1..4cea9a370d3 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedInterface.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedInterface.kt @@ -1,5 +1,6 @@ // !LANGUAGE: +MultiPlatformProjects -// IGNORE_BACKEND_K2: NATIVE +// IGNORE_BACKEND_K2: ANY +// FIR status: outdated code (expect and actual in the same module) // FILE: lib.kt expect interface I { diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedMethod.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedMethod.kt index c7eca8852ec..e3c69c13bcd 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedMethod.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedMethod.kt @@ -1,5 +1,6 @@ // !LANGUAGE: +MultiPlatformProjects -// IGNORE_BACKEND_K2: NATIVE +// IGNORE_BACKEND_K2: ANY +// FIR status: outdated code (expect and actual in the same module) // WITH_STDLIB // FILE: common.kt diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedInExpectedDeclarations.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedInExpectedDeclarations.kt index 471697f0f3c..0f126f6c2cb 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedInExpectedDeclarations.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedInExpectedDeclarations.kt @@ -1,5 +1,6 @@ // !LANGUAGE: +MultiPlatformProjects -// IGNORE_BACKEND_K2: NATIVE +// IGNORE_BACKEND_K2: ANY +// FIR status: outdated code (expect and actual in the same module) // WITH_STDLIB // FILE: common.kt diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt index 804d06bfa87..f1ce726eeb4 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt @@ -1,5 +1,6 @@ // !LANGUAGE: +MultiPlatformProjects -// IGNORE_BACKEND_K2: NATIVE +// IGNORE_BACKEND_K2: ANY +// FIR status: outdated code (expect and actual in the same module) // FILE: lib.kt diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/inlineFunctionWithDefaultLambda.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/inlineFunctionWithDefaultLambda.kt index d7c25e5a82b..843c9417a00 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/inlineFunctionWithDefaultLambda.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/inlineFunctionWithDefaultLambda.kt @@ -1,5 +1,6 @@ // !LANGUAGE: +MultiPlatformProjects -// IGNORE_BACKEND_K2: NATIVE +// IGNORE_BACKEND_K2: ANY +// FIR status: outdated code (expect and actual in the same module) // WITH_STDLIB // FILE: common.kt diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/kt23239.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/kt23239.kt index 33f13490961..3c2f2bc47c6 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/kt23239.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/kt23239.kt @@ -1,5 +1,6 @@ // !LANGUAGE: +MultiPlatformProjects -// IGNORE_BACKEND_K2: NATIVE +// IGNORE_BACKEND_K2: ANY +// FIR status: outdated code (expect and actual in the same module) // WITH_STDLIB // FILE: common.kt diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/kt23739.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/kt23739.kt index 3be22a3ed63..8721f06dc7c 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/kt23739.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/kt23739.kt @@ -1,5 +1,6 @@ // !LANGUAGE: +MultiPlatformProjects -// IGNORE_BACKEND_K2: NATIVE +// IGNORE_BACKEND_K2: ANY +// FIR status: outdated code (expect and actual in the same module) // FILE: common.kt diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/parametersInArgumentValues.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/parametersInArgumentValues.kt index a450b2f52bf..d904efb16a5 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/parametersInArgumentValues.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/parametersInArgumentValues.kt @@ -1,5 +1,6 @@ // !LANGUAGE: +MultiPlatformProjects -// IGNORE_BACKEND_K2: NATIVE +// IGNORE_BACKEND_K2: ANY +// FIR status: outdated code (expect and actual in the same module) // FILE: common.kt diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/superCall.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/superCall.kt index d4fce99bfed..1c11ba7cdba 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/superCall.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/superCall.kt @@ -4,6 +4,7 @@ // IGNORE_BACKEND: NATIVE // IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: JVM +// IGNORE_BACKEND_K2: JS_IR // FILE: lib.kt diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/suspend.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/suspend.kt index 93af4a70397..46acc9b4f5d 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/suspend.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/suspend.kt @@ -1,5 +1,6 @@ // !LANGUAGE: +MultiPlatformProjects -// IGNORE_BACKEND_K2: NATIVE +// IGNORE_BACKEND_K2: ANY +// FIR status: outdated code (expect and actual in the same module) // WITH_STDLIB // WITH_COROUTINES diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias.kt index 4bbd78ab601..edeb84c4d2c 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias.kt @@ -1,7 +1,7 @@ // !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND_K2: ANY +// FIR status: outdated code (expect and actual in the same module) // WITH_STDLIB -// IGNORE_BACKEND_K2: JVM_IR, JS_IR, NATIVE -// FIR status: In FIR, declaring the same `expect` and `actual` classes in one compiler module is not possible (see KT-55177). // FILE: common.kt diff --git a/compiler/testData/codegen/box/multiplatform/expectClassInJvmMultifileFacade.kt b/compiler/testData/codegen/box/multiplatform/expectClassInJvmMultifileFacade.kt index d954c633219..cbb883878cb 100644 --- a/compiler/testData/codegen/box/multiplatform/expectClassInJvmMultifileFacade.kt +++ b/compiler/testData/codegen/box/multiplatform/expectClassInJvmMultifileFacade.kt @@ -2,6 +2,8 @@ // IGNORE_BACKEND_K2: JVM_IR, JS_IR // FIR status: expect/actual in the same module (ACTUAL_WITHOUT_EXPECT) // TARGET_BACKEND: JVM +// IGNORE_BACKEND_K2: ANY +// FIR status: outdated code (expect and actual in the same module) // WITH_STDLIB // FILE: common.kt diff --git a/compiler/testData/codegen/box/multiplatform/expectProperty.kt b/compiler/testData/codegen/box/multiplatform/expectProperty.kt index 5e26284bf14..919fbd64220 100644 --- a/compiler/testData/codegen/box/multiplatform/expectProperty.kt +++ b/compiler/testData/codegen/box/multiplatform/expectProperty.kt @@ -1,6 +1,7 @@ -// IGNORE_BACKEND_K2: JVM_IR, JS_IR, NATIVE -// FIR status: expect/actual in the same module (ACTUAL_WITHOUT_EXPECT) +// IGNORE_BACKEND_K2: ANY +// FIR status: outdated code (expect and actual in the same module) // !LANGUAGE: +MultiPlatformProjects + // FILE: common.kt package test diff --git a/compiler/testData/codegen/box/multiplatform/k2/annotations/annotationsViaActualTypeAliasFromBinary.kt b/compiler/testData/codegen/box/multiplatform/k2/annotations/annotationsViaActualTypeAliasFromBinary.kt new file mode 100644 index 00000000000..6c96f540bed --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/annotations/annotationsViaActualTypeAliasFromBinary.kt @@ -0,0 +1,99 @@ +// TARGET_BACKEND: JVM +// IGNORE_BACKEND_K1: JVM, JVM_IR +// !LANGUAGE: +MultiPlatformProjects +// WITH_REFLECT + +// MODULE: common +// FILE: common.kt + +// See compiler/testData/diagnostics/tests/multiplatform/defaultArguments/annotationsViaActualTypeAlias2.kt + +// This test checks the same behavior but against the Java implementation compiled to the .class file (as opposed to a .java source file). +// Enum annotation argument is commented below, because to be able to resolve E in Jnno.java we have to have a multi-module test where +// one of the modules also contains Java files, and that is too complicated for our test infrastructure at the moment. + +import kotlin.reflect.KClass + +expect annotation class Anno( + val b: Byte = 1.toByte(), + val c: Char = 'x', + val d: Double = 3.14, + val f: Float = -2.72f, + val i: Int = 42424242, + val i2: Int = 53535353, + val j: Long = 239239239239239L, + val j2: Long = 239239L, + val s: Short = 42.toShort(), + val z: Boolean = true, + val ba: ByteArray = [(-1).toByte()], + val ca: CharArray = ['y'], + val da: DoubleArray = [-3.14159], + val fa: FloatArray = [2.7218f], + val ia: IntArray = [424242], + val ja: LongArray = [239239239239L, 239239L], + val sa: ShortArray = [(-43).toShort()], + val za: BooleanArray = [false, true], + val str: String = "fizz", + val k: KClass<*> = Number::class, + // val e: E = E.E1, + // TODO: val a: A = A("1"), + val stra: Array = ["bu", "zz"], + val ka: Array> = [Double::class, String::class, LongArray::class, Array>>::class, Unit::class] + // val ea: Array = [E.E2, E.E3], + // TODO: val aa: Array = [A("2"), A("3")] +) + +// MODULE: lib()()(common) +// FILE: Jnno.java + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Retention(RetentionPolicy.RUNTIME) +public @interface Jnno { + byte b() default 1; + char c() default 'x'; + double d() default 3.14; + float f() default -2.72f; + int i() default 42424242; + int i2() default 21212121 + 32323232; + long j() default 239239239239239L; + long j2() default 239239; + short s() default 42; + boolean z() default true; + byte[] ba() default {-1}; + char[] ca() default {'y'}; + double[] da() default {-3.14159}; + float[] fa() default {2.7218f}; + int[] ia() default {424242}; + long[] ja() default {239239239239L, 239239}; + short[] sa() default {-43}; + boolean[] za() default {false, true}; + String str() default "fi" + "zz"; + Class k() default Number.class; + // E e() default E.E1; + // TODO: A a() default @A("1"); + String[] stra() default {"bu", "zz"}; + Class[] ka() default {double.class, String.class, long[].class, Integer[][][].class, void.class}; + // E[] ea() default {E.E2, E.E3}; + // TODO: A[] aa() default {@A("2"), @A("3")}; +} + +// FILE: anno.kt + +actual typealias Anno = Jnno + +// MODULE: main(lib) +// FILE: main.kt + +annotation class A(val value: String) + +@Anno +fun test() {} + +fun box(): String { + // We don't need to check the contents, just check that there are no anomalities in the bytecode by loading annotations + ::test.annotations.toString() + + return "OK" +} diff --git a/compiler/testData/codegen/box/multiplatform/k2/annotations/expectClassInJvmMultifileFacade.kt b/compiler/testData/codegen/box/multiplatform/k2/annotations/expectClassInJvmMultifileFacade.kt new file mode 100644 index 00000000000..f41f3cbe2c5 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/annotations/expectClassInJvmMultifileFacade.kt @@ -0,0 +1,28 @@ +// !LANGUAGE: +MultiPlatformProjects +// TARGET_BACKEND: JVM +// IGNORE_BACKEND_K1: JVM, JVM_IR +// WITH_STDLIB + +// MODULE: common +// FILE: common.kt + +@file:JvmMultifileClass +@file:JvmName("Test") +package test + +expect class Foo { + val value: String +} + +// MODULE: jvm()()(common) +// FILE: jvm.kt + +@file:JvmMultifileClass +@file:JvmName("Test") +package test + +actual class Foo(actual val value: String) + +fun box(): String { + return Foo("OK").value +} diff --git a/compiler/testData/codegen/box/multiplatform/k2/annotations/optionalExpectation.kt b/compiler/testData/codegen/box/multiplatform/k2/annotations/optionalExpectation.kt new file mode 100644 index 00000000000..5fb83bbbc4a --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/annotations/optionalExpectation.kt @@ -0,0 +1,42 @@ +// !LANGUAGE: +MultiPlatformProjects +// !OPT_IN: kotlin.ExperimentalMultiplatform +// IGNORE_BACKEND: NATIVE, WASM +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 +// IGNORE_BACKEND_K2: JS_IR +// WITH_STDLIB + +// MODULE: common +// FILE: expected.kt + +package a + +@OptionalExpectation +expect annotation class A(val x: Int) + +@OptionalExpectation +expect annotation class B(val s: String) { + @OptionalExpectation + annotation class C(val a: Boolean) +} + +// MODULE: library()()(common) +// FILE: library.kt + +package a + +actual annotation class A(actual val x: Int) + +// MODULE: main(library) +// FILE: main.kt + +package usage + +import a.A +import a.B + +@A(42) +@B("OK") +@B.C(true) +fun box(): String { + return "OK" +} diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/accessToLocalClassFromBackend.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/accessToLocalClassFromBackend.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/accessToLocalClassFromBackend.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/accessToLocalClassFromBackend.kt diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/correctParentForTypeParameter.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/correctParentForTypeParameter.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/correctParentForTypeParameter.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/correctParentForTypeParameter.kt diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/enumEntryNameCall.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/enumEntryNameCall.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/enumEntryNameCall.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/enumEntryNameCall.kt diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/expectActualCallableReference.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/expectActualCallableReference.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/expectActualCallableReference.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/expectActualCallableReference.kt diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/expectActualDifferentExtensionReceiversOnOverloads.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/expectActualDifferentExtensionReceiversOnOverloads.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/expectActualDifferentExtensionReceiversOnOverloads.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/expectActualDifferentExtensionReceiversOnOverloads.kt diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/expectActualDifferentPackages.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/expectActualDifferentPackages.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/expectActualDifferentPackages.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/expectActualDifferentPackages.kt diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/expectActualFakeOverrides.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/expectActualFakeOverrides.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/expectActualMultiCommon.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/expectActualMultiCommon.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/expectActualMultiCommon.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/expectActualMultiCommon.kt diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/expectActualOverloads.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/expectActualOverloads.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/expectActualOverloads.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/expectActualOverloads.kt diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/expectActualSimple.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/expectActualSimple.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/expectActualSimple.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/expectActualSimple.kt diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/expectActualSimpleJs.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/expectActualSimpleJs.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/expectActualSimpleJs.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/expectActualSimpleJs.kt diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/expectActualTypealias.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/expectActualTypealias.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/expectActualTypealias.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/expectActualTypealias.kt diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/expectInterfaceInSupertypes.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/expectInterfaceInSupertypes.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt diff --git a/compiler/testData/codegen/box/multiplatform/k2/basic/expectProperty.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/expectProperty.kt new file mode 100644 index 00000000000..9e48f4c5527 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/basic/expectProperty.kt @@ -0,0 +1,31 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 + +// MODULE: common +// FILE: common.kt + +package test + +expect val v: String + +expect val Char.extensionVal: String + +expect var String.extensionVar: Char + +// MODULE: platform()()(common) +// FILE: platform.kt + +package test + +actual val v: String = "" + +actual val Char.extensionVal: String + get() = toString() + +actual var String.extensionVar: Char + get() = this[0] + set(value) {} + +fun box(): String = + v + 'O'.extensionVal + "K".extensionVar diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/fakeOverridesInPlatformModule.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/fakeOverridesInPlatformModule.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/fakeOverridesInPlatformModule.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/fakeOverridesInPlatformModule.kt diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/getRidOfDoubleBindingInFir2IrLazyProperty.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/getRidOfDoubleBindingInFir2IrLazyProperty.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/getRidOfDoubleBindingInFir2IrLazyProperty.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/getRidOfDoubleBindingInFir2IrLazyProperty.kt diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/independentCommonSourceModules.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/independentCommonSourceModules.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/kt-51753-1.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/kt-51753-1.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/kt-51753-1.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/kt-51753-1.kt diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/kt-51753-2.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/kt-51753-2.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/kt-51753-2.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/kt-51753-2.kt diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/kt-56329.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/kt-56329.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt diff --git a/compiler/testData/codegen/box/multiplatform/k2/basic/noArgActualConstructor.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/noArgActualConstructor.kt new file mode 100644 index 00000000000..78a7bbb2761 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/basic/noArgActualConstructor.kt @@ -0,0 +1,35 @@ +// !LANGUAGE: +MultiPlatformProjects +// TARGET_BACKEND: JVM +// IGNORE_BACKEND_K1: JVM, JVM_IR +// WITH_STDLIB + +// MODULE: common +// FILE: common.kt + +expect class Foo(a: String = "", b: Int = 42) + +// MODULE: jvm()()(common) +// FILE: J.java + +public class J { + public static void test() { + new Foo(); + new Foo("", 42); + } +} + +// FILE: jvm.kt + +import kotlin.test.assertEquals + +actual class Foo actual constructor(a: String, b: Int) { + init { + assertEquals("", a) + assertEquals(42, b) + } +} + +fun box(): String { + J.test() + return "OK" +} diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/valueClasses.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/valueClasses.kt similarity index 100% rename from compiler/testData/codegen/box/multiplatform/multiModule/valueClasses.kt rename to compiler/testData/codegen/box/multiplatform/k2/basic/valueClasses.kt diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/annotations.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/annotations.kt new file mode 100644 index 00000000000..7b1e6399500 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/annotations.kt @@ -0,0 +1,38 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND_K1: ANY +// TARGET_BACKEND: JVM +// WITH_STDLIB + +// MODULE: common +// FILE: common.kt + +expect annotation class A1(val x: Int, val y: String = "OK") + +expect annotation class A2(val x: Int = 42, val y: String = "OK") + +@A1(0) +@A2 +fun test() {} + +// MODULE: jvm()()(common) +// FILE: jvm.kt + +import kotlin.test.assertEquals + +actual annotation class A1(actual val x: Int, actual val y: String) + +actual annotation class A2(actual val x: Int, actual val y: String = "OK") + +fun box(): String { + val anno = Class.forName("CommonKt").getDeclaredMethod("test").annotations + + val a1 = anno.single { it.annotationClass == A1::class } as A1 + assertEquals(0, a1.x) + assertEquals("OK", a1.y) + + val a2 = anno.single { it.annotationClass == A2::class } as A2 + assertEquals(42, a2.x) + assertEquals("OK", a2.y) + + return "OK" +} diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual.kt new file mode 100644 index 00000000000..cee100884b1 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual.kt @@ -0,0 +1,32 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 + +// MODULE: common +// FILE: common.kt + +public expect fun Array.copyInto( + destination: Array, destinationOffset: Int = 0, startIndex: Int = 0, endIndex: Int = size +): Array + +// MODULE: platform()()(common) +// FILE: platform.kt + +// This test should be updated once KT-22818 is fixed; default values are not allowed in the actual function +@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS") +public actual fun Array.copyInto( + destination: Array, destinationOffset: Int = 42, startIndex: Int = 43, endIndex: Int = size + 44 +): Array { + destination as Array + destination[0] = destinationOffset + destination[1] = startIndex + destination[2] = endIndex + return destination +} + +fun box(): String { + val a = Array(3) { it } + val result = a.copyInto(a) + return if (result[0] == 42 && result[1] == 43 && result[2] == 47) "OK" + else "Fail: ${result[0]} ${result[1]} ${result[2]}" +} diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual2.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual2.kt new file mode 100644 index 00000000000..9b48968c477 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual2.kt @@ -0,0 +1,34 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 + +// MODULE: common +// FILE: common.kt + +expect interface I { + fun test(source: String = "expect") +} + +expect interface J : I + +// MODULE: platform()()(common) +// FILE: platform.kt + +actual interface I { + // This test should be updated once KT-22818 is fixed; default values are not allowed in the actual function + @Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS") + actual fun test(source: String = "actual") +} + +actual interface J : I { + override fun test(source: String) { + if (source != "actual") throw AssertionError(source) + } +} + +class K : J + +fun box(): String { + K().test() + return "OK" +} diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/constructor.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/constructor.kt new file mode 100644 index 00000000000..0765858f9ed --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/constructor.kt @@ -0,0 +1,26 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 +// WITH_STDLIB + +// MODULE: common +// FILE: common.kt + +expect class Foo(a: String, b: Int = 0, c: Double? = null) + +// MODULE: platform()()(common) +// FILE: platform.kt + +import kotlin.test.assertEquals + +actual class Foo actual constructor(a: String, b: Int, c: Double?) { + val result: String = a + "," + b + "," + c +} + +fun box(): String { + assertEquals("OK,0,null", Foo("OK").result) + assertEquals("OK,42,null", Foo("OK", 42).result) + assertEquals("OK,42,3.14", Foo("OK", 42, 3.14).result) + + return "OK" +} diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/delegatedExpectedInterface.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/delegatedExpectedInterface.kt new file mode 100644 index 00000000000..9544bf94d75 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/delegatedExpectedInterface.kt @@ -0,0 +1,72 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 + +// MODULE: common +// FILE: common.kt + +expect interface I { + fun foo(x: Int = 1): Unit +} + +// MODULE: main()()(common) +// FILE: main.kt + +var log = "" +fun log(a: String) { + log += a + ";" +} + +interface C { + fun foo(x: Int): Unit { + log("C.foo($x)") + } +} + +actual interface I { + actual fun foo(x: Int): Unit +} + +class G(c: C) : C by c, I +class H(c: C) : I, C by c + +fun test1() { + log = "" + + val g1 = G(object: C {}) + g1.foo(2) + g1.foo() + val g2 = G(object: C { + override fun foo(x: Int) { + log("[2] object:C.foo($x)") + } + }) + g2.foo(2) + g2.foo() +} + +fun test2() { + log = "" + + val h1 = H(object: C {}) + h1.foo(2) + h1.foo() + val h2 = H(object: C { + override fun foo(x: Int) { + log("[2] object:C.foo($x)") + } + }) + h2.foo(2) + h2.foo() +} + + +fun box(): String { + test1() + if (log != "C.foo(2);C.foo(1);[2] object:C.foo(2);[2] object:C.foo(1);") return "fail1: $log" + + test2() + if (log != "C.foo(2);C.foo(1);[2] object:C.foo(2);[2] object:C.foo(1);") return "fail2: $log" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/dispatchReceiverValue.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/dispatchReceiverValue.kt new file mode 100644 index 00000000000..d7b3aacad72 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/dispatchReceiverValue.kt @@ -0,0 +1,23 @@ +// IGNORE_BACKEND: JS_IR, JS_IR_ES6, NATIVE, WASM +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS +// WASM_MUTE_REASON: EXPECT_DEFAULT_PARAMETERS +// !LANGUAGE: +MultiPlatformProjects +// ISSUE: KT-41901 + +// MODULE: common +// FILE: common.kt + +expect class C { + val value: String + + fun test(result: String = value): String +} + +// MODULE: platform()()(common) +// FILE: platform.kt + +actual class C(actual val value: String) { + actual fun test(result: String): String = result +} + +fun box() = C("Fail").test("OK") diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/extensionReceiverValue.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/extensionReceiverValue.kt new file mode 100644 index 00000000000..9ba6bcca385 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/extensionReceiverValue.kt @@ -0,0 +1,19 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 + +// MODULE: common +// FILE: common.kt + +class Receiver(val value: String) + +expect fun Receiver.test(result: String = value): String + +// MODULE: platform()()(common) +// FILE: platform.kt + +actual fun Receiver.test(result: String): String { + return result +} + +fun box() = Receiver("Fail").test("OK") diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/function.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/function.kt new file mode 100644 index 00000000000..0ced3bd3244 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/function.kt @@ -0,0 +1,37 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 +// WITH_STDLIB + +// MODULE: common +// FILE: common.kt + +expect fun topLevel(a: String, b: Int = 0, c: Double? = null): String + +expect class Foo() { + fun member(a: String, b: Int = 0, c: Double? = null): String +} + +// MODULE: platform()()(common) +// FILE: platform.kt + +import kotlin.test.assertEquals + +actual fun topLevel(a: String, b: Int, c: Double?): String = a + "," + b + "," + c + +actual class Foo actual constructor() { + actual fun member(a: String, b: Int, c: Double?): String = a + "," + b + "," + c +} + +fun box(): String { + assertEquals("OK,0,null", topLevel("OK")) + assertEquals("OK,42,null", topLevel("OK", 42)) + assertEquals("OK,42,3.14", topLevel("OK", 42, 3.14)) + + val foo = Foo() + assertEquals("OK,0,null", foo.member("OK")) + assertEquals("OK,42,null", foo.member("OK", 42)) + assertEquals("OK,42,3.14", foo.member("OK", 42, 3.14)) + + return "OK" +} diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/functionFromOtherModule.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/functionFromOtherModule.kt new file mode 100644 index 00000000000..36e3e1a4cc0 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/functionFromOtherModule.kt @@ -0,0 +1,21 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 +// WITH_STDLIB + +// MODULE: common +// FILE: common.kt + +expect fun foo(a: String, b: String = "O"): String + +// MODULE: lib()()(common) +// FILE: lib.kt + +actual fun foo(a: String, b: String) = a + b + +// MODULE: main(lib) +// FILE: main.kt + +fun box(): String { + return foo("") + foo("K", "") +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromCommonClass.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromCommonClass.kt new file mode 100644 index 00000000000..39ec2a0de12 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromCommonClass.kt @@ -0,0 +1,29 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 +// WITH_STDLIB + +// MODULE: common +// FILE: common.kt + +open class A() { + fun member(a: String, b: Int = 0, c: Double? = null): String = a + "," + b + "," + c +} + +expect class B() : A + +// MODULE: platform()()(common) +// FILE: platform.kt + +import kotlin.test.assertEquals + +actual class B actual constructor() : A() + +fun box(): String { + val b = B() + assertEquals("OK,0,null", b.member("OK")) + assertEquals("OK,42,null", b.member("OK", 42)) + assertEquals("OK,42,3.14", b.member("OK", 42, 3.14)) + + return "OK" +} diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedClass.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedClass.kt new file mode 100644 index 00000000000..12057d541c7 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedClass.kt @@ -0,0 +1,33 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 +// WITH_STDLIB + +// MODULE: common +// FILE: common.kt + +expect open class A() { + fun member(a: String, b: Int = 0, c: Double? = null): String +} + +expect class B() : A + +// MODULE: platform()()(common) +// FILE: platform.kt + +import kotlin.test.assertEquals + +actual open class A actual constructor() { + actual fun member(a: String, b: Int, c: Double?): String = a + "," + b + "," + c +} + +actual class B actual constructor() : A() + +fun box(): String { + val b = B() + assertEquals("OK,0,null", b.member("OK")) + assertEquals("OK,42,null", b.member("OK", 42)) + assertEquals("OK,42,3.14", b.member("OK", 42, 3.14)) + + return "OK" +} diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedInterface.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedInterface.kt new file mode 100644 index 00000000000..c87558690d5 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedInterface.kt @@ -0,0 +1,21 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 + +// MODULE: common +// FILE: common.kt +expect interface I { + fun f(p: String = "OK"): String +} + +// MODULE: platform()()(common) +// FILE: platform.kt +actual interface I { + actual fun f(p: String): String +} + +class Impl : I { + override fun f(p: String) = p +} + +fun box() = Impl().f() diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedMethod.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedMethod.kt new file mode 100644 index 00000000000..05f2e18dbc4 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedMethod.kt @@ -0,0 +1,34 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 +// WITH_STDLIB + +// MODULE: common +// FILE: common.kt + +expect open class C() { + open fun f(p: Int = 2) : String +} + +// MODULE: platform()()(common) +// FILE: platform.kt + +import kotlin.test.assertEquals + +actual open class C { + actual open fun f(p: Int) = "C" + p +} + +open class D : C() { + override open fun f(p: Int) = "D" + p +} + +fun box(): String { + + assertEquals("C2", C().f()) + assertEquals("C9", C().f(9)) + assertEquals("D2", D().f()) + assertEquals("D5", D().f(5)) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedInExpectedDeclarations.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedInExpectedDeclarations.kt new file mode 100644 index 00000000000..54b8b21b4c9 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedInExpectedDeclarations.kt @@ -0,0 +1,38 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 +// WITH_STDLIB + +// MODULE: common +// FILE: common.kt + +expect open class A() { + open fun f(p: Int = 1) : String +} + +expect open class B : A { + override open fun f(p: Int) : String +} + +// MODULE: platform()()(common) +// FILE: platform.kt + +import kotlin.test.assertEquals + +actual open class A { + actual open fun f(p: Int) = "A" + p +} + +actual open class B : A() { + actual override open fun f(p: Int) = "B" + p +} + +fun box(): String { + + assertEquals("A1", A().f()) + assertEquals("A9", A().f(9)) + assertEquals("B1", B().f()) + assertEquals("B5", B().f(5)) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt new file mode 100644 index 00000000000..75ed917461a --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt @@ -0,0 +1,52 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 + +// MODULE: common +// FILE: common.kt + +package foo + +expect interface H { + fun foo(x: String = "default"): String +} + +// MODULE: platform()()(common) +// FILE: platform.kt +package foo + +actual interface H { + actual fun foo(x: String): String +} + +interface I: H { + override fun foo(x: String): String = "I.foo($x)" +} + +interface J : I { + override fun foo(x: String): String +} + +interface K : J { + override fun foo(x: String): String = "K.foo($x)" +} + +class A : I + +class B : K + +fun box(): String { + val a = A() + var r = a.foo() + if (r != "I.foo(default)") return "fail: A.foo()" + r = a.foo("Q") + if (r != "I.foo(Q)") return "fail A.foo(Q): $r" + + val b = B() + r = b.foo() + if (r != "K.foo(default)") return "fail B.foo(): $r" + r = b.foo("W") + if (r != "K.foo(W)") return "fail B.foo(W): $r" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inlineFunctionWithDefaultLambda.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inlineFunctionWithDefaultLambda.kt new file mode 100644 index 00000000000..290b0fc96d9 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inlineFunctionWithDefaultLambda.kt @@ -0,0 +1,37 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 +// WITH_STDLIB + +// MODULE: common +// FILE: common.kt + +expect inline fun topLevel(a: String, b: Int = 0, c: () -> Double? = { null }): String + +expect class Foo() { + inline fun member(a: String, b: Int = 0, c: () -> Double? = { null }): String +} + +// MODULE: platform()()(common) +// FILE: platform.kt + +import kotlin.test.assertEquals + +actual inline fun topLevel(a: String, b: Int, c: () -> Double?): String = a + "," + b + "," + c() + +actual class Foo actual constructor() { + actual inline fun member(a: String, b: Int, c: () -> Double?): String = a + "," + b + "," + c() +} + +fun box(): String { + assertEquals("OK,0,null", topLevel("OK")) + assertEquals("OK,42,null", topLevel("OK", 42)) + assertEquals("OK,42,3.14", topLevel("OK", 42, { 3.14 })) + + val foo = Foo() + assertEquals("OK,0,null", foo.member("OK")) + assertEquals("OK,42,null", foo.member("OK", 42)) + assertEquals("OK,42,3.14", foo.member("OK", 42, { 3.14 })) + + return "OK" +} diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/jvmOverloads.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/jvmOverloads.kt new file mode 100644 index 00000000000..0207c9a5f9e --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/jvmOverloads.kt @@ -0,0 +1,35 @@ +// !LANGUAGE: +MultiPlatformProjects +// TARGET_BACKEND: JVM +// IGNORE_BACKEND_K1: JVM, JVM_IR +// WITH_STDLIB + +// MODULE: common +// FILE: common.kt + +expect fun foo(j: Int, i: Int = -1) + +// MODULE: main()()(common) +// FILE: J.java + +public class J { + public static String test() { + JvmKt.foo(-1); + JvmKt.foo(5, 5); + return "OK"; + } +} + +// FILE: jvm.kt + +import kotlin.test.assertEquals + +@JvmOverloads +actual fun foo(j: Int, i: Int) { + assertEquals(j, i) +} + +fun box(): String { + foo(-1) + foo(5, 5) + return J.test(); +} diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23239.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23239.kt new file mode 100644 index 00000000000..ccfbfcf190e --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23239.kt @@ -0,0 +1,39 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 +// WITH_STDLIB + +// MODULE: common +// FILE: common.kt + +expect open class C() { + open fun f(p: Int = 1) : String + open fun f2(p1: Int = 1, p2: Int = 2) : String + open fun ff(p1: Int, p2: Int = 2) : String + open fun fff(p1: Int, p2: Int, p3: Int = 3) : String + open fun fffx(p1: Int, p2: Int = 4, p3: Int = 5) : String +} + +// MODULE: platform()()(common) +// FILE: platform.kt + +import kotlin.test.assertEquals + +actual open class C { + actual open fun f(p: Int) = "f" + p + actual open fun f2(p1: Int, p2: Int) = "f2" + p1 + "" + p2 + actual open fun ff(p1: Int, p2: Int) = "ff" + p1 + "" + p2 + actual open fun fff(p1: Int, p2: Int, p3: Int) = "fff" + p1 + "" + p2 + "" + p3 + actual open fun fffx(p1: Int, p2: Int, p3: Int) = "fffx" + p1 + "" + p2 + "" + p3 +} + +fun box(): String { + + assertEquals("f1", C().f()) + assertEquals("f212", C().f2()) + assertEquals("ff12", C().ff(1)) + assertEquals("fff123", C().fff(1, 2)) + assertEquals("fffx345", C().fffx(3)) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23739.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23739.kt new file mode 100644 index 00000000000..ec65b978ce6 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23739.kt @@ -0,0 +1,19 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 + +// MODULE: common +// FILE: common.kt + +expect inline fun get(p: String = "OK"): String + +// MODULE: platform()()(common) +// FILE: platform.kt + +actual inline fun get(p: String): String { + return p +} + +fun box(): String { + return get() +} diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/nestedEnumEntryValue.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/nestedEnumEntryValue.kt new file mode 100644 index 00000000000..ddce7f068de --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/nestedEnumEntryValue.kt @@ -0,0 +1,33 @@ +// WITH_STDLIB +// IGNORE_BACKEND: JS_IR, JS_IR_ES6, WASM, NATIVE +// IGNORE_BACKEND_K1: JS, JVM, JVM_IR +// JS IR & Wasm: https://youtrack.jetbrains.com/issue/KT-51225 +// !LANGUAGE: +MultiPlatformProjects +// ISSUE: KT-51156 + +// MODULE: common +// FILE: common.kt + +expect class C(e: E = E.O) { + enum class E { + O, K + } +} + +// MODULE: platform()()(common) +// FILE: platform.kt + +actual class C actual constructor(e: E) { + val result = e.name + + actual enum class E { + O, K + } +} + +// MODULE: main(platform) +// FILE: main.kt + +fun box(): String { + return C().result + C(C.E.K).result +} diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/parametersInArgumentValues.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/parametersInArgumentValues.kt new file mode 100644 index 00000000000..7b05294063d --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/parametersInArgumentValues.kt @@ -0,0 +1,20 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 + +// MODULE: common +// FILE: common.kt + +class B(val value: Int) + +expect fun test(a: Int = 2, b: Int = B(a * 2).value, c: String = "${b}$a"): String + +// MODULE: platform()()(common) +// FILE: platform.kt + +actual fun test(a: Int, b: Int, c: String): String = c + +fun box(): String { + val result = test() + return if (result == "42") "OK" else "Fail: $result" +} diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/superCall.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/superCall.kt new file mode 100644 index 00000000000..140b3d4c6a3 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/superCall.kt @@ -0,0 +1,44 @@ +// IGNORE_BACKEND: NATIVE, WASM +// WASM_MUTE_REASON: EXPECT_DEFAULT_PARAMETERS +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE, JVM, JVM_IR +// IGNORE_BACKEND_K1: JS, JS_IR, JS_IR_ES6 + +// MODULE: common +// FILE: common.kt +package foo + +expect open class A { + open fun foo(x: Int = 20, y: Int = 3): Int +} + +// MODULE: platform()()(common) +// FILE: main.kt +package foo + +actual open class A { + actual open fun foo(x: Int, y: Int) = x + y +} + +open class B : A() { + override fun foo(x: Int, y: Int) = 0 + + fun bar1() = super.foo() + + fun bar2() = super.foo(30) + + fun bar3() = super.foo(y = 4) +} + +fun box(): String { + val v1 = B().bar1() + if (v1 != 23) return "fail1: $v1" + + val v2 = B().bar2() + if (v2 != 33) return "fail2: $v2" + + val v3 = B().bar3() + if (v3 != 24) return "fail3: $v3" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/suspend.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/suspend.kt new file mode 100644 index 00000000000..5a163f94fc3 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/suspend.kt @@ -0,0 +1,38 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 +// WITH_STDLIB +// WITH_COROUTINES + +// MODULE: common +// FILE: common.kt + +expect interface I { + suspend fun f(p: Int = 1): String +} + +// MODULE: main()()(common) +// FILE: main.kt +import kotlin.coroutines.* +import helpers.* + +actual interface I { + actual suspend fun f(p: Int): String +} + +class II : I { + override suspend fun f(p: Int): String = + if (p == 1) "OK" else "Fail: $p" +} + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +fun box(): String { + var res = "FAIL" + builder { + res = II().f() + } + return res +} diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/typeAlias.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/typeAlias.kt new file mode 100644 index 00000000000..959b162cf52 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/typeAlias.kt @@ -0,0 +1,25 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 +// WITH_STDLIB + +// MODULE: common +// FILE: common.kt + +expect annotation class Foo(val z: String = "OK") + +// MODULE: platform()()(common) +// FILE: platform.kt + +actual typealias Foo = Foo2 + +annotation class Foo2 (val z: String = "OK") + +@Foo +fun test() {} + +fun box(): String { + test() + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt new file mode 100644 index 00000000000..733251799e6 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt @@ -0,0 +1,64 @@ +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND: NATIVE, WASM +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6 +// IGNORE_BACKEND_K2: JS_IR +// WITH_STDLIB + +// MODULE: common +// FILE: common.kt + +expect fun topLevel(a: T, b: (T) -> Int = { 1 }): String + +expect class Foo() { + fun member(a: T, b: (T) -> Int = { 2 }): String +} + +expect class Bar() { + fun member(a: T, b: (T) -> Int = { 3 }): String +} + +expect class A { + inner class B { + fun foo(t: T, n: N, h: H, a: (T, N, H) -> Int = { _, _, _ -> 4 }): String + } +} + +// MODULE: main()()(common) +// FILE: main.kt + +import kotlin.test.assertEquals + +actual fun topLevel(a: T, b: (T) -> Int): String = b(a).toString() + +actual class Foo actual constructor() { + actual fun member(a: T, b: (T) -> Int): String = b(a).toString() +} + +actual class Bar actual constructor() { + actual fun member(a: T, b: (T) -> Int): String = b(a).toString() +} + +actual class A { + actual inner class B { + actual fun foo(t: T, n: N, h: H, a: (T, N, H) -> Int) = a(t, n, h).toString() + } +} + +fun box(): String { + assertEquals("1", topLevel("OK")) + assertEquals("73", topLevel("OK") { 73 }) + + val foo = Foo() + assertEquals("2", foo.member("OK")) + assertEquals("42", foo.member("OK") { 42 }) + + val bar = Bar() + assertEquals("3", bar.member("OK")) + assertEquals("37", bar.member("OK") { 37 }) + + val b = A().B() + assertEquals("4", b.foo(1, 2.0, 3)) + assertEquals("6", b.foo(1, 2.0, 3) { t, n, h -> t + n.toInt() + h }) + + return "OK" +} diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index 166d72c1992..20a636339c8 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -31787,80 +31787,300 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + public class K2 { + @Test + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations") + @TestDataPath("$PROJECT_ROOT") + public class Annotations { + @Test + public void testAllFilesPresentInAnnotations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("annotationsViaActualTypeAliasFromBinary.kt") + public void testAnnotationsViaActualTypeAliasFromBinary() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/annotationsViaActualTypeAliasFromBinary.kt"); + } + + @Test + @TestMetadata("expectClassInJvmMultifileFacade.kt") + public void testExpectClassInJvmMultifileFacade() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/expectClassInJvmMultifileFacade.kt"); + } + + @Test + @TestMetadata("optionalExpectation.kt") + public void testOptionalExpectation() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/optionalExpectation.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/basic") + @TestDataPath("$PROJECT_ROOT") + public class Basic { + @Test + @TestMetadata("accessToLocalClassFromBackend.kt") + public void testAccessToLocalClassFromBackend() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/accessToLocalClassFromBackend.kt"); + } + + @Test + public void testAllFilesPresentInBasic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/basic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("correctParentForTypeParameter.kt") + public void testCorrectParentForTypeParameter() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/correctParentForTypeParameter.kt"); + } + + @Test + @TestMetadata("enumEntryNameCall.kt") + public void testEnumEntryNameCall() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/enumEntryNameCall.kt"); + } + + @Test + @TestMetadata("expectActualDifferentExtensionReceiversOnOverloads.kt") + public void testExpectActualDifferentExtensionReceiversOnOverloads() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualDifferentExtensionReceiversOnOverloads.kt"); + } + + @Test + @TestMetadata("expectActualMultiCommon.kt") + public void testExpectActualMultiCommon() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualMultiCommon.kt"); + } + + @Test + @TestMetadata("expectActualSimple.kt") + public void testExpectActualSimple() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualSimple.kt"); + } + + @Test + @TestMetadata("expectInterfaceInSupertypes.kt") + public void testExpectInterfaceInSupertypes() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt"); + } + + @Test + @TestMetadata("expectProperty.kt") + public void testExpectProperty() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectProperty.kt"); + } + + @Test + @TestMetadata("fakeOverridesInPlatformModule.kt") + public void testFakeOverridesInPlatformModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/fakeOverridesInPlatformModule.kt"); + } + + @Test + @TestMetadata("getRidOfDoubleBindingInFir2IrLazyProperty.kt") + public void testGetRidOfDoubleBindingInFir2IrLazyProperty() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/getRidOfDoubleBindingInFir2IrLazyProperty.kt"); + } + + @Test + @TestMetadata("kt-56329.kt") + public void testKt_56329() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); + } + + @Test + @TestMetadata("noArgActualConstructor.kt") + public void testNoArgActualConstructor() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/noArgActualConstructor.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/defaultArguments") + @TestDataPath("$PROJECT_ROOT") + public class DefaultArguments { + @Test + public void testAllFilesPresentInDefaultArguments() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("annotations.kt") + public void testAnnotations() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/annotations.kt"); + } + + @Test + @TestMetadata("bothInExpectAndActual.kt") + public void testBothInExpectAndActual() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual.kt"); + } + + @Test + @TestMetadata("bothInExpectAndActual2.kt") + public void testBothInExpectAndActual2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual2.kt"); + } + + @Test + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/constructor.kt"); + } + + @Test + @TestMetadata("delegatedExpectedInterface.kt") + public void testDelegatedExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/delegatedExpectedInterface.kt"); + } + + @Test + @TestMetadata("dispatchReceiverValue.kt") + public void testDispatchReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/dispatchReceiverValue.kt"); + } + + @Test + @TestMetadata("extensionReceiverValue.kt") + public void testExtensionReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/extensionReceiverValue.kt"); + } + + @Test + @TestMetadata("function.kt") + public void testFunction() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/function.kt"); + } + + @Test + @TestMetadata("functionFromOtherModule.kt") + public void testFunctionFromOtherModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/functionFromOtherModule.kt"); + } + + @Test + @TestMetadata("inheritedFromCommonClass.kt") + public void testInheritedFromCommonClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromCommonClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedClass.kt") + public void testInheritedFromExpectedClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedInterface.kt") + public void testInheritedFromExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedInterface.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedMethod.kt") + public void testInheritedFromExpectedMethod() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedMethod.kt"); + } + + @Test + @TestMetadata("inheritedInExpectedDeclarations.kt") + public void testInheritedInExpectedDeclarations() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedInExpectedDeclarations.kt"); + } + + @Test + @TestMetadata("inheritedViaAnotherInterfaceIndirectly.kt") + public void testInheritedViaAnotherInterfaceIndirectly() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt"); + } + + @Test + @TestMetadata("inlineFunctionWithDefaultLambda.kt") + public void testInlineFunctionWithDefaultLambda() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inlineFunctionWithDefaultLambda.kt"); + } + + @Test + @TestMetadata("jvmOverloads.kt") + public void testJvmOverloads() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/jvmOverloads.kt"); + } + + @Test + @TestMetadata("kt23239.kt") + public void testKt23239() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23239.kt"); + } + + @Test + @TestMetadata("kt23739.kt") + public void testKt23739() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23739.kt"); + } + + @Test + @TestMetadata("nestedEnumEntryValue.kt") + public void testNestedEnumEntryValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/nestedEnumEntryValue.kt"); + } + + @Test + @TestMetadata("parametersInArgumentValues.kt") + public void testParametersInArgumentValues() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/parametersInArgumentValues.kt"); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/superCall.kt"); + } + + @Test + @TestMetadata("suspend.kt") + public void testSuspend() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/suspend.kt"); + } + + @Test + @TestMetadata("typeAlias.kt") + public void testTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/typeAlias.kt"); + } + + @Test + @TestMetadata("withTypeParameter.kt") + public void testWithTypeParameter() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") public class MultiModule { - @Test - @TestMetadata("accessToLocalClassFromBackend.kt") - public void testAccessToLocalClassFromBackend() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/accessToLocalClassFromBackend.kt"); - } - @Test public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } - @Test - @TestMetadata("correctParentForTypeParameter.kt") - public void testCorrectParentForTypeParameter() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/correctParentForTypeParameter.kt"); - } - - @Test - @TestMetadata("enumEntryNameCall.kt") - public void testEnumEntryNameCall() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/enumEntryNameCall.kt"); - } - - @Test - @TestMetadata("expectActualDifferentExtensionReceiversOnOverloads.kt") - public void testExpectActualDifferentExtensionReceiversOnOverloads() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualDifferentExtensionReceiversOnOverloads.kt"); - } - - @Test - @TestMetadata("expectActualMultiCommon.kt") - public void testExpectActualMultiCommon() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualMultiCommon.kt"); - } - - @Test - @TestMetadata("expectActualSimple.kt") - public void testExpectActualSimple() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualSimple.kt"); - } - - @Test - @TestMetadata("expectInterfaceInSupertypes.kt") - public void testExpectInterfaceInSupertypes() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectInterfaceInSupertypes.kt"); - } - @Test @TestMetadata("expectInterfaceInheritance.kt") public void testExpectInterfaceInheritance() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectInterfaceInheritance.kt"); } - - @Test - @TestMetadata("fakeOverridesInPlatformModule.kt") - public void testFakeOverridesInPlatformModule() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/fakeOverridesInPlatformModule.kt"); - } - - @Test - @TestMetadata("getRidOfDoubleBindingInFir2IrLazyProperty.kt") - public void testGetRidOfDoubleBindingInFir2IrLazyProperty() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/getRidOfDoubleBindingInFir2IrLazyProperty.kt"); - } - - @Test - @TestMetadata("kt-56329.kt") - public void testKt_56329() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/kt-56329.kt"); - } } } diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index d47ffbbf825..3adc1aeb379 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -33119,140 +33119,360 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } } + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + public class K2 { + @Test + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations") + @TestDataPath("$PROJECT_ROOT") + public class Annotations { + @Test + public void testAllFilesPresentInAnnotations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("annotationsViaActualTypeAliasFromBinary.kt") + public void testAnnotationsViaActualTypeAliasFromBinary() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/annotationsViaActualTypeAliasFromBinary.kt"); + } + + @Test + @TestMetadata("expectClassInJvmMultifileFacade.kt") + public void testExpectClassInJvmMultifileFacade() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/expectClassInJvmMultifileFacade.kt"); + } + + @Test + @TestMetadata("optionalExpectation.kt") + public void testOptionalExpectation() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/optionalExpectation.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/basic") + @TestDataPath("$PROJECT_ROOT") + public class Basic { + @Test + @TestMetadata("accessToLocalClassFromBackend.kt") + public void testAccessToLocalClassFromBackend() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/accessToLocalClassFromBackend.kt"); + } + + @Test + public void testAllFilesPresentInBasic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/basic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("correctParentForTypeParameter.kt") + public void testCorrectParentForTypeParameter() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/correctParentForTypeParameter.kt"); + } + + @Test + @TestMetadata("enumEntryNameCall.kt") + public void testEnumEntryNameCall() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/enumEntryNameCall.kt"); + } + + @Test + @TestMetadata("expectActualCallableReference.kt") + public void testExpectActualCallableReference() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualCallableReference.kt"); + } + + @Test + @TestMetadata("expectActualDifferentExtensionReceiversOnOverloads.kt") + public void testExpectActualDifferentExtensionReceiversOnOverloads() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualDifferentExtensionReceiversOnOverloads.kt"); + } + + @Test + @TestMetadata("expectActualDifferentPackages.kt") + public void testExpectActualDifferentPackages() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualDifferentPackages.kt"); + } + + @Test + @TestMetadata("expectActualFakeOverrides.kt") + public void testExpectActualFakeOverrides() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt"); + } + + @Test + @TestMetadata("expectActualMultiCommon.kt") + public void testExpectActualMultiCommon() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualMultiCommon.kt"); + } + + @Test + @TestMetadata("expectActualOverloads.kt") + public void testExpectActualOverloads() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualOverloads.kt"); + } + + @Test + @TestMetadata("expectActualSimple.kt") + public void testExpectActualSimple() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualSimple.kt"); + } + + @Test + @TestMetadata("expectActualTypealias.kt") + public void testExpectActualTypealias() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualTypealias.kt"); + } + + @Test + @TestMetadata("expectInterfaceInSupertypes.kt") + public void testExpectInterfaceInSupertypes() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt"); + } + + @Test + @TestMetadata("expectProperty.kt") + public void testExpectProperty() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectProperty.kt"); + } + + @Test + @TestMetadata("fakeOverridesInPlatformModule.kt") + public void testFakeOverridesInPlatformModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/fakeOverridesInPlatformModule.kt"); + } + + @Test + @TestMetadata("getRidOfDoubleBindingInFir2IrLazyProperty.kt") + public void testGetRidOfDoubleBindingInFir2IrLazyProperty() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/getRidOfDoubleBindingInFir2IrLazyProperty.kt"); + } + + @Test + @TestMetadata("independentCommonSourceModules.kt") + public void testIndependentCommonSourceModules() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt"); + } + + @Test + @TestMetadata("kt-51753-1.kt") + public void testKt_51753_1() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-51753-1.kt"); + } + + @Test + @TestMetadata("kt-51753-2.kt") + public void testKt_51753_2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-51753-2.kt"); + } + + @Test + @TestMetadata("kt-56329.kt") + public void testKt_56329() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); + } + + @Test + @TestMetadata("noArgActualConstructor.kt") + public void testNoArgActualConstructor() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/noArgActualConstructor.kt"); + } + + @Test + @TestMetadata("valueClasses.kt") + public void testValueClasses() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/valueClasses.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/defaultArguments") + @TestDataPath("$PROJECT_ROOT") + public class DefaultArguments { + @Test + public void testAllFilesPresentInDefaultArguments() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("annotations.kt") + public void testAnnotations() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/annotations.kt"); + } + + @Test + @TestMetadata("bothInExpectAndActual.kt") + public void testBothInExpectAndActual() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual.kt"); + } + + @Test + @TestMetadata("bothInExpectAndActual2.kt") + public void testBothInExpectAndActual2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual2.kt"); + } + + @Test + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/constructor.kt"); + } + + @Test + @TestMetadata("delegatedExpectedInterface.kt") + public void testDelegatedExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/delegatedExpectedInterface.kt"); + } + + @Test + @TestMetadata("dispatchReceiverValue.kt") + public void testDispatchReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/dispatchReceiverValue.kt"); + } + + @Test + @TestMetadata("extensionReceiverValue.kt") + public void testExtensionReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/extensionReceiverValue.kt"); + } + + @Test + @TestMetadata("function.kt") + public void testFunction() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/function.kt"); + } + + @Test + @TestMetadata("functionFromOtherModule.kt") + public void testFunctionFromOtherModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/functionFromOtherModule.kt"); + } + + @Test + @TestMetadata("inheritedFromCommonClass.kt") + public void testInheritedFromCommonClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromCommonClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedClass.kt") + public void testInheritedFromExpectedClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedInterface.kt") + public void testInheritedFromExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedInterface.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedMethod.kt") + public void testInheritedFromExpectedMethod() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedMethod.kt"); + } + + @Test + @TestMetadata("inheritedInExpectedDeclarations.kt") + public void testInheritedInExpectedDeclarations() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedInExpectedDeclarations.kt"); + } + + @Test + @TestMetadata("inheritedViaAnotherInterfaceIndirectly.kt") + public void testInheritedViaAnotherInterfaceIndirectly() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt"); + } + + @Test + @TestMetadata("inlineFunctionWithDefaultLambda.kt") + public void testInlineFunctionWithDefaultLambda() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inlineFunctionWithDefaultLambda.kt"); + } + + @Test + @TestMetadata("jvmOverloads.kt") + public void testJvmOverloads() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/jvmOverloads.kt"); + } + + @Test + @TestMetadata("kt23239.kt") + public void testKt23239() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23239.kt"); + } + + @Test + @TestMetadata("kt23739.kt") + public void testKt23739() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23739.kt"); + } + + @Test + @TestMetadata("nestedEnumEntryValue.kt") + public void testNestedEnumEntryValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/nestedEnumEntryValue.kt"); + } + + @Test + @TestMetadata("parametersInArgumentValues.kt") + public void testParametersInArgumentValues() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/parametersInArgumentValues.kt"); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/superCall.kt"); + } + + @Test + @TestMetadata("suspend.kt") + public void testSuspend() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/suspend.kt"); + } + + @Test + @TestMetadata("typeAlias.kt") + public void testTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/typeAlias.kt"); + } + + @Test + @TestMetadata("withTypeParameter.kt") + public void testWithTypeParameter() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") public class MultiModule { - @Test - @TestMetadata("accessToLocalClassFromBackend.kt") - public void testAccessToLocalClassFromBackend() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/accessToLocalClassFromBackend.kt"); - } - @Test public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } - @Test - @TestMetadata("correctParentForTypeParameter.kt") - public void testCorrectParentForTypeParameter() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/correctParentForTypeParameter.kt"); - } - - @Test - @TestMetadata("enumEntryNameCall.kt") - public void testEnumEntryNameCall() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/enumEntryNameCall.kt"); - } - - @Test - @TestMetadata("expectActualCallableReference.kt") - public void testExpectActualCallableReference() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualCallableReference.kt"); - } - - @Test - @TestMetadata("expectActualDifferentExtensionReceiversOnOverloads.kt") - public void testExpectActualDifferentExtensionReceiversOnOverloads() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualDifferentExtensionReceiversOnOverloads.kt"); - } - - @Test - @TestMetadata("expectActualDifferentPackages.kt") - public void testExpectActualDifferentPackages() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualDifferentPackages.kt"); - } - - @Test - @TestMetadata("expectActualFakeOverrides.kt") - public void testExpectActualFakeOverrides() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualFakeOverrides.kt"); - } - - @Test - @TestMetadata("expectActualMultiCommon.kt") - public void testExpectActualMultiCommon() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualMultiCommon.kt"); - } - - @Test - @TestMetadata("expectActualOverloads.kt") - public void testExpectActualOverloads() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualOverloads.kt"); - } - - @Test - @TestMetadata("expectActualSimple.kt") - public void testExpectActualSimple() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualSimple.kt"); - } - - @Test - @TestMetadata("expectActualTypealias.kt") - public void testExpectActualTypealias() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualTypealias.kt"); - } - - @Test - @TestMetadata("expectInterfaceInSupertypes.kt") - public void testExpectInterfaceInSupertypes() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectInterfaceInSupertypes.kt"); - } - @Test @TestMetadata("expectInterfaceInheritance.kt") public void testExpectInterfaceInheritance() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectInterfaceInheritance.kt"); } - @Test - @TestMetadata("fakeOverridesInPlatformModule.kt") - public void testFakeOverridesInPlatformModule() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/fakeOverridesInPlatformModule.kt"); - } - - @Test - @TestMetadata("getRidOfDoubleBindingInFir2IrLazyProperty.kt") - public void testGetRidOfDoubleBindingInFir2IrLazyProperty() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/getRidOfDoubleBindingInFir2IrLazyProperty.kt"); - } - @Test @TestMetadata("hmppSimple.kt") public void testHmppSimple() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/multiModule/hmppSimple.kt"); } - - @Test - @TestMetadata("independentCommonSourceModules.kt") - public void testIndependentCommonSourceModules() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/independentCommonSourceModules.kt"); - } - - @Test - @TestMetadata("kt-51753-1.kt") - public void testKt_51753_1() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/kt-51753-1.kt"); - } - - @Test - @TestMetadata("kt-51753-2.kt") - public void testKt_51753_2() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/kt-51753-2.kt"); - } - - @Test - @TestMetadata("kt-56329.kt") - public void testKt_56329() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/kt-56329.kt"); - } - - @Test - @TestMetadata("valueClasses.kt") - public void testValueClasses() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/valueClasses.kt"); - } } } diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 3b6f3fe3c7e..dcd944f2a0f 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -27060,6 +27060,258 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } } + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class K2 extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Annotations extends AbstractLightAnalysisModeTest { + @TestMetadata("annotationsViaActualTypeAliasFromBinary.kt") + public void ignoreAnnotationsViaActualTypeAliasFromBinary() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/annotationsViaActualTypeAliasFromBinary.kt"); + } + + @TestMetadata("expectClassInJvmMultifileFacade.kt") + public void ignoreExpectClassInJvmMultifileFacade() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/expectClassInJvmMultifileFacade.kt"); + } + + @TestMetadata("optionalExpectation.kt") + public void ignoreOptionalExpectation() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/optionalExpectation.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInAnnotations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/basic") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Basic extends AbstractLightAnalysisModeTest { + @TestMetadata("expectProperty.kt") + public void ignoreExpectProperty() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectProperty.kt"); + } + + @TestMetadata("noArgActualConstructor.kt") + public void ignoreNoArgActualConstructor() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/noArgActualConstructor.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + @TestMetadata("accessToLocalClassFromBackend.kt") + public void testAccessToLocalClassFromBackend() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/accessToLocalClassFromBackend.kt"); + } + + public void testAllFilesPresentInBasic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/basic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("correctParentForTypeParameter.kt") + public void testCorrectParentForTypeParameter() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/correctParentForTypeParameter.kt"); + } + + @TestMetadata("enumEntryNameCall.kt") + public void testEnumEntryNameCall() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/enumEntryNameCall.kt"); + } + + @TestMetadata("expectActualDifferentExtensionReceiversOnOverloads.kt") + public void testExpectActualDifferentExtensionReceiversOnOverloads() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualDifferentExtensionReceiversOnOverloads.kt"); + } + + @TestMetadata("expectActualMultiCommon.kt") + public void testExpectActualMultiCommon() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualMultiCommon.kt"); + } + + @TestMetadata("expectActualSimple.kt") + public void testExpectActualSimple() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualSimple.kt"); + } + + @TestMetadata("expectInterfaceInSupertypes.kt") + public void testExpectInterfaceInSupertypes() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt"); + } + + @TestMetadata("fakeOverridesInPlatformModule.kt") + public void testFakeOverridesInPlatformModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/fakeOverridesInPlatformModule.kt"); + } + + @TestMetadata("getRidOfDoubleBindingInFir2IrLazyProperty.kt") + public void testGetRidOfDoubleBindingInFir2IrLazyProperty() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/getRidOfDoubleBindingInFir2IrLazyProperty.kt"); + } + + @TestMetadata("kt-56329.kt") + public void testKt_56329() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/defaultArguments") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DefaultArguments extends AbstractLightAnalysisModeTest { + @TestMetadata("bothInExpectAndActual.kt") + public void ignoreBothInExpectAndActual() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual.kt"); + } + + @TestMetadata("bothInExpectAndActual2.kt") + public void ignoreBothInExpectAndActual2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual2.kt"); + } + + @TestMetadata("constructor.kt") + public void ignoreConstructor() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/constructor.kt"); + } + + @TestMetadata("delegatedExpectedInterface.kt") + public void ignoreDelegatedExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/delegatedExpectedInterface.kt"); + } + + @TestMetadata("dispatchReceiverValue.kt") + public void ignoreDispatchReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/dispatchReceiverValue.kt"); + } + + @TestMetadata("extensionReceiverValue.kt") + public void ignoreExtensionReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/extensionReceiverValue.kt"); + } + + @TestMetadata("function.kt") + public void ignoreFunction() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/function.kt"); + } + + @TestMetadata("functionFromOtherModule.kt") + public void ignoreFunctionFromOtherModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/functionFromOtherModule.kt"); + } + + @TestMetadata("inheritedFromCommonClass.kt") + public void ignoreInheritedFromCommonClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromCommonClass.kt"); + } + + @TestMetadata("inheritedFromExpectedClass.kt") + public void ignoreInheritedFromExpectedClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedClass.kt"); + } + + @TestMetadata("inheritedFromExpectedInterface.kt") + public void ignoreInheritedFromExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedInterface.kt"); + } + + @TestMetadata("inheritedFromExpectedMethod.kt") + public void ignoreInheritedFromExpectedMethod() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedMethod.kt"); + } + + @TestMetadata("inheritedInExpectedDeclarations.kt") + public void ignoreInheritedInExpectedDeclarations() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedInExpectedDeclarations.kt"); + } + + @TestMetadata("inheritedViaAnotherInterfaceIndirectly.kt") + public void ignoreInheritedViaAnotherInterfaceIndirectly() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt"); + } + + @TestMetadata("inlineFunctionWithDefaultLambda.kt") + public void ignoreInlineFunctionWithDefaultLambda() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inlineFunctionWithDefaultLambda.kt"); + } + + @TestMetadata("jvmOverloads.kt") + public void ignoreJvmOverloads() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/jvmOverloads.kt"); + } + + @TestMetadata("kt23239.kt") + public void ignoreKt23239() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23239.kt"); + } + + @TestMetadata("kt23739.kt") + public void ignoreKt23739() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23739.kt"); + } + + @TestMetadata("nestedEnumEntryValue.kt") + public void ignoreNestedEnumEntryValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/nestedEnumEntryValue.kt"); + } + + @TestMetadata("parametersInArgumentValues.kt") + public void ignoreParametersInArgumentValues() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/parametersInArgumentValues.kt"); + } + + @TestMetadata("superCall.kt") + public void ignoreSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/superCall.kt"); + } + + @TestMetadata("suspend.kt") + public void ignoreSuspend() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/suspend.kt"); + } + + @TestMetadata("typeAlias.kt") + public void ignoreTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/typeAlias.kt"); + } + + @TestMetadata("withTypeParameter.kt") + public void ignoreWithTypeParameter() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInDefaultArguments() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("annotations.kt") + public void testAnnotations() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/annotations.kt"); + } + } + } + @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -27068,64 +27320,14 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } - @TestMetadata("accessToLocalClassFromBackend.kt") - public void testAccessToLocalClassFromBackend() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/accessToLocalClassFromBackend.kt"); - } - public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } - @TestMetadata("correctParentForTypeParameter.kt") - public void testCorrectParentForTypeParameter() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/correctParentForTypeParameter.kt"); - } - - @TestMetadata("enumEntryNameCall.kt") - public void testEnumEntryNameCall() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/enumEntryNameCall.kt"); - } - - @TestMetadata("expectActualDifferentExtensionReceiversOnOverloads.kt") - public void testExpectActualDifferentExtensionReceiversOnOverloads() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualDifferentExtensionReceiversOnOverloads.kt"); - } - - @TestMetadata("expectActualMultiCommon.kt") - public void testExpectActualMultiCommon() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualMultiCommon.kt"); - } - - @TestMetadata("expectActualSimple.kt") - public void testExpectActualSimple() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualSimple.kt"); - } - - @TestMetadata("expectInterfaceInSupertypes.kt") - public void testExpectInterfaceInSupertypes() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectInterfaceInSupertypes.kt"); - } - @TestMetadata("expectInterfaceInheritance.kt") public void testExpectInterfaceInheritance() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectInterfaceInheritance.kt"); } - - @TestMetadata("fakeOverridesInPlatformModule.kt") - public void testFakeOverridesInPlatformModule() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/fakeOverridesInPlatformModule.kt"); - } - - @TestMetadata("getRidOfDoubleBindingInFir2IrLazyProperty.kt") - public void testGetRidOfDoubleBindingInFir2IrLazyProperty() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/getRidOfDoubleBindingInFir2IrLazyProperty.kt"); - } - - @TestMetadata("kt-56329.kt") - public void testKt_56329() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/kt-56329.kt"); - } } } diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java index 4c5f6fc26a4..83242fdfca5 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java @@ -23023,6 +23023,196 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + public class K2 { + @Test + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations") + @TestDataPath("$PROJECT_ROOT") + public class Annotations { + @Test + public void testAllFilesPresentInAnnotations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @Test + @TestMetadata("optionalExpectation.kt") + public void testOptionalExpectation() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/optionalExpectation.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/basic") + @TestDataPath("$PROJECT_ROOT") + public class Basic { + @Test + public void testAllFilesPresentInBasic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/basic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @Test + @TestMetadata("expectProperty.kt") + public void testExpectProperty() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectProperty.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/defaultArguments") + @TestDataPath("$PROJECT_ROOT") + public class DefaultArguments { + @Test + public void testAllFilesPresentInDefaultArguments() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @Test + @TestMetadata("bothInExpectAndActual.kt") + public void testBothInExpectAndActual() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual.kt"); + } + + @Test + @TestMetadata("bothInExpectAndActual2.kt") + public void testBothInExpectAndActual2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual2.kt"); + } + + @Test + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/constructor.kt"); + } + + @Test + @TestMetadata("delegatedExpectedInterface.kt") + public void testDelegatedExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/delegatedExpectedInterface.kt"); + } + + @Test + @TestMetadata("dispatchReceiverValue.kt") + public void testDispatchReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/dispatchReceiverValue.kt"); + } + + @Test + @TestMetadata("extensionReceiverValue.kt") + public void testExtensionReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/extensionReceiverValue.kt"); + } + + @Test + @TestMetadata("function.kt") + public void testFunction() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/function.kt"); + } + + @Test + @TestMetadata("functionFromOtherModule.kt") + public void testFunctionFromOtherModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/functionFromOtherModule.kt"); + } + + @Test + @TestMetadata("inheritedFromCommonClass.kt") + public void testInheritedFromCommonClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromCommonClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedClass.kt") + public void testInheritedFromExpectedClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedInterface.kt") + public void testInheritedFromExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedInterface.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedMethod.kt") + public void testInheritedFromExpectedMethod() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedMethod.kt"); + } + + @Test + @TestMetadata("inheritedInExpectedDeclarations.kt") + public void testInheritedInExpectedDeclarations() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedInExpectedDeclarations.kt"); + } + + @Test + @TestMetadata("inheritedViaAnotherInterfaceIndirectly.kt") + public void testInheritedViaAnotherInterfaceIndirectly() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt"); + } + + @Test + @TestMetadata("inlineFunctionWithDefaultLambda.kt") + public void testInlineFunctionWithDefaultLambda() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inlineFunctionWithDefaultLambda.kt"); + } + + @Test + @TestMetadata("kt23239.kt") + public void testKt23239() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23239.kt"); + } + + @Test + @TestMetadata("kt23739.kt") + public void testKt23739() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23739.kt"); + } + + @Test + @TestMetadata("nestedEnumEntryValue.kt") + public void testNestedEnumEntryValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/nestedEnumEntryValue.kt"); + } + + @Test + @TestMetadata("parametersInArgumentValues.kt") + public void testParametersInArgumentValues() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/parametersInArgumentValues.kt"); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/superCall.kt"); + } + + @Test + @TestMetadata("suspend.kt") + public void testSuspend() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/suspend.kt"); + } + + @Test + @TestMetadata("typeAlias.kt") + public void testTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/typeAlias.kt"); + } + + @Test + @TestMetadata("withTypeParameter.kt") + public void testWithTypeParameter() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java index 8a115743ba2..8d9e89b6b6d 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java @@ -23041,6 +23041,202 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { } } + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + public class K2 { + @Test + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations") + @TestDataPath("$PROJECT_ROOT") + public class Annotations { + @Test + public void testAllFilesPresentInAnnotations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @Test + @TestMetadata("optionalExpectation.kt") + public void testOptionalExpectation() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/optionalExpectation.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/basic") + @TestDataPath("$PROJECT_ROOT") + public class Basic { + @Test + public void testAllFilesPresentInBasic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/basic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @Test + @TestMetadata("expectActualSimpleJs.kt") + public void testExpectActualSimpleJs() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualSimpleJs.kt"); + } + + @Test + @TestMetadata("expectProperty.kt") + public void testExpectProperty() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectProperty.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/defaultArguments") + @TestDataPath("$PROJECT_ROOT") + public class DefaultArguments { + @Test + public void testAllFilesPresentInDefaultArguments() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @Test + @TestMetadata("bothInExpectAndActual.kt") + public void testBothInExpectAndActual() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual.kt"); + } + + @Test + @TestMetadata("bothInExpectAndActual2.kt") + public void testBothInExpectAndActual2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual2.kt"); + } + + @Test + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/constructor.kt"); + } + + @Test + @TestMetadata("delegatedExpectedInterface.kt") + public void testDelegatedExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/delegatedExpectedInterface.kt"); + } + + @Test + @TestMetadata("dispatchReceiverValue.kt") + public void testDispatchReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/dispatchReceiverValue.kt"); + } + + @Test + @TestMetadata("extensionReceiverValue.kt") + public void testExtensionReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/extensionReceiverValue.kt"); + } + + @Test + @TestMetadata("function.kt") + public void testFunction() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/function.kt"); + } + + @Test + @TestMetadata("functionFromOtherModule.kt") + public void testFunctionFromOtherModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/functionFromOtherModule.kt"); + } + + @Test + @TestMetadata("inheritedFromCommonClass.kt") + public void testInheritedFromCommonClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromCommonClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedClass.kt") + public void testInheritedFromExpectedClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedInterface.kt") + public void testInheritedFromExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedInterface.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedMethod.kt") + public void testInheritedFromExpectedMethod() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedMethod.kt"); + } + + @Test + @TestMetadata("inheritedInExpectedDeclarations.kt") + public void testInheritedInExpectedDeclarations() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedInExpectedDeclarations.kt"); + } + + @Test + @TestMetadata("inheritedViaAnotherInterfaceIndirectly.kt") + public void testInheritedViaAnotherInterfaceIndirectly() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt"); + } + + @Test + @TestMetadata("inlineFunctionWithDefaultLambda.kt") + public void testInlineFunctionWithDefaultLambda() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inlineFunctionWithDefaultLambda.kt"); + } + + @Test + @TestMetadata("kt23239.kt") + public void testKt23239() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23239.kt"); + } + + @Test + @TestMetadata("kt23739.kt") + public void testKt23739() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23739.kt"); + } + + @Test + @TestMetadata("nestedEnumEntryValue.kt") + public void testNestedEnumEntryValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/nestedEnumEntryValue.kt"); + } + + @Test + @TestMetadata("parametersInArgumentValues.kt") + public void testParametersInArgumentValues() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/parametersInArgumentValues.kt"); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/superCall.kt"); + } + + @Test + @TestMetadata("suspend.kt") + public void testSuspend() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/suspend.kt"); + } + + @Test + @TestMetadata("typeAlias.kt") + public void testTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/typeAlias.kt"); + } + + @Test + @TestMetadata("withTypeParameter.kt") + public void testWithTypeParameter() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") @@ -23068,12 +23264,6 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualMemberLink.kt"); } - @Test - @TestMetadata("expectActualSimpleJs.kt") - public void testExpectActualSimpleJs() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualSimpleJs.kt"); - } - @Test @TestMetadata("expectActualTypealiasLink.kt") public void testExpectActualTypealiasLink() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java index 3472a433098..cac4243b79e 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java @@ -23041,6 +23041,202 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } } + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + public class K2 { + @Test + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations") + @TestDataPath("$PROJECT_ROOT") + public class Annotations { + @Test + public void testAllFilesPresentInAnnotations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @Test + @TestMetadata("optionalExpectation.kt") + public void testOptionalExpectation() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/optionalExpectation.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/basic") + @TestDataPath("$PROJECT_ROOT") + public class Basic { + @Test + public void testAllFilesPresentInBasic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/basic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @Test + @TestMetadata("expectActualSimpleJs.kt") + public void testExpectActualSimpleJs() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualSimpleJs.kt"); + } + + @Test + @TestMetadata("expectProperty.kt") + public void testExpectProperty() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectProperty.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/defaultArguments") + @TestDataPath("$PROJECT_ROOT") + public class DefaultArguments { + @Test + public void testAllFilesPresentInDefaultArguments() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @Test + @TestMetadata("bothInExpectAndActual.kt") + public void testBothInExpectAndActual() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual.kt"); + } + + @Test + @TestMetadata("bothInExpectAndActual2.kt") + public void testBothInExpectAndActual2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual2.kt"); + } + + @Test + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/constructor.kt"); + } + + @Test + @TestMetadata("delegatedExpectedInterface.kt") + public void testDelegatedExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/delegatedExpectedInterface.kt"); + } + + @Test + @TestMetadata("dispatchReceiverValue.kt") + public void testDispatchReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/dispatchReceiverValue.kt"); + } + + @Test + @TestMetadata("extensionReceiverValue.kt") + public void testExtensionReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/extensionReceiverValue.kt"); + } + + @Test + @TestMetadata("function.kt") + public void testFunction() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/function.kt"); + } + + @Test + @TestMetadata("functionFromOtherModule.kt") + public void testFunctionFromOtherModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/functionFromOtherModule.kt"); + } + + @Test + @TestMetadata("inheritedFromCommonClass.kt") + public void testInheritedFromCommonClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromCommonClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedClass.kt") + public void testInheritedFromExpectedClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedInterface.kt") + public void testInheritedFromExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedInterface.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedMethod.kt") + public void testInheritedFromExpectedMethod() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedMethod.kt"); + } + + @Test + @TestMetadata("inheritedInExpectedDeclarations.kt") + public void testInheritedInExpectedDeclarations() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedInExpectedDeclarations.kt"); + } + + @Test + @TestMetadata("inheritedViaAnotherInterfaceIndirectly.kt") + public void testInheritedViaAnotherInterfaceIndirectly() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt"); + } + + @Test + @TestMetadata("inlineFunctionWithDefaultLambda.kt") + public void testInlineFunctionWithDefaultLambda() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inlineFunctionWithDefaultLambda.kt"); + } + + @Test + @TestMetadata("kt23239.kt") + public void testKt23239() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23239.kt"); + } + + @Test + @TestMetadata("kt23739.kt") + public void testKt23739() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23739.kt"); + } + + @Test + @TestMetadata("nestedEnumEntryValue.kt") + public void testNestedEnumEntryValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/nestedEnumEntryValue.kt"); + } + + @Test + @TestMetadata("parametersInArgumentValues.kt") + public void testParametersInArgumentValues() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/parametersInArgumentValues.kt"); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/superCall.kt"); + } + + @Test + @TestMetadata("suspend.kt") + public void testSuspend() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/suspend.kt"); + } + + @Test + @TestMetadata("typeAlias.kt") + public void testTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/typeAlias.kt"); + } + + @Test + @TestMetadata("withTypeParameter.kt") + public void testWithTypeParameter() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") @@ -23068,12 +23264,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualMemberLink.kt"); } - @Test - @TestMetadata("expectActualSimpleJs.kt") - public void testExpectActualSimpleJs() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualSimpleJs.kt"); - } - @Test @TestMetadata("expectActualTypealiasLink.kt") public void testExpectActualTypealiasLink() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java index 980564639b0..002783b3035 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java @@ -23041,6 +23041,202 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes } } + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + public class K2 { + @Test + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations") + @TestDataPath("$PROJECT_ROOT") + public class Annotations { + @Test + public void testAllFilesPresentInAnnotations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @Test + @TestMetadata("optionalExpectation.kt") + public void testOptionalExpectation() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/optionalExpectation.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/basic") + @TestDataPath("$PROJECT_ROOT") + public class Basic { + @Test + public void testAllFilesPresentInBasic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/basic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @Test + @TestMetadata("expectActualSimpleJs.kt") + public void testExpectActualSimpleJs() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualSimpleJs.kt"); + } + + @Test + @TestMetadata("expectProperty.kt") + public void testExpectProperty() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectProperty.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/defaultArguments") + @TestDataPath("$PROJECT_ROOT") + public class DefaultArguments { + @Test + public void testAllFilesPresentInDefaultArguments() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @Test + @TestMetadata("bothInExpectAndActual.kt") + public void testBothInExpectAndActual() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual.kt"); + } + + @Test + @TestMetadata("bothInExpectAndActual2.kt") + public void testBothInExpectAndActual2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual2.kt"); + } + + @Test + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/constructor.kt"); + } + + @Test + @TestMetadata("delegatedExpectedInterface.kt") + public void testDelegatedExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/delegatedExpectedInterface.kt"); + } + + @Test + @TestMetadata("dispatchReceiverValue.kt") + public void testDispatchReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/dispatchReceiverValue.kt"); + } + + @Test + @TestMetadata("extensionReceiverValue.kt") + public void testExtensionReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/extensionReceiverValue.kt"); + } + + @Test + @TestMetadata("function.kt") + public void testFunction() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/function.kt"); + } + + @Test + @TestMetadata("functionFromOtherModule.kt") + public void testFunctionFromOtherModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/functionFromOtherModule.kt"); + } + + @Test + @TestMetadata("inheritedFromCommonClass.kt") + public void testInheritedFromCommonClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromCommonClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedClass.kt") + public void testInheritedFromExpectedClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedInterface.kt") + public void testInheritedFromExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedInterface.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedMethod.kt") + public void testInheritedFromExpectedMethod() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedMethod.kt"); + } + + @Test + @TestMetadata("inheritedInExpectedDeclarations.kt") + public void testInheritedInExpectedDeclarations() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedInExpectedDeclarations.kt"); + } + + @Test + @TestMetadata("inheritedViaAnotherInterfaceIndirectly.kt") + public void testInheritedViaAnotherInterfaceIndirectly() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt"); + } + + @Test + @TestMetadata("inlineFunctionWithDefaultLambda.kt") + public void testInlineFunctionWithDefaultLambda() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inlineFunctionWithDefaultLambda.kt"); + } + + @Test + @TestMetadata("kt23239.kt") + public void testKt23239() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23239.kt"); + } + + @Test + @TestMetadata("kt23739.kt") + public void testKt23739() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23739.kt"); + } + + @Test + @TestMetadata("nestedEnumEntryValue.kt") + public void testNestedEnumEntryValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/nestedEnumEntryValue.kt"); + } + + @Test + @TestMetadata("parametersInArgumentValues.kt") + public void testParametersInArgumentValues() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/parametersInArgumentValues.kt"); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/superCall.kt"); + } + + @Test + @TestMetadata("suspend.kt") + public void testSuspend() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/suspend.kt"); + } + + @Test + @TestMetadata("typeAlias.kt") + public void testTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/typeAlias.kt"); + } + + @Test + @TestMetadata("withTypeParameter.kt") + public void testWithTypeParameter() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") @@ -23068,12 +23264,6 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualMemberLink.kt"); } - @Test - @TestMetadata("expectActualSimpleJs.kt") - public void testExpectActualSimpleJs() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualSimpleJs.kt"); - } - @Test @TestMetadata("expectActualTypealiasLink.kt") public void testExpectActualTypealiasLink() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/K2NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/K2NativeCodegenBoxTestGenerated.java index c1f4c121822..efbd163378a 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/K2NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/K2NativeCodegenBoxTestGenerated.java @@ -26162,6 +26162,208 @@ public class K2NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTes } } + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + @Tag("codegenK2") + @UseExtTestCaseGroupProvider() + @K2Pipeline() + public class K2 { + @Test + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations") + @TestDataPath("$PROJECT_ROOT") + @Tag("codegenK2") + @UseExtTestCaseGroupProvider() + @K2Pipeline() + public class Annotations { + @Test + public void testAllFilesPresentInAnnotations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("optionalExpectation.kt") + public void testOptionalExpectation() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/optionalExpectation.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/basic") + @TestDataPath("$PROJECT_ROOT") + @Tag("codegenK2") + @UseExtTestCaseGroupProvider() + @K2Pipeline() + public class Basic { + @Test + public void testAllFilesPresentInBasic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/basic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("expectProperty.kt") + public void testExpectProperty() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectProperty.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/defaultArguments") + @TestDataPath("$PROJECT_ROOT") + @Tag("codegenK2") + @UseExtTestCaseGroupProvider() + @K2Pipeline() + public class DefaultArguments { + @Test + public void testAllFilesPresentInDefaultArguments() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("bothInExpectAndActual.kt") + public void testBothInExpectAndActual() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual.kt"); + } + + @Test + @TestMetadata("bothInExpectAndActual2.kt") + public void testBothInExpectAndActual2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual2.kt"); + } + + @Test + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/constructor.kt"); + } + + @Test + @TestMetadata("delegatedExpectedInterface.kt") + public void testDelegatedExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/delegatedExpectedInterface.kt"); + } + + @Test + @TestMetadata("dispatchReceiverValue.kt") + public void testDispatchReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/dispatchReceiverValue.kt"); + } + + @Test + @TestMetadata("extensionReceiverValue.kt") + public void testExtensionReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/extensionReceiverValue.kt"); + } + + @Test + @TestMetadata("function.kt") + public void testFunction() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/function.kt"); + } + + @Test + @TestMetadata("functionFromOtherModule.kt") + public void testFunctionFromOtherModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/functionFromOtherModule.kt"); + } + + @Test + @TestMetadata("inheritedFromCommonClass.kt") + public void testInheritedFromCommonClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromCommonClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedClass.kt") + public void testInheritedFromExpectedClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedInterface.kt") + public void testInheritedFromExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedInterface.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedMethod.kt") + public void testInheritedFromExpectedMethod() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedMethod.kt"); + } + + @Test + @TestMetadata("inheritedInExpectedDeclarations.kt") + public void testInheritedInExpectedDeclarations() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedInExpectedDeclarations.kt"); + } + + @Test + @TestMetadata("inheritedViaAnotherInterfaceIndirectly.kt") + public void testInheritedViaAnotherInterfaceIndirectly() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt"); + } + + @Test + @TestMetadata("inlineFunctionWithDefaultLambda.kt") + public void testInlineFunctionWithDefaultLambda() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inlineFunctionWithDefaultLambda.kt"); + } + + @Test + @TestMetadata("kt23239.kt") + public void testKt23239() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23239.kt"); + } + + @Test + @TestMetadata("kt23739.kt") + public void testKt23739() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23739.kt"); + } + + @Test + @TestMetadata("nestedEnumEntryValue.kt") + public void testNestedEnumEntryValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/nestedEnumEntryValue.kt"); + } + + @Test + @TestMetadata("parametersInArgumentValues.kt") + public void testParametersInArgumentValues() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/parametersInArgumentValues.kt"); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/superCall.kt"); + } + + @Test + @TestMetadata("suspend.kt") + public void testSuspend() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/suspend.kt"); + } + + @Test + @TestMetadata("typeAlias.kt") + public void testTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/typeAlias.kt"); + } + + @Test + @TestMetadata("withTypeParameter.kt") + public void testWithTypeParameter() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java index 8d253a8eb74..334f2669eab 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java @@ -25862,6 +25862,204 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest } } + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + @Tag("codegen") + @UseExtTestCaseGroupProvider() + public class K2 { + @Test + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations") + @TestDataPath("$PROJECT_ROOT") + @Tag("codegen") + @UseExtTestCaseGroupProvider() + public class Annotations { + @Test + public void testAllFilesPresentInAnnotations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("optionalExpectation.kt") + public void testOptionalExpectation() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/optionalExpectation.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/basic") + @TestDataPath("$PROJECT_ROOT") + @Tag("codegen") + @UseExtTestCaseGroupProvider() + public class Basic { + @Test + public void testAllFilesPresentInBasic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/basic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("expectProperty.kt") + public void testExpectProperty() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectProperty.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/defaultArguments") + @TestDataPath("$PROJECT_ROOT") + @Tag("codegen") + @UseExtTestCaseGroupProvider() + public class DefaultArguments { + @Test + public void testAllFilesPresentInDefaultArguments() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("bothInExpectAndActual.kt") + public void testBothInExpectAndActual() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual.kt"); + } + + @Test + @TestMetadata("bothInExpectAndActual2.kt") + public void testBothInExpectAndActual2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual2.kt"); + } + + @Test + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/constructor.kt"); + } + + @Test + @TestMetadata("delegatedExpectedInterface.kt") + public void testDelegatedExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/delegatedExpectedInterface.kt"); + } + + @Test + @TestMetadata("dispatchReceiverValue.kt") + public void testDispatchReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/dispatchReceiverValue.kt"); + } + + @Test + @TestMetadata("extensionReceiverValue.kt") + public void testExtensionReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/extensionReceiverValue.kt"); + } + + @Test + @TestMetadata("function.kt") + public void testFunction() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/function.kt"); + } + + @Test + @TestMetadata("functionFromOtherModule.kt") + public void testFunctionFromOtherModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/functionFromOtherModule.kt"); + } + + @Test + @TestMetadata("inheritedFromCommonClass.kt") + public void testInheritedFromCommonClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromCommonClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedClass.kt") + public void testInheritedFromExpectedClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedClass.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedInterface.kt") + public void testInheritedFromExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedInterface.kt"); + } + + @Test + @TestMetadata("inheritedFromExpectedMethod.kt") + public void testInheritedFromExpectedMethod() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedMethod.kt"); + } + + @Test + @TestMetadata("inheritedInExpectedDeclarations.kt") + public void testInheritedInExpectedDeclarations() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedInExpectedDeclarations.kt"); + } + + @Test + @TestMetadata("inheritedViaAnotherInterfaceIndirectly.kt") + public void testInheritedViaAnotherInterfaceIndirectly() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt"); + } + + @Test + @TestMetadata("inlineFunctionWithDefaultLambda.kt") + public void testInlineFunctionWithDefaultLambda() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inlineFunctionWithDefaultLambda.kt"); + } + + @Test + @TestMetadata("kt23239.kt") + public void testKt23239() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23239.kt"); + } + + @Test + @TestMetadata("kt23739.kt") + public void testKt23739() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23739.kt"); + } + + @Test + @TestMetadata("nestedEnumEntryValue.kt") + public void testNestedEnumEntryValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/nestedEnumEntryValue.kt"); + } + + @Test + @TestMetadata("parametersInArgumentValues.kt") + public void testParametersInArgumentValues() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/parametersInArgumentValues.kt"); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/superCall.kt"); + } + + @Test + @TestMetadata("suspend.kt") + public void testSuspend() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/suspend.kt"); + } + + @Test + @TestMetadata("typeAlias.kt") + public void testTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/typeAlias.kt"); + } + + @Test + @TestMetadata("withTypeParameter.kt") + public void testWithTypeParameter() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java index c79c92888f6..df83b3f7d44 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java @@ -20618,6 +20618,183 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } } + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class K2 extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Annotations extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInAnnotations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/annotations"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + + @TestMetadata("optionalExpectation.kt") + public void testOptionalExpectation() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/annotations/optionalExpectation.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/basic") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Basic extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInBasic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/basic"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + + @TestMetadata("expectProperty.kt") + public void testExpectProperty() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectProperty.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/multiplatform/k2/defaultArguments") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DefaultArguments extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInDefaultArguments() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/defaultArguments"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + + @TestMetadata("bothInExpectAndActual.kt") + public void testBothInExpectAndActual() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual.kt"); + } + + @TestMetadata("bothInExpectAndActual2.kt") + public void testBothInExpectAndActual2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/bothInExpectAndActual2.kt"); + } + + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/constructor.kt"); + } + + @TestMetadata("delegatedExpectedInterface.kt") + public void testDelegatedExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/delegatedExpectedInterface.kt"); + } + + @TestMetadata("dispatchReceiverValue.kt") + public void testDispatchReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/dispatchReceiverValue.kt"); + } + + @TestMetadata("extensionReceiverValue.kt") + public void testExtensionReceiverValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/extensionReceiverValue.kt"); + } + + @TestMetadata("function.kt") + public void testFunction() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/function.kt"); + } + + @TestMetadata("functionFromOtherModule.kt") + public void testFunctionFromOtherModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/functionFromOtherModule.kt"); + } + + @TestMetadata("inheritedFromCommonClass.kt") + public void testInheritedFromCommonClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromCommonClass.kt"); + } + + @TestMetadata("inheritedFromExpectedClass.kt") + public void testInheritedFromExpectedClass() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedClass.kt"); + } + + @TestMetadata("inheritedFromExpectedInterface.kt") + public void testInheritedFromExpectedInterface() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedInterface.kt"); + } + + @TestMetadata("inheritedFromExpectedMethod.kt") + public void testInheritedFromExpectedMethod() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedFromExpectedMethod.kt"); + } + + @TestMetadata("inheritedInExpectedDeclarations.kt") + public void testInheritedInExpectedDeclarations() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedInExpectedDeclarations.kt"); + } + + @TestMetadata("inheritedViaAnotherInterfaceIndirectly.kt") + public void testInheritedViaAnotherInterfaceIndirectly() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt"); + } + + @TestMetadata("inlineFunctionWithDefaultLambda.kt") + public void testInlineFunctionWithDefaultLambda() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/inlineFunctionWithDefaultLambda.kt"); + } + + @TestMetadata("kt23239.kt") + public void testKt23239() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23239.kt"); + } + + @TestMetadata("kt23739.kt") + public void testKt23739() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/kt23739.kt"); + } + + @TestMetadata("nestedEnumEntryValue.kt") + public void testNestedEnumEntryValue() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/nestedEnumEntryValue.kt"); + } + + @TestMetadata("parametersInArgumentValues.kt") + public void testParametersInArgumentValues() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/parametersInArgumentValues.kt"); + } + + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/superCall.kt"); + } + + @TestMetadata("suspend.kt") + public void testSuspend() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/suspend.kt"); + } + + @TestMetadata("typeAlias.kt") + public void testTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/typeAlias.kt"); + } + + @TestMetadata("withTypeParameter.kt") + public void testWithTypeParameter() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt"); + } + } + } + @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class)