[K/JS] Support essential Kotlin collections (List, MutableList, Set, MutableSet, Map, MutableMap) for exporting into JS

^KT-34995 Fixed
^KT-44871 Fixed
This commit is contained in:
Artem Kobzar
2024-01-24 11:14:46 +00:00
committed by Space Team
parent b71797383f
commit 8d1a90c23c
42 changed files with 1431 additions and 47 deletions
@@ -57,6 +57,38 @@ public class IrJsES6TypeScriptExportTestGenerated extends AbstractIrJsES6TypeScr
}
}
@Nested
@TestMetadata("js/js.translator/testData/typescript-export/collections")
@TestDataPath("$PROJECT_ROOT")
public class Collections {
@Test
public void testAllFilesPresentInCollections() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/collections"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Test
@TestMetadata("collections.kt")
public void testCollections() throws Exception {
runTest("js/js.translator/testData/typescript-export/collections/collections.kt");
}
}
@Nested
@TestMetadata("js/js.translator/testData/typescript-export/collections-in-exported-file")
@TestDataPath("$PROJECT_ROOT")
public class Collections_in_exported_file {
@Test
public void testAllFilesPresentInCollections_in_exported_file() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/collections-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Test
@TestMetadata("collections.kt")
public void testCollections() throws Exception {
runTest("js/js.translator/testData/typescript-export/collections-in-exported-file/collections.kt");
}
}
@Nested
@TestMetadata("js/js.translator/testData/typescript-export/constructors")
@TestDataPath("$PROJECT_ROOT")
@@ -57,6 +57,38 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
}
}
@Nested
@TestMetadata("js/js.translator/testData/typescript-export/collections")
@TestDataPath("$PROJECT_ROOT")
public class Collections {
@Test
public void testAllFilesPresentInCollections() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/collections"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("collections.kt")
public void testCollections() throws Exception {
runTest("js/js.translator/testData/typescript-export/collections/collections.kt");
}
}
@Nested
@TestMetadata("js/js.translator/testData/typescript-export/collections-in-exported-file")
@TestDataPath("$PROJECT_ROOT")
public class Collections_in_exported_file {
@Test
public void testAllFilesPresentInCollections_in_exported_file() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/collections-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("collections.kt")
public void testCollections() throws Exception {
runTest("js/js.translator/testData/typescript-export/collections-in-exported-file/collections.kt");
}
}
@Nested
@TestMetadata("js/js.translator/testData/typescript-export/constructors")
@TestDataPath("$PROJECT_ROOT")