From 44d57c77517b2c232819cea3a78f9feb859edd09 Mon Sep 17 00:00:00 2001 From: Dmitriy Dolovov Date: Fri, 8 Dec 2023 18:58:05 +0100 Subject: [PATCH] [test] Add missing KMP IR text tests to "K1-only" and "K2-only" groups ^KT-60390 --- .../FirLightTreeJvmIrTextTestGenerated.java | 104 +++++++++----- .../ir/FirPsiJvmIrTextTestGenerated.java | 104 +++++++++----- .../k1/expectIntersectionOverride.ir.txt | 125 ++++++++++++++++ .../k1/expectIntersectionOverride.kt | 24 ++++ .../k1/expectIntersectionOverride.kt.txt | 42 ++++++ .../k1/expectIntersectionOverride.sig.kt.txt | 135 ++++++++++++++++++ .../k2/expectClassInherited.ir.txt | 52 +++++++ .../multiplatform/k2/expectClassInherited.kt | 29 ++++ .../k2/expectClassInherited.kt.txt | 29 ++++ .../k2/expectClassInherited.sig.kt.txt | 45 ++++++ .../k2/expectedSealedClass.ir.txt | 42 ++++++ .../multiplatform/k2/expectedSealedClass.kt | 18 +++ .../k2/expectedSealedClass.kt.txt | 21 +++ .../k2/expectedSealedClass.sig.kt.txt | 27 ++++ .../ir/ClassicJvmIrTextTestGenerated.java | 104 +++++++++----- .../klib/KlibIrTextTestCaseGenerated.java | 93 ++++++++---- .../FirLightTreeJsIrTextTestGenerated.java | 104 +++++++++----- .../test/fir/FirPsiJsIrTextTestGenerated.java | 104 +++++++++----- .../test/ir/ClassicJsIrTextTestGenerated.java | 104 +++++++++----- .../ClassicNativeIrTextTestGenerated.java | 104 +++++++++----- ...FirLightTreeNativeIrTextTestGenerated.java | 104 +++++++++----- .../FirPsiNativeIrTextTestGenerated.java | 104 +++++++++----- 22 files changed, 1295 insertions(+), 323 deletions(-) create mode 100644 compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.ir.txt create mode 100644 compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.kt create mode 100644 compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.kt.txt create mode 100644 compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.sig.kt.txt create mode 100644 compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.ir.txt create mode 100644 compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt create mode 100644 compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt.txt create mode 100644 compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.sig.kt.txt create mode 100644 compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.ir.txt create mode 100644 compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.kt create mode 100644 compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.kt.txt create mode 100644 compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.sig.kt.txt diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java index ee89549f903..f3340134f2c 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java @@ -1031,46 +1031,84 @@ public class FirLightTreeJvmIrTextTestGenerated extends AbstractFirLightTreeJvmI KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } - @Test - @TestMetadata("K1_expectClassInherited.kt") - public void testK1_expectClassInherited() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectClassInherited.kt"); + @Nested + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k1") + @TestDataPath("$PROJECT_ROOT") + public class K1 { + @Test + public void testAllFilesPresentInK1() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k1"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectClassInherited.kt"); + } + + @Test + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.kt"); + } + + @Test + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectMemberInNotExpectClass.kt"); + } + + @Test + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedEnumClass.kt"); + } + + @Test + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedSealedClass.kt"); + } } - @Test - @TestMetadata("K1_expectMemberInNotExpectClass.kt") - public void testK1_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectMemberInNotExpectClass.kt"); - } + @Nested + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + public class K2 { + @Test + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } - @Test - @TestMetadata("K1_expectedEnumClass.kt") - public void testK1_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedEnumClass.kt"); - } + @Test + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt"); + } - @Test - @TestMetadata("K1_expectedSealedClass.kt") - public void testK1_expectedSealedClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedSealedClass.kt"); - } + @Test + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectIntersectionOverride.kt"); + } - @Test - @TestMetadata("K2_expectIntersectionOverride.kt") - public void testK2_expectIntersectionOverride() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectIntersectionOverride.kt"); - } + @Test + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectMemberInNotExpectClass.kt"); + } - @Test - @TestMetadata("K2_expectMemberInNotExpectClass.kt") - public void testK2_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectMemberInNotExpectClass.kt"); - } + @Test + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedEnumClass.kt"); + } - @Test - @TestMetadata("K2_expectedEnumClass.kt") - public void testK2_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectedEnumClass.kt"); + @Test + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.kt"); + } } } diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java index 23c8f1beabf..fdb450bcfff 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java @@ -1031,46 +1031,84 @@ public class FirPsiJvmIrTextTestGenerated extends AbstractFirPsiJvmIrTextTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } - @Test - @TestMetadata("K1_expectClassInherited.kt") - public void testK1_expectClassInherited() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectClassInherited.kt"); + @Nested + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k1") + @TestDataPath("$PROJECT_ROOT") + public class K1 { + @Test + public void testAllFilesPresentInK1() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k1"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectClassInherited.kt"); + } + + @Test + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.kt"); + } + + @Test + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectMemberInNotExpectClass.kt"); + } + + @Test + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedEnumClass.kt"); + } + + @Test + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedSealedClass.kt"); + } } - @Test - @TestMetadata("K1_expectMemberInNotExpectClass.kt") - public void testK1_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectMemberInNotExpectClass.kt"); - } + @Nested + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + public class K2 { + @Test + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } - @Test - @TestMetadata("K1_expectedEnumClass.kt") - public void testK1_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedEnumClass.kt"); - } + @Test + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt"); + } - @Test - @TestMetadata("K1_expectedSealedClass.kt") - public void testK1_expectedSealedClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedSealedClass.kt"); - } + @Test + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectIntersectionOverride.kt"); + } - @Test - @TestMetadata("K2_expectIntersectionOverride.kt") - public void testK2_expectIntersectionOverride() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectIntersectionOverride.kt"); - } + @Test + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectMemberInNotExpectClass.kt"); + } - @Test - @TestMetadata("K2_expectMemberInNotExpectClass.kt") - public void testK2_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectMemberInNotExpectClass.kt"); - } + @Test + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedEnumClass.kt"); + } - @Test - @TestMetadata("K2_expectedEnumClass.kt") - public void testK2_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectedEnumClass.kt"); + @Test + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.kt"); + } } } diff --git a/compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.ir.txt b/compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.ir.txt new file mode 100644 index 00000000000..ed51b541c85 --- /dev/null +++ b/compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.ir.txt @@ -0,0 +1,125 @@ +FILE fqName: fileName:/expectIntersectionOverride.kt + CLASS INTERFACE name:I1 modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.I1 + FUN name:f visibility:public modality:ABSTRACT <> ($this:.I1) returnType:kotlin.String + $this: VALUE_PARAMETER name: type:.I1 + PROPERTY name:p visibility:public modality:ABSTRACT [val] + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:.I1) returnType:kotlin.Int + correspondingProperty: PROPERTY name:p visibility:public modality:ABSTRACT [val] + $this: VALUE_PARAMETER name: type:.I1 + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS INTERFACE name:I2 modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.I2 + FUN name:f visibility:public modality:ABSTRACT <> ($this:.I2) returnType:kotlin.String + $this: VALUE_PARAMETER name: type:.I2 + PROPERTY name:p visibility:public modality:ABSTRACT [val] + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:.I2) returnType:kotlin.Int + correspondingProperty: PROPERTY name:p visibility:public modality:ABSTRACT [val] + $this: VALUE_PARAMETER name: type:.I2 + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS CLASS name:C modality:FINAL visibility:public [expect] superTypes:[.I1; .I2] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.C + CONSTRUCTOR visibility:public <> () returnType:.C [primary,expect] + FUN name:f visibility:public modality:OPEN <> ($this:.C) returnType:kotlin.String [expect] + overridden: + public abstract fun f (): kotlin.String declared in .I1 + public abstract fun f (): kotlin.String declared in .I2 + $this: VALUE_PARAMETER name: type:.C + PROPERTY name:p visibility:public modality:OPEN [expect,val] + overridden: + public abstract p: kotlin.Int + public abstract p: kotlin.Int + FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [final] + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN <> ($this:.C) returnType:kotlin.Int + correspondingProperty: PROPERTY name:p visibility:public modality:OPEN [expect,val] + overridden: + public abstract fun (): kotlin.Int declared in .I1 + public abstract fun (): kotlin.Int declared in .I2 + $this: VALUE_PARAMETER name: type:.C + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .I1 + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .I2 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .I1 + public open fun hashCode (): kotlin.Int declared in .I2 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in .I1 + public open fun toString (): kotlin.String declared in .I2 + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS CLASS name:C modality:FINAL visibility:public superTypes:[.I1; .I2] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.C + CONSTRUCTOR visibility:public <> () returnType:.C [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[.I1; .I2]' + FUN name:f visibility:public modality:OPEN <> ($this:.C) returnType:kotlin.String + overridden: + public abstract fun f (): kotlin.String declared in .I1 + public abstract fun f (): kotlin.String declared in .I2 + $this: VALUE_PARAMETER name: type:.C + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun f (): kotlin.String declared in .C' + CONST String type=kotlin.String value="OK" + PROPERTY name:p visibility:public modality:OPEN [val] + overridden: + public abstract p: kotlin.Int + public abstract p: kotlin.Int + FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [final] + EXPRESSION_BODY + CONST Int type=kotlin.Int value=42 + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN <> ($this:.C) returnType:kotlin.Int + correspondingProperty: PROPERTY name:p visibility:public modality:OPEN [val] + overridden: + public abstract fun (): kotlin.Int declared in .I1 + public abstract fun (): kotlin.Int declared in .I2 + $this: VALUE_PARAMETER name: type:.C + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun (): kotlin.Int declared in .C' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .C declared in .C.' type=.C origin=null + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .I1 + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .I2 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .I1 + public open fun hashCode (): kotlin.Int declared in .I2 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in .I1 + public open fun toString (): kotlin.String declared in .I2 + $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.kt b/compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.kt new file mode 100644 index 00000000000..73a97cd493c --- /dev/null +++ b/compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.kt @@ -0,0 +1,24 @@ +// IGNORE_BACKEND_K2: ANY +// ^^^ In FIR, declaring the same `expect` and `actual` classes in one compiler module is not possible (see KT-55177). + +// !LANGUAGE: +MultiPlatformProjects + +interface I1 { + fun f(): String + val p: Int +} + +interface I2 { + fun f(): String + val p: Int +} + +expect class C() : I1, I2 { + override fun f(): String + override val p: Int +} + +actual class C : I1, I2 { + actual override fun f() = "OK" + actual override val p = 42 +} \ No newline at end of file diff --git a/compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.kt.txt b/compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.kt.txt new file mode 100644 index 00000000000..341a395fade --- /dev/null +++ b/compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.kt.txt @@ -0,0 +1,42 @@ +interface I1 { + abstract fun f(): String + + abstract val p: Int + abstract get + +} + +interface I2 { + abstract fun f(): String + + abstract val p: Int + abstract get + +} + +expect class C : I1, I2 { + expect constructor() /* primary */ + + expect override fun f(): String + + expect override val p: Int + override get + +} + +class C : I1, I2 { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + override fun f(): String { + return "OK" + } + + override val p: Int + field = 42 + override get + +} diff --git a/compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.sig.kt.txt b/compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.sig.kt.txt new file mode 100644 index 00000000000..9f371f0df2d --- /dev/null +++ b/compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.sig.kt.txt @@ -0,0 +1,135 @@ +// CHECK: +// Mangled name: C +// Public signature: /C|null[1] +expect class C : I1, I2 { + // CHECK: + // Mangled name: C{}p + // Public signature: /C.p|6715504260787941082[1] + // Public signature debug description: {}p + expect override val p: Int + // CHECK JS_IR NATIVE: + // Mangled name: C#(){} + // Public signature: /C.p.|-1162552463316289847[1] + // Public signature debug description: (){} + // CHECK JVM_IR: + // Mangled name: C#(){}kotlin.Int + // Public signature: /C.p.|5329635969197638839[1] + // Public signature debug description: (){}kotlin.Int + override get + + // CHECK: + // Mangled name: C#(){} + // Public signature: /C.|-5645683436151566731[1] + // Public signature debug description: (){} + expect constructor() /* primary */ + + // CHECK JS_IR NATIVE: + // Mangled name: C#f(){} + // Public signature: /C.f|5316533450599009716[1] + // Public signature debug description: f(){} + // CHECK JVM_IR: + // Mangled name: C#f(){}kotlin.String + // Public signature: /C.f|9098388873611041001[1] + // Public signature debug description: f(){}kotlin.String + expect override fun f(): String + +} + +// CHECK: +// Mangled name: C +// Public signature: /C|null[0] +class C : I1, I2 { + // CHECK: + // Mangled name: C{}p + // Public signature: /C.p|6715504260787941082[0] + // Public signature debug description: {}p + override val p: Int + // CHECK JS_IR NATIVE: + // Mangled name: C#(){} + // Public signature: /C.p.|-1162552463316289847[0] + // Public signature debug description: (){} + // CHECK JVM_IR: + // Mangled name: C#(){}kotlin.Int + // Public signature: /C.p.|5329635969197638839[0] + // Public signature debug description: (){}kotlin.Int + override get + + // CHECK: + // Mangled name: C#(){} + // Public signature: /C.|-5645683436151566731[0] + // Public signature debug description: (){} + constructor() /* primary */ + + // CHECK JS_IR NATIVE: + // Mangled name: C#f(){} + // Public signature: /C.f|5316533450599009716[0] + // Public signature debug description: f(){} + // CHECK JVM_IR: + // Mangled name: C#f(){}kotlin.String + // Public signature: /C.f|9098388873611041001[0] + // Public signature debug description: f(){}kotlin.String + override fun f(): String + +} + +// CHECK: +// Mangled name: I1 +// Public signature: /I1|null[0] +interface I1 { + // CHECK JS_IR NATIVE: + // Mangled name: I1#f(){} + // Public signature: /I1.f|5316533450599009716[0] + // Public signature debug description: f(){} + // CHECK JVM_IR: + // Mangled name: I1#f(){}kotlin.String + // Public signature: /I1.f|9098388873611041001[0] + // Public signature debug description: f(){}kotlin.String + abstract fun f(): String + + // CHECK: + // Mangled name: I1{}p + // Public signature: /I1.p|6715504260787941082[0] + // Public signature debug description: {}p + abstract val p: Int + // CHECK JS_IR NATIVE: + // Mangled name: I1#(){} + // Public signature: /I1.p.|-1162552463316289847[0] + // Public signature debug description: (){} + // CHECK JVM_IR: + // Mangled name: I1#(){}kotlin.Int + // Public signature: /I1.p.|5329635969197638839[0] + // Public signature debug description: (){}kotlin.Int + abstract get + +} + +// CHECK: +// Mangled name: I2 +// Public signature: /I2|null[0] +interface I2 { + // CHECK JS_IR NATIVE: + // Mangled name: I2#f(){} + // Public signature: /I2.f|5316533450599009716[0] + // Public signature debug description: f(){} + // CHECK JVM_IR: + // Mangled name: I2#f(){}kotlin.String + // Public signature: /I2.f|9098388873611041001[0] + // Public signature debug description: f(){}kotlin.String + abstract fun f(): String + + // CHECK: + // Mangled name: I2{}p + // Public signature: /I2.p|6715504260787941082[0] + // Public signature debug description: {}p + abstract val p: Int + // CHECK JS_IR NATIVE: + // Mangled name: I2#(){} + // Public signature: /I2.p.|-1162552463316289847[0] + // Public signature debug description: (){} + // CHECK JVM_IR: + // Mangled name: I2#(){}kotlin.Int + // Public signature: /I2.p.|5329635969197638839[0] + // Public signature debug description: (){}kotlin.Int + abstract get + +} diff --git a/compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.ir.txt b/compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.ir.txt new file mode 100644 index 00000000000..e3b1b4b33ee --- /dev/null +++ b/compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.ir.txt @@ -0,0 +1,52 @@ +FILE fqName: fileName:/common.kt +FILE fqName: fileName:/platform.kt + CLASS CLASS name:A modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A + CONSTRUCTOR visibility:protected <> () returnType:.A [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:ABSTRACT visibility:public superTypes:[kotlin.Any]' + FUN name:foo visibility:public modality:ABSTRACT <> ($this:.A) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.A + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS CLASS name:B modality:OPEN visibility:public superTypes:[.A] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.B + CONSTRUCTOR visibility:public <> (i:kotlin.Int) returnType:.B [primary] + VALUE_PARAMETER name:i index:0 type:kotlin.Int + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'protected constructor () declared in .A' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:OPEN visibility:public superTypes:[.A]' + FUN name:foo visibility:public modality:OPEN <> ($this:.B) returnType:kotlin.Unit + overridden: + public abstract fun foo (): kotlin.Unit declared in .A + $this: VALUE_PARAMETER name: type:.B + BLOCK_BODY + FUN name:bar visibility:public modality:OPEN <> ($this:.B, s:kotlin.String) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.B + VALUE_PARAMETER name:s index:0 type:kotlin.String + BLOCK_BODY + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .A + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .A + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in .A + $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt b/compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt new file mode 100644 index 00000000000..65f89f51720 --- /dev/null +++ b/compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt @@ -0,0 +1,29 @@ +// IGNORE_BACKEND_K1: ANY +// ^^^ K1 as well as K1-based test infra do not support "fragment refinement". + +// FIR_IDENTICAL +// !LANGUAGE: +MultiPlatformProjects + +// MODULE: common +// FILE: common.kt + +expect abstract class A protected constructor() { + abstract fun foo() +} + +expect open class B(i: Int): A { + override fun foo() + open fun bar(s: String) +} + +// MODULE: platform()()(common) +// FILE: platform.kt + +actual abstract class A protected actual constructor() { + actual abstract fun foo() +} + +actual open class B actual constructor(i: Int): A() { + actual override fun foo() {} + actual open fun bar(s: String) {} +} diff --git a/compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt.txt b/compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt.txt new file mode 100644 index 00000000000..a45d11a4822 --- /dev/null +++ b/compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt.txt @@ -0,0 +1,29 @@ +// FILE: common.kt + +// FILE: platform.kt + +abstract class A { + protected constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + abstract fun foo() + +} + +open class B : A { + constructor(i: Int) /* primary */ { + super/*A*/() + /* () */ + + } + + override fun foo() { + } + + open fun bar(s: String) { + } + +} diff --git a/compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.sig.kt.txt b/compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.sig.kt.txt new file mode 100644 index 00000000000..dcb2bd64781 --- /dev/null +++ b/compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.sig.kt.txt @@ -0,0 +1,45 @@ +// FILE: common.kt + +// FILE: platform.kt + +// CHECK: +// Mangled name: A +// Public signature: /A|null[0] +abstract class A { + // CHECK: + // Mangled name: A#(){} + // Public signature: /A.|-5645683436151566731[0] + // Public signature debug description: (){} + protected constructor() /* primary */ + + // CHECK: + // Mangled name: A#foo(){} + // Public signature: /A.foo|-1041209573719867811[0] + // Public signature debug description: foo(){} + abstract fun foo(): Unit + +} + +// CHECK: +// Mangled name: B +// Public signature: /B|null[0] +open class B : A { + // CHECK: + // Mangled name: B#(kotlin.Int){} + // Public signature: /B.|-5182794243525578284[0] + // Public signature debug description: (kotlin.Int){} + constructor(i: Int) /* primary */ + + // CHECK: + // Mangled name: B#bar(kotlin.String){} + // Public signature: /B.bar|5132770888056479978[0] + // Public signature debug description: bar(kotlin.String){} + open fun bar(s: String): Unit + + // CHECK: + // Mangled name: B#foo(){} + // Public signature: /B.foo|-1041209573719867811[0] + // Public signature debug description: foo(){} + override fun foo(): Unit + +} diff --git a/compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.ir.txt b/compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.ir.txt new file mode 100644 index 00000000000..ca63858c2a8 --- /dev/null +++ b/compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.ir.txt @@ -0,0 +1,42 @@ +FILE fqName: fileName:/common.kt +FILE fqName: fileName:/platform.kt + CLASS CLASS name:Ops modality:SEALED visibility:public superTypes:[kotlin.Any] + sealedSubclasses: + CLASS CLASS name:Add modality:FINAL visibility:public superTypes:[.Ops] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Ops + CONSTRUCTOR visibility:protected <> () returnType:.Ops [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Ops modality:SEALED visibility:public superTypes:[kotlin.Any]' + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS CLASS name:Add modality:FINAL visibility:public superTypes:[.Ops] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Add + CONSTRUCTOR visibility:public <> () returnType:.Add [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'protected constructor () declared in .Ops' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Add modality:FINAL visibility:public superTypes:[.Ops]' + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Ops + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .Ops + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in .Ops + $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.kt b/compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.kt new file mode 100644 index 00000000000..130e00858e6 --- /dev/null +++ b/compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.kt @@ -0,0 +1,18 @@ +// IGNORE_BACKEND_K1: ANY +// ^^^ K1 as well as K1-based test infra do not support "fragment refinement". + +// FIR_IDENTICAL +// !LANGUAGE: +MultiPlatformProjects +// SKIP_KLIB_TEST + +// MODULE: common +// FILE: common.kt + +expect sealed class Ops() +expect class Add() : Ops + +// MODULE: platform()()(common) +// FILE: platform.kt + +actual sealed class Ops actual constructor() +actual class Add actual constructor() : Ops() diff --git a/compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.kt.txt b/compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.kt.txt new file mode 100644 index 00000000000..6fc0573b7ef --- /dev/null +++ b/compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.kt.txt @@ -0,0 +1,21 @@ +// FILE: common.kt + +// FILE: platform.kt + +sealed class Ops { + protected constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + +} + +class Add : Ops { + constructor() /* primary */ { + super/*Ops*/() + /* () */ + + } + +} diff --git a/compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.sig.kt.txt b/compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.sig.kt.txt new file mode 100644 index 00000000000..5c8b841d5e4 --- /dev/null +++ b/compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.sig.kt.txt @@ -0,0 +1,27 @@ +// FILE: common.kt + +// FILE: platform.kt + +// CHECK: +// Mangled name: Add +// Public signature: /Add|null[0] +class Add : Ops { + // CHECK: + // Mangled name: Add#(){} + // Public signature: /Add.|-5645683436151566731[0] + // Public signature debug description: (){} + constructor() /* primary */ + +} + +// CHECK: +// Mangled name: Ops +// Public signature: /Ops|null[0] +sealed class Ops { + // CHECK: + // Mangled name: Ops#(){} + // Public signature: /Ops.|-5645683436151566731[0] + // Public signature debug description: (){} + protected constructor() /* primary */ + +} diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java index 183e1cbd1b0..88e8c0df791 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java @@ -1031,46 +1031,84 @@ public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } - @Test - @TestMetadata("K1_expectClassInherited.kt") - public void testK1_expectClassInherited() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectClassInherited.kt"); + @Nested + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k1") + @TestDataPath("$PROJECT_ROOT") + public class K1 { + @Test + public void testAllFilesPresentInK1() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k1"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectClassInherited.kt"); + } + + @Test + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.kt"); + } + + @Test + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectMemberInNotExpectClass.kt"); + } + + @Test + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedEnumClass.kt"); + } + + @Test + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedSealedClass.kt"); + } } - @Test - @TestMetadata("K1_expectMemberInNotExpectClass.kt") - public void testK1_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectMemberInNotExpectClass.kt"); - } + @Nested + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + public class K2 { + @Test + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } - @Test - @TestMetadata("K1_expectedEnumClass.kt") - public void testK1_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedEnumClass.kt"); - } + @Test + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt"); + } - @Test - @TestMetadata("K1_expectedSealedClass.kt") - public void testK1_expectedSealedClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedSealedClass.kt"); - } + @Test + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectIntersectionOverride.kt"); + } - @Test - @TestMetadata("K2_expectIntersectionOverride.kt") - public void testK2_expectIntersectionOverride() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectIntersectionOverride.kt"); - } + @Test + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectMemberInNotExpectClass.kt"); + } - @Test - @TestMetadata("K2_expectMemberInNotExpectClass.kt") - public void testK2_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectMemberInNotExpectClass.kt"); - } + @Test + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedEnumClass.kt"); + } - @Test - @TestMetadata("K2_expectedEnumClass.kt") - public void testK2_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectedEnumClass.kt"); + @Test + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.kt"); + } } } diff --git a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java index dc2f4fe9c5f..6bd24dd9a4f 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java @@ -835,39 +835,80 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } - @TestMetadata("K1_expectClassInherited.kt") - public void testK1_expectClassInherited() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectClassInherited.kt"); + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class K1 extends AbstractKlibIrTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); + } + + public void testAllFilesPresentInK1() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k1"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectClassInherited.kt"); + } + + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.kt"); + } + + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectMemberInNotExpectClass.kt"); + } + + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedEnumClass.kt"); + } + + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedSealedClass.kt"); + } } - @TestMetadata("K1_expectMemberInNotExpectClass.kt") - public void testK1_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectMemberInNotExpectClass.kt"); - } + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class K2 extends AbstractKlibIrTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JS_IR, testDataFilePath, "// IGNORE_BACKEND_KLIB: "); + } - @TestMetadata("K1_expectedEnumClass.kt") - public void testK1_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedEnumClass.kt"); - } + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } - @TestMetadata("K1_expectedSealedClass.kt") - public void testK1_expectedSealedClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedSealedClass.kt"); - } + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt"); + } - @TestMetadata("K2_expectIntersectionOverride.kt") - public void testK2_expectIntersectionOverride() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectIntersectionOverride.kt"); - } + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectIntersectionOverride.kt"); + } - @TestMetadata("K2_expectMemberInNotExpectClass.kt") - public void testK2_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectMemberInNotExpectClass.kt"); - } + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectMemberInNotExpectClass.kt"); + } - @TestMetadata("K2_expectedEnumClass.kt") - public void testK2_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectedEnumClass.kt"); + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedEnumClass.kt"); + } + + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.kt"); + } } } diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java index 272fbd89a5f..4c5529ed5c1 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java @@ -941,46 +941,84 @@ public class FirLightTreeJsIrTextTestGenerated extends AbstractFirLightTreeJsIrT KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } - @Test - @TestMetadata("K1_expectClassInherited.kt") - public void testK1_expectClassInherited() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectClassInherited.kt"); + @Nested + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k1") + @TestDataPath("$PROJECT_ROOT") + public class K1 { + @Test + public void testAllFilesPresentInK1() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k1"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @Test + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectClassInherited.kt"); + } + + @Test + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.kt"); + } + + @Test + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectMemberInNotExpectClass.kt"); + } + + @Test + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedEnumClass.kt"); + } + + @Test + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedSealedClass.kt"); + } } - @Test - @TestMetadata("K1_expectMemberInNotExpectClass.kt") - public void testK1_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectMemberInNotExpectClass.kt"); - } + @Nested + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + public class K2 { + @Test + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } - @Test - @TestMetadata("K1_expectedEnumClass.kt") - public void testK1_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedEnumClass.kt"); - } + @Test + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt"); + } - @Test - @TestMetadata("K1_expectedSealedClass.kt") - public void testK1_expectedSealedClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedSealedClass.kt"); - } + @Test + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectIntersectionOverride.kt"); + } - @Test - @TestMetadata("K2_expectIntersectionOverride.kt") - public void testK2_expectIntersectionOverride() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectIntersectionOverride.kt"); - } + @Test + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectMemberInNotExpectClass.kt"); + } - @Test - @TestMetadata("K2_expectMemberInNotExpectClass.kt") - public void testK2_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectMemberInNotExpectClass.kt"); - } + @Test + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedEnumClass.kt"); + } - @Test - @TestMetadata("K2_expectedEnumClass.kt") - public void testK2_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectedEnumClass.kt"); + @Test + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.kt"); + } } } diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java index f70b4c59370..717007e50cc 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java @@ -941,46 +941,84 @@ public class FirPsiJsIrTextTestGenerated extends AbstractFirPsiJsIrTextTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } - @Test - @TestMetadata("K1_expectClassInherited.kt") - public void testK1_expectClassInherited() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectClassInherited.kt"); + @Nested + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k1") + @TestDataPath("$PROJECT_ROOT") + public class K1 { + @Test + public void testAllFilesPresentInK1() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k1"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @Test + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectClassInherited.kt"); + } + + @Test + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.kt"); + } + + @Test + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectMemberInNotExpectClass.kt"); + } + + @Test + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedEnumClass.kt"); + } + + @Test + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedSealedClass.kt"); + } } - @Test - @TestMetadata("K1_expectMemberInNotExpectClass.kt") - public void testK1_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectMemberInNotExpectClass.kt"); - } + @Nested + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + public class K2 { + @Test + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } - @Test - @TestMetadata("K1_expectedEnumClass.kt") - public void testK1_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedEnumClass.kt"); - } + @Test + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt"); + } - @Test - @TestMetadata("K1_expectedSealedClass.kt") - public void testK1_expectedSealedClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedSealedClass.kt"); - } + @Test + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectIntersectionOverride.kt"); + } - @Test - @TestMetadata("K2_expectIntersectionOverride.kt") - public void testK2_expectIntersectionOverride() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectIntersectionOverride.kt"); - } + @Test + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectMemberInNotExpectClass.kt"); + } - @Test - @TestMetadata("K2_expectMemberInNotExpectClass.kt") - public void testK2_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectMemberInNotExpectClass.kt"); - } + @Test + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedEnumClass.kt"); + } - @Test - @TestMetadata("K2_expectedEnumClass.kt") - public void testK2_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectedEnumClass.kt"); + @Test + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.kt"); + } } } diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java index c2c4be95f65..4f913bc04a4 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java @@ -941,46 +941,84 @@ public class ClassicJsIrTextTestGenerated extends AbstractClassicJsIrTextTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } - @Test - @TestMetadata("K1_expectClassInherited.kt") - public void testK1_expectClassInherited() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectClassInherited.kt"); + @Nested + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k1") + @TestDataPath("$PROJECT_ROOT") + public class K1 { + @Test + public void testAllFilesPresentInK1() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k1"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @Test + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectClassInherited.kt"); + } + + @Test + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.kt"); + } + + @Test + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectMemberInNotExpectClass.kt"); + } + + @Test + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedEnumClass.kt"); + } + + @Test + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedSealedClass.kt"); + } } - @Test - @TestMetadata("K1_expectMemberInNotExpectClass.kt") - public void testK1_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectMemberInNotExpectClass.kt"); - } + @Nested + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + public class K2 { + @Test + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } - @Test - @TestMetadata("K1_expectedEnumClass.kt") - public void testK1_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedEnumClass.kt"); - } + @Test + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt"); + } - @Test - @TestMetadata("K1_expectedSealedClass.kt") - public void testK1_expectedSealedClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedSealedClass.kt"); - } + @Test + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectIntersectionOverride.kt"); + } - @Test - @TestMetadata("K2_expectIntersectionOverride.kt") - public void testK2_expectIntersectionOverride() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectIntersectionOverride.kt"); - } + @Test + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectMemberInNotExpectClass.kt"); + } - @Test - @TestMetadata("K2_expectMemberInNotExpectClass.kt") - public void testK2_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectMemberInNotExpectClass.kt"); - } + @Test + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedEnumClass.kt"); + } - @Test - @TestMetadata("K2_expectedEnumClass.kt") - public void testK2_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectedEnumClass.kt"); + @Test + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.kt"); + } } } diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/ClassicNativeIrTextTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/ClassicNativeIrTextTestGenerated.java index e998d0fea59..664e0fdeee5 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/ClassicNativeIrTextTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/ClassicNativeIrTextTestGenerated.java @@ -941,46 +941,84 @@ public class ClassicNativeIrTextTestGenerated extends AbstractClassicNativeIrTex KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } - @Test - @TestMetadata("K1_expectClassInherited.kt") - public void testK1_expectClassInherited() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectClassInherited.kt"); + @Nested + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k1") + @TestDataPath("$PROJECT_ROOT") + public class K1 { + @Test + public void testAllFilesPresentInK1() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k1"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectClassInherited.kt"); + } + + @Test + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.kt"); + } + + @Test + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectMemberInNotExpectClass.kt"); + } + + @Test + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedEnumClass.kt"); + } + + @Test + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedSealedClass.kt"); + } } - @Test - @TestMetadata("K1_expectMemberInNotExpectClass.kt") - public void testK1_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectMemberInNotExpectClass.kt"); - } + @Nested + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + public class K2 { + @Test + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } - @Test - @TestMetadata("K1_expectedEnumClass.kt") - public void testK1_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedEnumClass.kt"); - } + @Test + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt"); + } - @Test - @TestMetadata("K1_expectedSealedClass.kt") - public void testK1_expectedSealedClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedSealedClass.kt"); - } + @Test + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectIntersectionOverride.kt"); + } - @Test - @TestMetadata("K2_expectIntersectionOverride.kt") - public void testK2_expectIntersectionOverride() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectIntersectionOverride.kt"); - } + @Test + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectMemberInNotExpectClass.kt"); + } - @Test - @TestMetadata("K2_expectMemberInNotExpectClass.kt") - public void testK2_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectMemberInNotExpectClass.kt"); - } + @Test + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedEnumClass.kt"); + } - @Test - @TestMetadata("K2_expectedEnumClass.kt") - public void testK2_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectedEnumClass.kt"); + @Test + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.kt"); + } } } diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirLightTreeNativeIrTextTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirLightTreeNativeIrTextTestGenerated.java index 86192cf6c8f..65585be64ae 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirLightTreeNativeIrTextTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirLightTreeNativeIrTextTestGenerated.java @@ -941,46 +941,84 @@ public class FirLightTreeNativeIrTextTestGenerated extends AbstractFirLightTreeN KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } - @Test - @TestMetadata("K1_expectClassInherited.kt") - public void testK1_expectClassInherited() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectClassInherited.kt"); + @Nested + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k1") + @TestDataPath("$PROJECT_ROOT") + public class K1 { + @Test + public void testAllFilesPresentInK1() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k1"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectClassInherited.kt"); + } + + @Test + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.kt"); + } + + @Test + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectMemberInNotExpectClass.kt"); + } + + @Test + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedEnumClass.kt"); + } + + @Test + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedSealedClass.kt"); + } } - @Test - @TestMetadata("K1_expectMemberInNotExpectClass.kt") - public void testK1_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectMemberInNotExpectClass.kt"); - } + @Nested + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + public class K2 { + @Test + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } - @Test - @TestMetadata("K1_expectedEnumClass.kt") - public void testK1_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedEnumClass.kt"); - } + @Test + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt"); + } - @Test - @TestMetadata("K1_expectedSealedClass.kt") - public void testK1_expectedSealedClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedSealedClass.kt"); - } + @Test + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectIntersectionOverride.kt"); + } - @Test - @TestMetadata("K2_expectIntersectionOverride.kt") - public void testK2_expectIntersectionOverride() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectIntersectionOverride.kt"); - } + @Test + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectMemberInNotExpectClass.kt"); + } - @Test - @TestMetadata("K2_expectMemberInNotExpectClass.kt") - public void testK2_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectMemberInNotExpectClass.kt"); - } + @Test + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedEnumClass.kt"); + } - @Test - @TestMetadata("K2_expectedEnumClass.kt") - public void testK2_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectedEnumClass.kt"); + @Test + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.kt"); + } } } diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirPsiNativeIrTextTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirPsiNativeIrTextTestGenerated.java index 9475a09f231..a9c737389f8 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirPsiNativeIrTextTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirPsiNativeIrTextTestGenerated.java @@ -941,46 +941,84 @@ public class FirPsiNativeIrTextTestGenerated extends AbstractFirPsiNativeIrTextT KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } - @Test - @TestMetadata("K1_expectClassInherited.kt") - public void testK1_expectClassInherited() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectClassInherited.kt"); + @Nested + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k1") + @TestDataPath("$PROJECT_ROOT") + public class K1 { + @Test + public void testAllFilesPresentInK1() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k1"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectClassInherited.kt"); + } + + @Test + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectIntersectionOverride.kt"); + } + + @Test + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectMemberInNotExpectClass.kt"); + } + + @Test + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedEnumClass.kt"); + } + + @Test + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedSealedClass.kt"); + } } - @Test - @TestMetadata("K1_expectMemberInNotExpectClass.kt") - public void testK1_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectMemberInNotExpectClass.kt"); - } + @Nested + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform/k2") + @TestDataPath("$PROJECT_ROOT") + public class K2 { + @Test + public void testAllFilesPresentInK2() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } - @Test - @TestMetadata("K1_expectedEnumClass.kt") - public void testK1_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedEnumClass.kt"); - } + @Test + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt"); + } - @Test - @TestMetadata("K1_expectedSealedClass.kt") - public void testK1_expectedSealedClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K1_expectedSealedClass.kt"); - } + @Test + @TestMetadata("expectIntersectionOverride.kt") + public void testExpectIntersectionOverride() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectIntersectionOverride.kt"); + } - @Test - @TestMetadata("K2_expectIntersectionOverride.kt") - public void testK2_expectIntersectionOverride() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectIntersectionOverride.kt"); - } + @Test + @TestMetadata("expectMemberInNotExpectClass.kt") + public void testExpectMemberInNotExpectClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectMemberInNotExpectClass.kt"); + } - @Test - @TestMetadata("K2_expectMemberInNotExpectClass.kt") - public void testK2_expectMemberInNotExpectClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectMemberInNotExpectClass.kt"); - } + @Test + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedEnumClass.kt"); + } - @Test - @TestMetadata("K2_expectedEnumClass.kt") - public void testK2_expectedEnumClass() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/K2_expectedEnumClass.kt"); + @Test + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectedSealedClass.kt"); + } } }