[Wasm] Support lazy associated object initialisation
Fix #KT-63939
This commit is contained in:
committed by
Space Team
parent
55bbaec3f9
commit
be6b9e8a9a
@@ -21,7 +21,7 @@ fun main(args: Array<String>) {
|
||||
val k2BoxTestDir = "multiplatform/k2"
|
||||
|
||||
val jsTranslatorTestPattern = "^([^_](.+))\\.kt$"
|
||||
val jsTranslatorReflectionPattern = "^(findAssociatedObject(InSeparatedFile)?)\\.kt$"
|
||||
val jsTranslatorReflectionPattern = "^(findAssociatedObject(InSeparatedFile)?(Lazyness)?)\\.kt$"
|
||||
val jsTranslatorEsModulesExcludedDirs = listOf(
|
||||
// JsExport is not supported for classes
|
||||
"jsExport", "native", "export",
|
||||
|
||||
Generated
+7
-1
@@ -514,7 +514,7 @@ public class FirWasmJsTranslatorTestGenerated extends AbstractFirWasmJsTranslato
|
||||
public class Reflection {
|
||||
@Test
|
||||
public void testAllFilesPresentInReflection() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/reflection"), Pattern.compile("^(findAssociatedObject(InSeparatedFile)?)\\.kt$"), null, TargetBackend.WASM, true);
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/reflection"), Pattern.compile("^(findAssociatedObject(InSeparatedFile)?(Lazyness)?)\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -528,6 +528,12 @@ public class FirWasmJsTranslatorTestGenerated extends AbstractFirWasmJsTranslato
|
||||
public void testFindAssociatedObjectInSeparatedFile() throws Exception {
|
||||
runTest("js/js.translator/testData/box/reflection/findAssociatedObjectInSeparatedFile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("findAssociatedObjectLazyness.kt")
|
||||
public void testFindAssociatedObjectLazyness() throws Exception {
|
||||
runTest("js/js.translator/testData/box/reflection/findAssociatedObjectLazyness.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
Generated
+7
-1
@@ -514,7 +514,7 @@ public class K1WasmJsTranslatorTestGenerated extends AbstractK1WasmJsTranslatorT
|
||||
public class Reflection {
|
||||
@Test
|
||||
public void testAllFilesPresentInReflection() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/reflection"), Pattern.compile("^(findAssociatedObject(InSeparatedFile)?)\\.kt$"), null, TargetBackend.WASM, true);
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/reflection"), Pattern.compile("^(findAssociatedObject(InSeparatedFile)?(Lazyness)?)\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -528,6 +528,12 @@ public class K1WasmJsTranslatorTestGenerated extends AbstractK1WasmJsTranslatorT
|
||||
public void testFindAssociatedObjectInSeparatedFile() throws Exception {
|
||||
runTest("js/js.translator/testData/box/reflection/findAssociatedObjectInSeparatedFile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("findAssociatedObjectLazyness.kt")
|
||||
public void testFindAssociatedObjectLazyness() throws Exception {
|
||||
runTest("js/js.translator/testData/box/reflection/findAssociatedObjectLazyness.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
Reference in New Issue
Block a user