JS: add incremental test for local declarations change
This commit is contained in:
+18
@@ -837,6 +837,11 @@ public class IncrementalJsCompilerRunnerTestGenerated extends AbstractIncrementa
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/js"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/js"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineFunctionLocalDeclarationChanges")
|
||||||
|
public void testInlineFunctionLocalDeclarationChanges() throws Exception {
|
||||||
|
runTest("jps-plugin/testData/incremental/js/inlineFunctionLocalDeclarationChanges/");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("jps-plugin/testData/incremental/js/friendsModuleDisabled")
|
@TestMetadata("jps-plugin/testData/incremental/js/friendsModuleDisabled")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
@@ -867,5 +872,18 @@ public class IncrementalJsCompilerRunnerTestGenerated extends AbstractIncrementa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("jps-plugin/testData/incremental/js/inlineFunctionLocalDeclarationChanges")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class InlineFunctionLocalDeclarationChanges extends AbstractIncrementalJsCompilerRunnerTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInInlineFunctionLocalDeclarationChanges() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/js/inlineFunctionLocalDeclarationChanges"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
fun dontUseF() {
|
||||||
|
println("Don't use f")
|
||||||
|
}
|
||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
fun doo(fn: () -> Unit) = fn()
|
||||||
|
|
||||||
|
inline fun f() {
|
||||||
|
doo {
|
||||||
|
println("i'm inline function")
|
||||||
|
}
|
||||||
|
}
|
||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
fun doo(fn: () -> Unit) = fn()
|
||||||
|
|
||||||
|
inline fun f() {
|
||||||
|
doo {
|
||||||
|
println("I'm an inline function!")
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Compiling files:
|
||||||
|
src/inline.kt
|
||||||
|
src/usage.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
package usage
|
||||||
|
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
inline.f()
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user