[JS IR] Add tests for JS IR IC + PL

^KT-57347 related
This commit is contained in:
Alexander Korepanov
2023-05-08 16:54:30 +02:00
committed by Space Team
parent 97620030c6
commit 82a1242f22
96 changed files with 710 additions and 3 deletions
@@ -0,0 +1,3 @@
fun foo() {
fooX = 0
}
@@ -0,0 +1,3 @@
fun bar() {
fooX = 1
}
@@ -0,0 +1,3 @@
fun foo() {
fooX = 2
}
@@ -0,0 +1 @@
inline fun baz() = 10
@@ -0,0 +1 @@
inline fun baz() = 11
@@ -0,0 +1 @@
var fooX = -100
@@ -0,0 +1,19 @@
STEP 0:
modifications:
U : l1a.0.kt -> l1a.kt
U : l1b.0.kt -> l1b.kt
added file: l1a.kt, l1b.kt, l1c.kt
STEP 1:
modifications:
U : l1a.1.kt -> l1a.kt
modified ir: l1a.kt
updated exports: l1a.kt, l1c.kt
STEP 2:
modifications:
U : l1a.2.kt -> l1a.kt
modified ir: l1a.kt
updated exports: l1a.kt, l1c.kt
STEP 3:
modifications:
U : l1b.3.kt -> l1b.kt
modified ir: l1b.kt
@@ -0,0 +1,5 @@
fun box(stepId: Int): String {
val x = test()
if (stepId != x) return "Fail; got $x"
return "OK"
}
@@ -0,0 +1,8 @@
STEP 0:
dependencies: lib1
modifications:
added file: m.kt, test.kt
STEP 1..3:
dependencies: lib1
rebuild klib: false
updated imports: test.kt
@@ -0,0 +1,13 @@
internal fun doTest() : Int {
foo()
val y = baz()
return y + fooX - 10
}
fun test(): Int {
try {
return doTest()
} catch (e: Error) {
return 1
}
}
@@ -0,0 +1,5 @@
MODULES: lib1, main
STEP 0..3:
libs: lib1, main
dirty js: lib1, main