[JS IR] Add tests for JS IR IC + PL
^KT-57347 related
This commit is contained in:
committed by
Space Team
parent
97620030c6
commit
82a1242f22
Vendored
+1
@@ -0,0 +1 @@
|
||||
fun foo() = 0
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
fun foo(x: Int) = x + 1
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
fun foo() = 2
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
// this is known issue, that return type doesn not affect IdSignature
|
||||
// https://youtrack.jetbrains.com/issue/KT-51707
|
||||
fun foo() = "4"
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
fun foo(x: Int = 1) = "${x + 5}"
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
STEP 0:
|
||||
modifications:
|
||||
U : l1.0.kt -> l1.kt
|
||||
added file: l1.kt
|
||||
STEP 1:
|
||||
modifications:
|
||||
U : l1.1.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
updated exports: l1.kt
|
||||
STEP 2:
|
||||
modifications:
|
||||
U : l1.2.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
updated exports: l1.kt
|
||||
STEP 3:
|
||||
STEP 4:
|
||||
modifications:
|
||||
U : l1.4.bug.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
STEP 5:
|
||||
STEP 6:
|
||||
modifications:
|
||||
U : l1.6.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
updated exports: l1.kt
|
||||
STEP 7:
|
||||
updated exports: l1.kt
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fun box(stepId: Int): String {
|
||||
val x = test()
|
||||
if (stepId == 4) {
|
||||
// this is known issue, that return type doesn not affect IdSignature
|
||||
// https://youtrack.jetbrains.com/issue/KT-51707
|
||||
if (x != 41) return "Fail; got $x"
|
||||
} else {
|
||||
if (stepId != x) return "Fail; got $x"
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
STEP 0:
|
||||
dependencies: lib1
|
||||
modifications:
|
||||
U : test.0.kt -> test.kt
|
||||
added file: m.kt, test.kt
|
||||
STEP 1..2:
|
||||
dependencies: lib1
|
||||
rebuild klib: false
|
||||
updated imports: test.kt
|
||||
STEP 3:
|
||||
dependencies: lib1
|
||||
modifications:
|
||||
U : test.3.kt -> test.kt
|
||||
modified ir: test.kt
|
||||
STEP 4:
|
||||
dependencies: lib1
|
||||
rebuild klib: false
|
||||
updated imports: test.kt
|
||||
STEP 5:
|
||||
dependencies: lib1
|
||||
modified ir: test.kt
|
||||
STEP 6:
|
||||
dependencies: lib1
|
||||
rebuild klib: false
|
||||
updated imports: test.kt
|
||||
STEP 7:
|
||||
dependencies: lib1
|
||||
modified ir: test.kt
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
fun test(): Int {
|
||||
try {
|
||||
return foo()
|
||||
} catch (e: Error) {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
fun test(): Int {
|
||||
try {
|
||||
return foo().toInt() + 1
|
||||
} catch (e: Error) {
|
||||
return 6
|
||||
}
|
||||
}
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
MODULES: lib1, main
|
||||
|
||||
STEP 0..2:
|
||||
libs: lib1, main
|
||||
dirty js: lib1, main
|
||||
STEP 3:
|
||||
libs: lib1, main
|
||||
dirty js: main
|
||||
STEP 4:
|
||||
libs: lib1, main
|
||||
dirty js: lib1, main
|
||||
STEP 5:
|
||||
libs: lib1, main
|
||||
dirty js: main
|
||||
STEP 6:
|
||||
libs: lib1, main
|
||||
dirty js: lib1, main
|
||||
STEP 7:
|
||||
libs: lib1, main
|
||||
dirty js: lib1, main
|
||||
Reference in New Issue
Block a user