From b5d8db0267cc6dc41e3a1d050a52f659b4ed4010 Mon Sep 17 00:00:00 2001 From: Dmitriy Dolovov Date: Tue, 12 Dec 2023 11:48:45 +0100 Subject: [PATCH] [test] Exclude "K1-only" from FIR IR text tests and "K2-only" from Classic IR text tests ^KT-60390 --- .../FirLightTreeJvmIrTextTestGenerated.java | 46 ++----------------- .../ir/FirPsiJvmIrTextTestGenerated.java | 46 ++----------------- .../ir/ClassicJvmIrTextTestGenerated.java | 46 ++----------------- .../generators/GenerateJUnit5CompilerTests.kt | 15 ++++-- .../generators/tests/GenerateJsTests.kt | 15 ++++-- .../FirLightTreeJsIrTextTestGenerated.java | 46 ++----------------- .../test/fir/FirPsiJsIrTextTestGenerated.java | 46 ++----------------- .../test/ir/ClassicJsIrTextTestGenerated.java | 46 ++----------------- .../ClassicNativeIrTextTestGenerated.java | 46 ++----------------- ...FirLightTreeNativeIrTextTestGenerated.java | 46 ++----------------- .../FirPsiNativeIrTextTestGenerated.java | 46 ++----------------- .../generators/tests/GenerateNativeTests.kt | 15 ++++-- 12 files changed, 63 insertions(+), 396 deletions(-) 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 f3340134f2c..f8c628fb6a9 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 @@ -22,7 +22,7 @@ import java.util.regex.Pattern; public class FirLightTreeJvmIrTextTestGenerated extends AbstractFirLightTreeJvmIrTextTest { @Test public void testAllFilesPresentInIrText() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true, "declarations/multiplatform/k1"); } @Nested @@ -411,7 +411,7 @@ public class FirLightTreeJvmIrTextTestGenerated extends AbstractFirLightTreeJvmI public class Declarations { @Test public void testAllFilesPresentInDeclarations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true, "multiplatform/k1"); } @Test @@ -1028,47 +1028,7 @@ public class FirLightTreeJvmIrTextTestGenerated extends AbstractFirLightTreeJvmI public class Multiplatform { @Test public void testAllFilesPresentInMultiplatform() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @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"); - } + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true, "k1"); } @Nested 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 fdb450bcfff..310dc56a911 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 @@ -22,7 +22,7 @@ import java.util.regex.Pattern; public class FirPsiJvmIrTextTestGenerated extends AbstractFirPsiJvmIrTextTest { @Test public void testAllFilesPresentInIrText() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true, "declarations/multiplatform/k1"); } @Nested @@ -411,7 +411,7 @@ public class FirPsiJvmIrTextTestGenerated extends AbstractFirPsiJvmIrTextTest { public class Declarations { @Test public void testAllFilesPresentInDeclarations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true, "multiplatform/k1"); } @Test @@ -1028,47 +1028,7 @@ public class FirPsiJvmIrTextTestGenerated extends AbstractFirPsiJvmIrTextTest { public class Multiplatform { @Test public void testAllFilesPresentInMultiplatform() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @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"); - } + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true, "k1"); } @Nested 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 88e8c0df791..825ae3fd6c9 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 @@ -22,7 +22,7 @@ import java.util.regex.Pattern; public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest { @Test public void testAllFilesPresentInIrText() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true, "declarations/multiplatform/k2"); } @Nested @@ -411,7 +411,7 @@ public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest public class Declarations { @Test public void testAllFilesPresentInDeclarations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true, "multiplatform/k2"); } @Test @@ -1028,7 +1028,7 @@ public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest public class Multiplatform { @Test public void testAllFilesPresentInMultiplatform() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true, "k2"); } @Nested @@ -1070,46 +1070,6 @@ public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedSealedClass.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("expectClassInherited.kt") - public void testExpectClassInherited() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt"); - } - - @Test - @TestMetadata("expectIntersectionOverride.kt") - public void testExpectIntersectionOverride() 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("expectedEnumClass.kt") - public void testExpectedEnumClass() 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"); - } - } } @Nested diff --git a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt index c1221daef03..44b67527043 100644 --- a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt +++ b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt @@ -124,7 +124,10 @@ fun generateJUnit5CompilerTests(args: Array, mainClassName: String?) { } testClass { - model("ir/irText") + model( + "ir/irText", + excludeDirs = listOf("declarations/multiplatform/k2") + ) } testClass { @@ -376,11 +379,17 @@ fun generateJUnit5CompilerTests(args: Array, mainClassName: String?) { testGroup(testsRoot = "compiler/fir/fir2ir/tests-gen", testDataRoot = "compiler/testData") { testClass { - model("ir/irText") + model( + "ir/irText", + excludeDirs = listOf("declarations/multiplatform/k1") + ) } testClass { - model("ir/irText") + model( + "ir/irText", + excludeDirs = listOf("declarations/multiplatform/k1") + ) } testClass { diff --git a/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt b/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt index 8f770c23ca2..d616ee388af 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt @@ -232,15 +232,24 @@ fun main(args: Array) { } testClass { - model("ir/irText") + model( + "ir/irText", + excludeDirs = listOf("declarations/multiplatform/k2") + ) } testClass { - model("ir/irText") + model( + "ir/irText", + excludeDirs = listOf("declarations/multiplatform/k1") + ) } testClass { - model("ir/irText") + model( + "ir/irText", + excludeDirs = listOf("declarations/multiplatform/k1") + ) } testClass { 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 4c5529ed5c1..0b59e556bcb 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 @@ -22,7 +22,7 @@ import java.util.regex.Pattern; public class FirLightTreeJsIrTextTestGenerated extends AbstractFirLightTreeJsIrTextTest { @Test public void testAllFilesPresentInIrText() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true, "declarations/multiplatform/k1"); } @Nested @@ -363,7 +363,7 @@ public class FirLightTreeJsIrTextTestGenerated extends AbstractFirLightTreeJsIrT public class Declarations { @Test public void testAllFilesPresentInDeclarations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true, "multiplatform/k1"); } @Test @@ -938,47 +938,7 @@ public class FirLightTreeJsIrTextTestGenerated extends AbstractFirLightTreeJsIrT public class Multiplatform { @Test public void testAllFilesPresentInMultiplatform() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); - } - - @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"); - } + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true, "k1"); } @Nested 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 717007e50cc..db8e6ec075b 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 @@ -22,7 +22,7 @@ import java.util.regex.Pattern; public class FirPsiJsIrTextTestGenerated extends AbstractFirPsiJsIrTextTest { @Test public void testAllFilesPresentInIrText() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true, "declarations/multiplatform/k1"); } @Nested @@ -363,7 +363,7 @@ public class FirPsiJsIrTextTestGenerated extends AbstractFirPsiJsIrTextTest { public class Declarations { @Test public void testAllFilesPresentInDeclarations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true, "multiplatform/k1"); } @Test @@ -938,47 +938,7 @@ public class FirPsiJsIrTextTestGenerated extends AbstractFirPsiJsIrTextTest { public class Multiplatform { @Test public void testAllFilesPresentInMultiplatform() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); - } - - @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"); - } + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true, "k1"); } @Nested 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 4f913bc04a4..eeee6ae6a77 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 @@ -22,7 +22,7 @@ import java.util.regex.Pattern; public class ClassicJsIrTextTestGenerated extends AbstractClassicJsIrTextTest { @Test public void testAllFilesPresentInIrText() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true, "declarations/multiplatform/k2"); } @Nested @@ -363,7 +363,7 @@ public class ClassicJsIrTextTestGenerated extends AbstractClassicJsIrTextTest { public class Declarations { @Test public void testAllFilesPresentInDeclarations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true, "multiplatform/k2"); } @Test @@ -938,7 +938,7 @@ public class ClassicJsIrTextTestGenerated extends AbstractClassicJsIrTextTest { public class Multiplatform { @Test public void testAllFilesPresentInMultiplatform() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true, "k2"); } @Nested @@ -980,46 +980,6 @@ public class ClassicJsIrTextTestGenerated extends AbstractClassicJsIrTextTest { runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedSealedClass.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("expectClassInherited.kt") - public void testExpectClassInherited() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt"); - } - - @Test - @TestMetadata("expectIntersectionOverride.kt") - public void testExpectIntersectionOverride() 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("expectedEnumClass.kt") - public void testExpectedEnumClass() 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"); - } - } } @Nested 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 664e0fdeee5..5bf4b310a08 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 @@ -22,7 +22,7 @@ import java.util.regex.Pattern; public class ClassicNativeIrTextTestGenerated extends AbstractClassicNativeIrTextTest { @Test public void testAllFilesPresentInIrText() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true, "declarations/multiplatform/k2"); } @Nested @@ -363,7 +363,7 @@ public class ClassicNativeIrTextTestGenerated extends AbstractClassicNativeIrTex public class Declarations { @Test public void testAllFilesPresentInDeclarations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true, "multiplatform/k2"); } @Test @@ -938,7 +938,7 @@ public class ClassicNativeIrTextTestGenerated extends AbstractClassicNativeIrTex public class Multiplatform { @Test public void testAllFilesPresentInMultiplatform() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true, "k2"); } @Nested @@ -980,46 +980,6 @@ public class ClassicNativeIrTextTestGenerated extends AbstractClassicNativeIrTex runTest("compiler/testData/ir/irText/declarations/multiplatform/k1/expectedSealedClass.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("expectClassInherited.kt") - public void testExpectClassInherited() throws Exception { - runTest("compiler/testData/ir/irText/declarations/multiplatform/k2/expectClassInherited.kt"); - } - - @Test - @TestMetadata("expectIntersectionOverride.kt") - public void testExpectIntersectionOverride() 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("expectedEnumClass.kt") - public void testExpectedEnumClass() 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"); - } - } } @Nested 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 65585be64ae..2c0cdd5fb36 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 @@ -22,7 +22,7 @@ import java.util.regex.Pattern; public class FirLightTreeNativeIrTextTestGenerated extends AbstractFirLightTreeNativeIrTextTest { @Test public void testAllFilesPresentInIrText() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true, "declarations/multiplatform/k1"); } @Nested @@ -363,7 +363,7 @@ public class FirLightTreeNativeIrTextTestGenerated extends AbstractFirLightTreeN public class Declarations { @Test public void testAllFilesPresentInDeclarations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true, "multiplatform/k1"); } @Test @@ -938,47 +938,7 @@ public class FirLightTreeNativeIrTextTestGenerated extends AbstractFirLightTreeN public class Multiplatform { @Test public void testAllFilesPresentInMultiplatform() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); - } - - @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"); - } + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true, "k1"); } @Nested 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 a9c737389f8..a4d0938c1d0 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 @@ -22,7 +22,7 @@ import java.util.regex.Pattern; public class FirPsiNativeIrTextTestGenerated extends AbstractFirPsiNativeIrTextTest { @Test public void testAllFilesPresentInIrText() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true, "declarations/multiplatform/k1"); } @Nested @@ -363,7 +363,7 @@ public class FirPsiNativeIrTextTestGenerated extends AbstractFirPsiNativeIrTextT public class Declarations { @Test public void testAllFilesPresentInDeclarations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true, "multiplatform/k1"); } @Test @@ -938,47 +938,7 @@ public class FirPsiNativeIrTextTestGenerated extends AbstractFirPsiNativeIrTextT public class Multiplatform { @Test public void testAllFilesPresentInMultiplatform() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); - } - - @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"); - } + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true, "k1"); } @Nested diff --git a/native/native.tests/tests/org/jetbrains/kotlin/generators/tests/GenerateNativeTests.kt b/native/native.tests/tests/org/jetbrains/kotlin/generators/tests/GenerateNativeTests.kt index e5e33082f7c..b64ba746151 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/generators/tests/GenerateNativeTests.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/generators/tests/GenerateNativeTests.kt @@ -71,13 +71,22 @@ fun main() { model("codegen/boxInline", targetBackend = TargetBackend.NATIVE) } testClass { - model("ir/irText") + model( + "ir/irText", + excludeDirs = listOf("declarations/multiplatform/k2") + ) } testClass { - model("ir/irText") + model( + "ir/irText", + excludeDirs = listOf("declarations/multiplatform/k1") + ) } testClass { - model("ir/irText") + model( + "ir/irText", + excludeDirs = listOf("declarations/multiplatform/k1") + ) } }