[JS IC TEST] Add test case for private top-level inline functions

This commit is contained in:
Roman Artemev
2021-12-17 05:25:01 +03:00
committed by teamcity
parent 2d0fea4dcb
commit 2474702bef
9 changed files with 54 additions and 0 deletions
@@ -40,6 +40,11 @@ public class InvalidationTestGenerated extends AbstractInvalidationTest {
runTest("js/js.translator/testData/incremental/invalidation/fastPath2/");
}
@TestMetadata("privateInlineFunction1")
public void testPrivateInlineFunction1() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/privateInlineFunction1/");
}
@TestMetadata("simple")
public void testSimple() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/simple/");
@@ -0,0 +1,8 @@
private inline fun privateBar(z: Int, l: (Int) -> Int) = l(z - 3)
private inline fun privateFoo(x: Int, l: (Int) -> Int): Int {
return privateBar(x * 2, l)
}
fun foo(x: Int, y: Int) = y - privateFoo(x) { it + it }
@@ -0,0 +1,8 @@
private inline fun privateBar(z: Int, l: (Int) -> Int) = l(z - 5)
private inline fun privateFoo(x: Int, l: (Int) -> Int): Int {
return privateBar(x * 2, l)
}
fun foo(x: Int, y: Int) = y - privateFoo(x) { it + it }
@@ -0,0 +1,8 @@
STEP 0:
dependencies: stdlib
dirty: l1.kt
STEP 1:
dependencies: stdlib
modifications:
U : l1.kt.1 -> l1.kt
dirty: l1.kt
@@ -0,0 +1,2 @@
inline fun qux(x: Int, y: Int) = foo(x, y)
@@ -0,0 +1,7 @@
STEP 0:
dependencies: stdlib, lib1
dirty: l2.kt
STEP 1:
dependencies: stdlib, lib1
dirty:
@@ -0,0 +1,2 @@
fun box() = qux(4, 2)
@@ -0,0 +1,7 @@
STEP 0:
dependencies: stdlib, lib1, lib2
dirty: m.kt
STEP 1:
dependencies: stdlib, lib1, lib2
dirty:
@@ -0,0 +1,7 @@
MODULES: lib1, lib2, main
STEP 0:
libs: lib1, lib2, main
STEP 1:
libs: lib1, lib2, main