[JS IR test] Add a simple multiplatform invalidation test
This commit is contained in:
committed by
Space Team
parent
bf80d55fc3
commit
73bf7fa506
Generated
+6
@@ -409,6 +409,12 @@ public class JsFirInvalidationPerFileTestGenerated extends AbstractJsFirInvalida
|
|||||||
runTest("js/js.translator/testData/incremental/invalidation/moveInlineFunctionBetweenModules/");
|
runTest("js/js.translator/testData/incremental/invalidation/moveInlineFunctionBetweenModules/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("multiPlatformSimple")
|
||||||
|
public void testMultiPlatformSimple() throws Exception {
|
||||||
|
runTest("js/js.translator/testData/incremental/invalidation/multiPlatformSimple/");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("nestedClass")
|
@TestMetadata("nestedClass")
|
||||||
public void testNestedClass() throws Exception {
|
public void testNestedClass() throws Exception {
|
||||||
|
|||||||
Generated
+6
@@ -409,6 +409,12 @@ public class JsFirInvalidationPerModuleTestGenerated extends AbstractJsFirInvali
|
|||||||
runTest("js/js.translator/testData/incremental/invalidation/moveInlineFunctionBetweenModules/");
|
runTest("js/js.translator/testData/incremental/invalidation/moveInlineFunctionBetweenModules/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("multiPlatformSimple")
|
||||||
|
public void testMultiPlatformSimple() throws Exception {
|
||||||
|
runTest("js/js.translator/testData/incremental/invalidation/multiPlatformSimple/");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("nestedClass")
|
@TestMetadata("nestedClass")
|
||||||
public void testNestedClass() throws Exception {
|
public void testNestedClass() throws Exception {
|
||||||
|
|||||||
Generated
+6
@@ -409,6 +409,12 @@ public class JsIrES6InvalidationPerFileTestGenerated extends AbstractJsIrES6Inva
|
|||||||
runTest("js/js.translator/testData/incremental/invalidation/moveInlineFunctionBetweenModules/");
|
runTest("js/js.translator/testData/incremental/invalidation/moveInlineFunctionBetweenModules/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("multiPlatformSimple")
|
||||||
|
public void testMultiPlatformSimple() throws Exception {
|
||||||
|
runTest("js/js.translator/testData/incremental/invalidation/multiPlatformSimple/");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("nestedClass")
|
@TestMetadata("nestedClass")
|
||||||
public void testNestedClass() throws Exception {
|
public void testNestedClass() throws Exception {
|
||||||
|
|||||||
+6
@@ -409,6 +409,12 @@ public class JsIrES6InvalidationPerModuleTestGenerated extends AbstractJsIrES6In
|
|||||||
runTest("js/js.translator/testData/incremental/invalidation/moveInlineFunctionBetweenModules/");
|
runTest("js/js.translator/testData/incremental/invalidation/moveInlineFunctionBetweenModules/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("multiPlatformSimple")
|
||||||
|
public void testMultiPlatformSimple() throws Exception {
|
||||||
|
runTest("js/js.translator/testData/incremental/invalidation/multiPlatformSimple/");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("nestedClass")
|
@TestMetadata("nestedClass")
|
||||||
public void testNestedClass() throws Exception {
|
public void testNestedClass() throws Exception {
|
||||||
|
|||||||
Generated
+6
@@ -409,6 +409,12 @@ public class JsIrInvalidationPerFileTestGenerated extends AbstractJsIrInvalidati
|
|||||||
runTest("js/js.translator/testData/incremental/invalidation/moveInlineFunctionBetweenModules/");
|
runTest("js/js.translator/testData/incremental/invalidation/moveInlineFunctionBetweenModules/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("multiPlatformSimple")
|
||||||
|
public void testMultiPlatformSimple() throws Exception {
|
||||||
|
runTest("js/js.translator/testData/incremental/invalidation/multiPlatformSimple/");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("nestedClass")
|
@TestMetadata("nestedClass")
|
||||||
public void testNestedClass() throws Exception {
|
public void testNestedClass() throws Exception {
|
||||||
|
|||||||
Generated
+6
@@ -409,6 +409,12 @@ public class JsIrInvalidationPerModuleTestGenerated extends AbstractJsIrInvalida
|
|||||||
runTest("js/js.translator/testData/incremental/invalidation/moveInlineFunctionBetweenModules/");
|
runTest("js/js.translator/testData/incremental/invalidation/moveInlineFunctionBetweenModules/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("multiPlatformSimple")
|
||||||
|
public void testMultiPlatformSimple() throws Exception {
|
||||||
|
runTest("js/js.translator/testData/incremental/invalidation/multiPlatformSimple/");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("nestedClass")
|
@TestMetadata("nestedClass")
|
||||||
public void testNestedClass() throws Exception {
|
public void testNestedClass() throws Exception {
|
||||||
|
|||||||
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
expect fun lib1CommonFun(): Int
|
||||||
|
|
||||||
|
fun lib1Fun() = lib1CommonFun() + 1
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
actual fun lib1CommonFun(): Int = 0
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
actual fun lib1CommonFun(): Int = 1
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
STEP 0:
|
||||||
|
modifications:
|
||||||
|
U : js/l1js.0.kt -> js/l1js.kt
|
||||||
|
U : common/l1common.0.kt -> common/l1common.kt
|
||||||
|
added file: l1js.kt, l1common.kt
|
||||||
|
STEP 1:
|
||||||
|
modifications:
|
||||||
|
U : js/l1js.1.kt -> js/l1js.kt
|
||||||
|
modified ir: l1js.kt
|
||||||
|
|
||||||
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
expect fun lib2CommonFun(): Int
|
||||||
|
|
||||||
|
fun lib2Fun() = lib2CommonFun() + lib1CommonFun() + lib1Fun() + 1
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
actual fun lib2CommonFun(): Int = lib1CommonFun() + 1
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
actual fun lib2CommonFun(): Int = lib1CommonFun() + 1 + 1
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
STEP 0:
|
||||||
|
dependencies: lib1
|
||||||
|
modifications:
|
||||||
|
U : js/l2js.0.kt -> js/l2js.kt
|
||||||
|
U : common/l2common.0.kt -> common/l2common.kt
|
||||||
|
added file: l2js.kt, l2common.kt
|
||||||
|
STEP 1:
|
||||||
|
dependencies: lib1
|
||||||
|
modifications:
|
||||||
|
U : js/l2js.1.kt -> js/l2js.kt
|
||||||
|
modified ir: l2js.kt
|
||||||
|
|
||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
fun box(stepId: Int): String {
|
||||||
|
val lib1Common = stepId
|
||||||
|
val lib1 = lib1Common + 1
|
||||||
|
val lib2Common = lib1Common + stepId + 1
|
||||||
|
val lib2 = lib1Common + lib2Common + lib1 + 1
|
||||||
|
|
||||||
|
var got = lib1CommonFun()
|
||||||
|
if (lib1Common != got) {
|
||||||
|
return "Fail lib1CommonFun(): $lib1Common != $got"
|
||||||
|
}
|
||||||
|
got = lib1Fun()
|
||||||
|
if (lib1 != got) {
|
||||||
|
return "Fail lib1Fun(): $lib1 != $got"
|
||||||
|
}
|
||||||
|
got = lib2CommonFun()
|
||||||
|
if (lib2Common != got) {
|
||||||
|
return "Fail lib2CommonFun(): $lib2Common != $got"
|
||||||
|
}
|
||||||
|
got = lib2Fun()
|
||||||
|
if (lib2 != got) {
|
||||||
|
return "Fail lib2Fun(): $lib2 != $got"
|
||||||
|
}
|
||||||
|
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
STEP 0:
|
||||||
|
dependencies: lib1, lib2
|
||||||
|
added file: m.kt
|
||||||
|
STEP 1:
|
||||||
|
dependencies: lib1, lib2
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
MODULES: lib1, lib2, main
|
||||||
|
|
||||||
|
STEP 0:
|
||||||
|
language: +MultiPlatformProjects
|
||||||
|
libs: lib1, lib2, main
|
||||||
|
dirty js modules: lib1, lib2, main
|
||||||
|
dirty js files: lib1/l1js, lib1/l1common, lib2/l2js, lib2/l2common, main/m.export, main/m, main
|
||||||
|
STEP 1:
|
||||||
|
language: +MultiPlatformProjects
|
||||||
|
libs: lib1, lib2, main
|
||||||
|
dirty js modules: lib1, lib2
|
||||||
|
dirty js files: lib1/l1js, lib2/l2js
|
||||||
Reference in New Issue
Block a user