[K2/N] Rewrite mpp tests from old native infra to new

^KT-58543

Merge-request: KT-MR-10065
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
This commit is contained in:
Vladimir Sukharev
2023-05-16 08:41:39 +00:00
committed by Space Team
parent 2b913d7c47
commit bbe1e708f9
35 changed files with 2067 additions and 823 deletions
@@ -23479,6 +23479,26 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
}
@Nested
@@ -23629,6 +23629,80 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("mpp_optional_expectation.kt")
public void testMpp_optional_expectation() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_optional_expectation.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/remap_expect_property_ref.kt");
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/remap_expect_property_ref.kt");
}
}
@Nested
@@ -23629,6 +23629,80 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("mpp_optional_expectation.kt")
public void testMpp_optional_expectation() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_optional_expectation.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/remap_expect_property_ref.kt");
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/remap_expect_property_ref.kt");
}
}
@Nested
@@ -23629,6 +23629,80 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("mpp_optional_expectation.kt")
public void testMpp_optional_expectation() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_optional_expectation.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/remap_expect_property_ref.kt");
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/remap_expect_property_ref.kt");
}
}
@Nested