From 285ccf7583814cbe5dc6ebd7ff41638ed6bce117 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Tue, 29 Dec 2020 11:04:55 +0300 Subject: [PATCH] [Test] Don't generate JVM BB tests for expect-actual linker This feature is supported only on JS backend so those tests on JVM are meaningless. Also those tests had passed on jvm because of old codegen tests didn't use `MODULE` directive and analyze all files in tests in single module --- .../ir/FirBlackBoxCodegenTestGenerated.java | 15 --------------- .../multiplatform/multiModule/expectActualLink.kt | 3 +++ .../multiModule/expectActualMemberLink.kt | 3 +++ .../multiModule/expectActualTypealiasLink.kt | 3 +++ .../codegen/BlackBoxCodegenTestGenerated.java | 15 --------------- .../codegen/LightAnalysisModeTestGenerated.java | 15 --------------- .../ir/IrBlackBoxCodegenTestGenerated.java | 15 --------------- 7 files changed, 9 insertions(+), 60 deletions(-) diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java index 0a15602d41b..1fd264c3f95 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java @@ -19477,21 +19477,6 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } - - @TestMetadata("expectActualLink.kt") - public void testExpectActualLink() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualLink.kt"); - } - - @TestMetadata("expectActualMemberLink.kt") - public void testExpectActualMemberLink() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualMemberLink.kt"); - } - - @TestMetadata("expectActualTypealiasLink.kt") - public void testExpectActualTypealiasLink() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualTypealiasLink.kt"); - } } } diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/expectActualLink.kt b/compiler/testData/codegen/box/multiplatform/multiModule/expectActualLink.kt index 984c23fec55..16dc586ab92 100644 --- a/compiler/testData/codegen/box/multiplatform/multiModule/expectActualLink.kt +++ b/compiler/testData/codegen/box/multiplatform/multiModule/expectActualLink.kt @@ -2,6 +2,9 @@ // KJS_WITH_FULL_RUNTIME // EXPECT_ACTUAL_LINKER // IGNORE_BACKEND: JS +// DONT_TARGET_EXACT_BACKEND: JVM +// DONT_TARGET_EXACT_BACKEND: JVM_IR +// DONT_TARGET_EXACT_BACKEND: ANDROID // MODULE: A // FILE: a.kt diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/expectActualMemberLink.kt b/compiler/testData/codegen/box/multiplatform/multiModule/expectActualMemberLink.kt index ee5a708a6c5..cbc27779b52 100644 --- a/compiler/testData/codegen/box/multiplatform/multiModule/expectActualMemberLink.kt +++ b/compiler/testData/codegen/box/multiplatform/multiModule/expectActualMemberLink.kt @@ -2,6 +2,9 @@ // KJS_WITH_FULL_RUNTIME // EXPECT_ACTUAL_LINKER // IGNORE_BACKEND: JS +// DONT_TARGET_EXACT_BACKEND: JVM +// DONT_TARGET_EXACT_BACKEND: JVM_IR +// DONT_TARGET_EXACT_BACKEND: ANDROID // MODULE: A // FILE: a.kt diff --git a/compiler/testData/codegen/box/multiplatform/multiModule/expectActualTypealiasLink.kt b/compiler/testData/codegen/box/multiplatform/multiModule/expectActualTypealiasLink.kt index 4592bc2236a..16dfd63e691 100644 --- a/compiler/testData/codegen/box/multiplatform/multiModule/expectActualTypealiasLink.kt +++ b/compiler/testData/codegen/box/multiplatform/multiModule/expectActualTypealiasLink.kt @@ -4,6 +4,9 @@ // IGNORE_BACKEND: JS // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS_IR_ES6 +// DONT_TARGET_EXACT_BACKEND: JVM +// DONT_TARGET_EXACT_BACKEND: JVM_IR +// DONT_TARGET_EXACT_BACKEND: ANDROID // MODULE: A // FILE: a.kt diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index a5714bb15d7..e3caac2eef8 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -19477,21 +19477,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } - - @TestMetadata("expectActualLink.kt") - public void testExpectActualLink() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualLink.kt"); - } - - @TestMetadata("expectActualMemberLink.kt") - public void testExpectActualMemberLink() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualMemberLink.kt"); - } - - @TestMetadata("expectActualTypealiasLink.kt") - public void testExpectActualTypealiasLink() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualTypealiasLink.kt"); - } } } diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 63fdedf93e3..b554753369c 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -19477,21 +19477,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } - - @TestMetadata("expectActualLink.kt") - public void testExpectActualLink() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualLink.kt"); - } - - @TestMetadata("expectActualMemberLink.kt") - public void testExpectActualMemberLink() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualMemberLink.kt"); - } - - @TestMetadata("expectActualTypealiasLink.kt") - public void testExpectActualTypealiasLink() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualTypealiasLink.kt"); - } } } diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index 52df58a5186..9b602027860 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -19477,21 +19477,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } - - @TestMetadata("expectActualLink.kt") - public void testExpectActualLink() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualLink.kt"); - } - - @TestMetadata("expectActualMemberLink.kt") - public void testExpectActualMemberLink() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualMemberLink.kt"); - } - - @TestMetadata("expectActualTypealiasLink.kt") - public void testExpectActualTypealiasLink() throws Exception { - runTest("compiler/testData/codegen/box/multiplatform/multiModule/expectActualTypealiasLink.kt"); - } } }