From e08df2c53059c0efd7d8f776eee9d0c16d44f817 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Thu, 13 May 2021 15:23:12 +0300 Subject: [PATCH] [Test] Add diagnostics and codegen tests with hmpp module structure --- ...irOldFrontendDiagnosticsTestGenerated.java | 22 ++++++ ...DiagnosticsWithLightTreeTestGenerated.java | 22 ++++++ .../FirBlackBoxCodegenTestGenerated.java | 16 ++++ .../codegen/box/multiplatform/hmpp/simple.kt | 36 +++++++++ ...dInheritorsInComplexModuleStructure.fir.kt | 22 ++++++ ...ealedInheritorsInComplexModuleStructure.kt | 22 ++++++ ...aledInheritorsInComplexModuleStructure.txt | 79 +++++++++++++++++++ .../tests/multiplatform/hmpp/simple.kt | 32 ++++++++ .../tests/multiplatform/hmpp/simple.txt | 52 ++++++++++++ .../test/runners/DiagnosticTestGenerated.java | 22 ++++++ .../codegen/BlackBoxCodegenTestGenerated.java | 16 ++++ .../IrBlackBoxCodegenTestGenerated.java | 16 ++++ .../LightAnalysisModeTestGenerated.java | 18 +++++ ...CompilerTestFE10TestdataTestGenerated.java | 23 ++++++ .../IrJsCodegenBoxES6TestGenerated.java | 13 +++ .../IrJsCodegenBoxTestGenerated.java | 13 +++ .../semantics/JsCodegenBoxTestGenerated.java | 13 +++ .../IrCodegenBoxWasmTestGenerated.java | 13 +++ 18 files changed, 450 insertions(+) create mode 100644 compiler/testData/codegen/box/multiplatform/hmpp/simple.kt create mode 100644 compiler/testData/diagnostics/tests/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.fir.kt create mode 100644 compiler/testData/diagnostics/tests/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.kt create mode 100644 compiler/testData/diagnostics/tests/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.txt create mode 100644 compiler/testData/diagnostics/tests/multiplatform/hmpp/simple.kt create mode 100644 compiler/testData/diagnostics/tests/multiplatform/hmpp/simple.txt diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java index b2a02db78c3..e2511ee2382 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java @@ -18633,6 +18633,28 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti } } + @Nested + @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/hmpp") + @TestDataPath("$PROJECT_ROOT") + public class Hmpp { + @Test + public void testAllFilesPresentInHmpp() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/hmpp"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + + @Test + @TestMetadata("sealedInheritorsInComplexModuleStructure.kt") + public void testSealedInheritorsInComplexModuleStructure() throws Exception { + runTest("compiler/testData/diagnostics/tests/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.kt"); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/diagnostics/tests/multiplatform/hmpp/simple.kt"); + } + } + @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/inlineClasses") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java index 8b6a543b2b9..c7944c1ce15 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java @@ -18633,6 +18633,28 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac } } + @Nested + @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/hmpp") + @TestDataPath("$PROJECT_ROOT") + public class Hmpp { + @Test + public void testAllFilesPresentInHmpp() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/hmpp"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + + @Test + @TestMetadata("sealedInheritorsInComplexModuleStructure.kt") + public void testSealedInheritorsInComplexModuleStructure() throws Exception { + runTest("compiler/testData/diagnostics/tests/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.kt"); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/diagnostics/tests/multiplatform/hmpp/simple.kt"); + } + } + @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/inlineClasses") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java index 4a944da22af..e63bde8b5be 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java @@ -25958,6 +25958,22 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } } + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/hmpp") + @TestDataPath("$PROJECT_ROOT") + public class Hmpp { + @Test + public void testAllFilesPresentInHmpp() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/hmpp"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/hmpp/simple.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/testData/codegen/box/multiplatform/hmpp/simple.kt b/compiler/testData/codegen/box/multiplatform/hmpp/simple.kt new file mode 100644 index 00000000000..e5b5d10f287 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/hmpp/simple.kt @@ -0,0 +1,36 @@ +/* + * This test is used for general testing of how compiler BB tests for HMPP projects works + * Js backend is ignored because they use old test infrastructure which doesn't support HMPP + */ + +// !LANGUAGE: +MultiPlatformProjects + +// IGNORE_BACKEND_FIR: JVM_IR +// TARGET_BACKEND: JVM + +// MODULE: common +// TARGET_PLATFORM: Common + +// FILE: common.kt +expect open class A() + +// MODULE: intermediate()()(common) +// TARGET_PLATFORM: JVM, JS + +// FILE: intermediate.kt +class B : A() { + fun foo(): String = "O" +} + +fun getB(): B = B() + +// MODULE: main()()(intermediate) +// FILE: main.kt +actual open class A actual constructor() { + fun bar(): String = "K" +} + +fun box(): String { + val b = getB() + return b.foo() + b.bar() +} diff --git a/compiler/testData/diagnostics/tests/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.fir.kt b/compiler/testData/diagnostics/tests/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.fir.kt new file mode 100644 index 00000000000..a9136fe9824 --- /dev/null +++ b/compiler/testData/diagnostics/tests/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.fir.kt @@ -0,0 +1,22 @@ +// !LANGUAGE: +MultiPlatformProjects + +// MODULE: common +// TARGET_PLATFORM: Common + +package foo + +expect sealed class SealedWithSharedActual() +expect sealed class SealedWithPlatformActuals : SealedWithSharedActual + +// MODULE: intermediate()()(common) +// TARGET_PLATFORM: Common +package foo + +actual sealed class SealedWithSharedActual +class SimpleShared : SealedWithPlatformActuals() + +// MODULE: main()()(intermediate) +// TARGET_PLATFORM: JVM +package foo + +actual sealed class SealedWithPlatformActuals actual constructor(): SealedWithSharedActual() diff --git a/compiler/testData/diagnostics/tests/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.kt b/compiler/testData/diagnostics/tests/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.kt new file mode 100644 index 00000000000..09feb594e32 --- /dev/null +++ b/compiler/testData/diagnostics/tests/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.kt @@ -0,0 +1,22 @@ +// !LANGUAGE: +MultiPlatformProjects + +// MODULE: common +// TARGET_PLATFORM: Common + +package foo + +expect sealed class SealedWithSharedActual() +expect sealed class SealedWithPlatformActuals : SealedWithSharedActual + +// MODULE: intermediate()()(common) +// TARGET_PLATFORM: Common +package foo + +actual sealed class SealedWithSharedActual +class SimpleShared : SealedWithPlatformActuals() + +// MODULE: main()()(intermediate) +// TARGET_PLATFORM: JVM +package foo + +actual sealed class SealedWithPlatformActuals actual constructor(): SealedWithSharedActual() diff --git a/compiler/testData/diagnostics/tests/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.txt b/compiler/testData/diagnostics/tests/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.txt new file mode 100644 index 00000000000..5c7ca90c36d --- /dev/null +++ b/compiler/testData/diagnostics/tests/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.txt @@ -0,0 +1,79 @@ +// -- Module: -- +package + +package foo { + + public sealed expect class SealedWithPlatformActuals : foo.SealedWithSharedActual { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + } + + public sealed expect class SealedWithSharedActual { + protected constructor SealedWithSharedActual() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + } +} + +// -- Module: -- +package + +package foo { + + public sealed expect class SealedWithPlatformActuals : foo.SealedWithSharedActual { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + } + + public sealed actual class SealedWithSharedActual { + protected constructor SealedWithSharedActual() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + } + + public sealed expect class SealedWithSharedActual { + protected constructor SealedWithSharedActual() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + } + + public final class SimpleShared : foo.SealedWithPlatformActuals { + public constructor SimpleShared() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + } +} + +// -- Module:
-- +package + +package foo { + + public sealed actual class SealedWithPlatformActuals : foo.SealedWithSharedActual { + protected constructor SealedWithPlatformActuals() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + } + + public sealed actual class SealedWithSharedActual { + protected constructor SealedWithSharedActual() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + } + + public final class SimpleShared : foo.SealedWithPlatformActuals { + public constructor SimpleShared() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + } +} + diff --git a/compiler/testData/diagnostics/tests/multiplatform/hmpp/simple.kt b/compiler/testData/diagnostics/tests/multiplatform/hmpp/simple.kt new file mode 100644 index 00000000000..22288a8cc54 --- /dev/null +++ b/compiler/testData/diagnostics/tests/multiplatform/hmpp/simple.kt @@ -0,0 +1,32 @@ +// FIR_IDENTICAL +/* + * This test is used for general testing of how compiler diagnostics tests for HMPP projects works + * Js backend is ignored because they use old test infrastructure which doesn't support HMPP + */ + +// !LANGUAGE: +MultiPlatformProjects + +// IGNORE_BACKEND_FIR: JVM_IR +// TARGET_BACKEND: JVM + +// MODULE: common +// TARGET_PLATFORM: Common +expect open class A() + +// MODULE: intermediate()()(common) +// TARGET_PLATFORM: Common +class B : A() { + fun foo(): String = "O" +} + +fun getB(): B = B() + +// MODULE: main()()(intermediate) +actual open class A actual constructor() { + fun bar(): String = "K" +} + +fun box(): String { + val b = getB() + return b.foo() + b.bar() +} diff --git a/compiler/testData/diagnostics/tests/multiplatform/hmpp/simple.txt b/compiler/testData/diagnostics/tests/multiplatform/hmpp/simple.txt new file mode 100644 index 00000000000..a3b00dc4729 --- /dev/null +++ b/compiler/testData/diagnostics/tests/multiplatform/hmpp/simple.txt @@ -0,0 +1,52 @@ +// -- Module: -- +package + +public open expect class A { + public constructor A() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +// -- Module: -- +package + +public fun getB(): B + +public open expect class A { + public constructor A() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public final class B : A { + public constructor B() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public final fun foo(): kotlin.String + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +// -- Module:
-- +package + +public fun box(): kotlin.String +public fun getB(): B + +public open actual class A { + public constructor A() + public final fun bar(): kotlin.String + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public final class B : A { + public constructor B() + public final override /*1*/ /*fake_override*/ fun bar(): kotlin.String + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public final fun foo(): kotlin.String + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java index c22cdb60227..1a5326d7d4d 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java @@ -18639,6 +18639,28 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { } } + @Nested + @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/hmpp") + @TestDataPath("$PROJECT_ROOT") + public class Hmpp { + @Test + public void testAllFilesPresentInHmpp() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/hmpp"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + + @Test + @TestMetadata("sealedInheritorsInComplexModuleStructure.kt") + public void testSealedInheritorsInComplexModuleStructure() throws Exception { + runTest("compiler/testData/diagnostics/tests/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.kt"); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/diagnostics/tests/multiplatform/hmpp/simple.kt"); + } + } + @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/inlineClasses") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index c8c8c628312..da83a2a32cd 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -25934,6 +25934,22 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/hmpp") + @TestDataPath("$PROJECT_ROOT") + public class Hmpp { + @Test + public void testAllFilesPresentInHmpp() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/hmpp"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/hmpp/simple.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index e761322c7dd..6060cb66f35 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -25958,6 +25958,22 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } } + @Nested + @TestMetadata("compiler/testData/codegen/box/multiplatform/hmpp") + @TestDataPath("$PROJECT_ROOT") + public class Hmpp { + @Test + public void testAllFilesPresentInHmpp() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/hmpp"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/hmpp/simple.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 34055dd8169..f4c0de9ddf3 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -21951,6 +21951,24 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } } + @TestMetadata("compiler/testData/codegen/box/multiplatform/hmpp") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Hmpp extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInHmpp() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/hmpp"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/hmpp/simple.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java index 9ce5a85eaf8..43499b8cfab 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java @@ -16316,6 +16316,29 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag } } + @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/hmpp") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Hmpp extends AbstractDiagnosisCompilerTestDataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInHmpp() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/hmpp"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + + @TestMetadata("sealedInheritorsInComplexModuleStructure.kt") + public void testSealedInheritorsInComplexModuleStructure() throws Exception { + runTest("compiler/testData/diagnostics/tests/multiplatform/hmpp/sealedInheritorsInComplexModuleStructure.kt"); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/diagnostics/tests/multiplatform/hmpp/simple.kt"); + } + } + @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/inlineClasses") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java index 1be9bf81a19..3819a77d1e6 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java @@ -17205,6 +17205,19 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes } } + @TestMetadata("compiler/testData/codegen/box/multiplatform/hmpp") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Hmpp extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInHmpp() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/hmpp"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index 0444162f70e..127616ac372 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -16611,6 +16611,19 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/multiplatform/hmpp") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Hmpp extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInHmpp() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/hmpp"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 7b547f6e757..74dc8a68297 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -16676,6 +16676,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/multiplatform/hmpp") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Hmpp extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInHmpp() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/hmpp"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } + @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java index 27cc8f5ac08..534182abdb7 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java @@ -10301,6 +10301,19 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } } + @TestMetadata("compiler/testData/codegen/box/multiplatform/hmpp") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Hmpp extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInHmpp() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/hmpp"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } + @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class)