[IC] Add in-module tests for incremental compilation
Two tests to check recompilation when parameter with default value was added or removed without changing use-site.
This commit is contained in:
+10
@@ -441,6 +441,16 @@ public class IncrementalJsCompilerRunnerTestGenerated extends AbstractIncrementa
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/packageRemoved/");
|
||||
}
|
||||
|
||||
@TestMetadata("parameterWithDefaultValueAdded")
|
||||
public void testParameterWithDefaultValueAdded() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/parameterWithDefaultValueAdded/");
|
||||
}
|
||||
|
||||
@TestMetadata("parameterWithDefaultValueRemoved")
|
||||
public void testParameterWithDefaultValueRemoved() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/parameterWithDefaultValueRemoved/");
|
||||
}
|
||||
|
||||
@TestMetadata("privateConstantsChanged")
|
||||
public void testPrivateConstantsChanged() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/privateConstantsChanged/");
|
||||
|
||||
+10
@@ -441,6 +441,16 @@ public class IncrementalJsCompilerRunnerWithMetadataOnlyTestGenerated extends Ab
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/packageRemoved/");
|
||||
}
|
||||
|
||||
@TestMetadata("parameterWithDefaultValueAdded")
|
||||
public void testParameterWithDefaultValueAdded() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/parameterWithDefaultValueAdded/");
|
||||
}
|
||||
|
||||
@TestMetadata("parameterWithDefaultValueRemoved")
|
||||
public void testParameterWithDefaultValueRemoved() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/parameterWithDefaultValueRemoved/");
|
||||
}
|
||||
|
||||
@TestMetadata("privateConstantsChanged")
|
||||
public void testPrivateConstantsChanged() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/privateConstantsChanged/");
|
||||
|
||||
+10
@@ -441,6 +441,16 @@ public class IncrementalJsKlibCompilerRunnerTestGenerated extends AbstractIncrem
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/packageRemoved/");
|
||||
}
|
||||
|
||||
@TestMetadata("parameterWithDefaultValueAdded")
|
||||
public void testParameterWithDefaultValueAdded() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/parameterWithDefaultValueAdded/");
|
||||
}
|
||||
|
||||
@TestMetadata("parameterWithDefaultValueRemoved")
|
||||
public void testParameterWithDefaultValueRemoved() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/parameterWithDefaultValueRemoved/");
|
||||
}
|
||||
|
||||
@TestMetadata("privateConstantsChanged")
|
||||
public void testPrivateConstantsChanged() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/privateConstantsChanged/");
|
||||
|
||||
+10
@@ -441,6 +441,16 @@ public class IncrementalJsKlibCompilerWithScopeExpansionRunnerTestGenerated exte
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/packageRemoved/");
|
||||
}
|
||||
|
||||
@TestMetadata("parameterWithDefaultValueAdded")
|
||||
public void testParameterWithDefaultValueAdded() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/parameterWithDefaultValueAdded/");
|
||||
}
|
||||
|
||||
@TestMetadata("parameterWithDefaultValueRemoved")
|
||||
public void testParameterWithDefaultValueRemoved() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/parameterWithDefaultValueRemoved/");
|
||||
}
|
||||
|
||||
@TestMetadata("privateConstantsChanged")
|
||||
public void testPrivateConstantsChanged() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/privateConstantsChanged/");
|
||||
|
||||
+10
@@ -442,6 +442,16 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/packageRemoved/");
|
||||
}
|
||||
|
||||
@TestMetadata("parameterWithDefaultValueAdded")
|
||||
public void testParameterWithDefaultValueAdded() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/parameterWithDefaultValueAdded/");
|
||||
}
|
||||
|
||||
@TestMetadata("parameterWithDefaultValueRemoved")
|
||||
public void testParameterWithDefaultValueRemoved() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/parameterWithDefaultValueRemoved/");
|
||||
}
|
||||
|
||||
@TestMetadata("privateConstantsChanged")
|
||||
public void testPrivateConstantsChanged() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/privateConstantsChanged/");
|
||||
|
||||
+10
@@ -442,6 +442,16 @@ public class IrIncrementalJvmCompilerRunnerTestGenerated extends AbstractIrIncre
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/packageRemoved/");
|
||||
}
|
||||
|
||||
@TestMetadata("parameterWithDefaultValueAdded")
|
||||
public void testParameterWithDefaultValueAdded() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/parameterWithDefaultValueAdded/");
|
||||
}
|
||||
|
||||
@TestMetadata("parameterWithDefaultValueRemoved")
|
||||
public void testParameterWithDefaultValueRemoved() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/parameterWithDefaultValueRemoved/");
|
||||
}
|
||||
|
||||
@TestMetadata("privateConstantsChanged")
|
||||
public void testPrivateConstantsChanged() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/privateConstantsChanged/");
|
||||
|
||||
Generated
+10
@@ -1110,6 +1110,16 @@ public class IncrementalJvmJpsTestGenerated extends AbstractIncrementalJvmJpsTes
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/packageRemoved/");
|
||||
}
|
||||
|
||||
@TestMetadata("parameterWithDefaultValueAdded")
|
||||
public void testParameterWithDefaultValueAdded() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/parameterWithDefaultValueAdded/");
|
||||
}
|
||||
|
||||
@TestMetadata("parameterWithDefaultValueRemoved")
|
||||
public void testParameterWithDefaultValueRemoved() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/parameterWithDefaultValueRemoved/");
|
||||
}
|
||||
|
||||
@TestMetadata("privateConstantsChanged")
|
||||
public void testPrivateConstantsChanged() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/pureKotlin/privateConstantsChanged/");
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/FunKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/fun.kt
|
||||
End of files
|
||||
Marked as dirty by Kotlin:
|
||||
src/useDefault.kt
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
------------------------------------------
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/UseDefaultKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/useDefault.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
|
||||
================ Step #2 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/FunKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/fun.kt
|
||||
End of files
|
||||
Marked as dirty by Kotlin:
|
||||
src/useDefault.kt
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
------------------------------------------
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/UseDefaultKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/useDefault.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
fun f(x: Any) {
|
||||
println("f(x: Any)")
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
fun f(x: Any, y: String = "D") {
|
||||
println("f(x: Any, $y)")
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
fun f(x: Any = "", y: String = "D") {
|
||||
println("f(x: Any, $y)")
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package other
|
||||
|
||||
fun other() {}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
fun useDefault1() {
|
||||
f(10)
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/FunKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/fun.kt
|
||||
End of files
|
||||
Marked as dirty by Kotlin:
|
||||
src/useDefault.kt
|
||||
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||
------------------------------------------
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/test/UseDefaultKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/useDefault.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
fun f(x: Any, y: String = "D") {
|
||||
println("f(x: Any, $y)")
|
||||
}
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
fun f(x: Any) {
|
||||
println("f(x: Any)")
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package other
|
||||
|
||||
fun other() {}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
fun useDefault1() {
|
||||
f(10)
|
||||
}
|
||||
Reference in New Issue
Block a user