Add simple inline incremental compilation test cases
Original commit: 32c041d4db
This commit is contained in:
@@ -281,6 +281,12 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineFunction")
|
||||||
|
public void testInlineFunction() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineFunction/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("inlineFunctionRemoved")
|
@TestMetadata("inlineFunctionRemoved")
|
||||||
public void testInlineFunctionRemoved() throws Exception {
|
public void testInlineFunctionRemoved() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineFunctionRemoved/");
|
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineFunctionRemoved/");
|
||||||
@@ -299,6 +305,12 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineTwoFunctionsOneChanged")
|
||||||
|
public void testInlineTwoFunctionsOneChanged() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineTwoFunctionsOneChanged/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("localClassChanged")
|
@TestMetadata("localClassChanged")
|
||||||
public void testLocalClassChanged() throws Exception {
|
public void testLocalClassChanged() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/localClassChanged/");
|
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/localClassChanged/");
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
Cleaning output files:
|
||||||
|
out/production/module/inline/InlinePackage$inline$*.class
|
||||||
|
out/production/module/inline/InlinePackage.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/inline.kt
|
||||||
|
End of files
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/usage/UsagePackage$usesInline$*.class
|
||||||
|
out/production/module/usage/UsagePackage.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/usesInline.kt
|
||||||
|
End of files
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
inline fun f(body: () -> Unit) {
|
||||||
|
body()
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
inline fun f(body: () -> Unit) {
|
||||||
|
println("i'm inline function")
|
||||||
|
body()
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package usage
|
||||||
|
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
test()
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package usage
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
inline.f { println("to be inlined") }
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
Cleaning output files:
|
||||||
|
out/production/module/inline/InlinePackage$inline$*.class
|
||||||
|
out/production/module/inline/InlinePackage.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/inline.kt
|
||||||
|
End of files
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/usage/UsagePackage$usesG$*.class
|
||||||
|
out/production/module/usage/UsagePackage.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/usesG.kt
|
||||||
|
End of files
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
inline fun f() {
|
||||||
|
println("inline.f")
|
||||||
|
}
|
||||||
|
|
||||||
|
inline fun g() {
|
||||||
|
println("inline.g")
|
||||||
|
}
|
||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
inline fun f() {
|
||||||
|
println("inline.f")
|
||||||
|
}
|
||||||
|
|
||||||
|
inline fun g() {
|
||||||
|
println("inline.g changed")
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package usage
|
||||||
|
|
||||||
|
fun testF() {
|
||||||
|
inline.f()
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package usage
|
||||||
|
|
||||||
|
fun testG() {
|
||||||
|
inline.g()
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user