Add incremental compilation inline call site tests
This commit is contained in:
@@ -813,6 +813,7 @@ fun main(args: Array<String>) {
|
||||
model("incremental/multiModule", extension = null, excludeParentDirs = true)
|
||||
model("incremental/pureKotlin", extension = null, excludeParentDirs = true)
|
||||
model("incremental/withJava", extension = null, excludeParentDirs = true)
|
||||
model("incremental/inlineFunCallSite", extension = null, excludeParentDirs = true)
|
||||
}
|
||||
testClass(javaClass<AbstractLookupTrackerTest>()) {
|
||||
model("incremental/lookupTracker", extension = null, excludeParentDirs = true)
|
||||
|
||||
@@ -305,12 +305,6 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineToTopLevelVal")
|
||||
public void testInlineToTopLevelVal() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineToTopLevelVal/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineTwoFunctionsOneChanged")
|
||||
public void testInlineTwoFunctionsOneChanged() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineTwoFunctionsOneChanged/");
|
||||
@@ -750,4 +744,92 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class InlineFunCallSite extends AbstractIncrementalJpsTest {
|
||||
public void testAllFilesPresentInInlineFunCallSite() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite"), Pattern.compile("^([^\\.]+)$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("classProperty")
|
||||
public void testClassProperty() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/classProperty/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("companionObjectProperty")
|
||||
public void testCompanionObjectProperty() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/companionObjectProperty/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("function")
|
||||
public void testFunction() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/function/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("getter")
|
||||
public void testGetter() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/getter/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("lambda")
|
||||
public void testLambda() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/lambda/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("localFun")
|
||||
public void testLocalFun() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/localFun/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("method")
|
||||
public void testMethod() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/method/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("parameterDefaultValue")
|
||||
public void testParameterDefaultValue() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/parameterDefaultValue/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("primaryConstructorParameterDefaultValue")
|
||||
public void testPrimaryConstructorParameterDefaultValue() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/primaryConstructorParameterDefaultValue/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("superCall")
|
||||
public void testSuperCall() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/superCall/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("thisCall")
|
||||
public void testThisCall() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/thisCall/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelObjectProperty")
|
||||
public void testTopLevelObjectProperty() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/topLevelObjectProperty/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelProperty")
|
||||
public void testTopLevelProperty() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/topLevelProperty/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
package usage
|
||||
|
||||
class Usage {
|
||||
val x = inline.f()
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/inline/InlineKt.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/Usage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/Usage.kt
|
||||
End of files
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package usage
|
||||
|
||||
class Usage {
|
||||
companion object {
|
||||
val x = inline.f()
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/inline/InlineKt.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/Usage$Companion.class
|
||||
out/production/module/usage/Usage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/Usage.kt
|
||||
End of files
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 0
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 1
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package usage
|
||||
|
||||
fun other() {}
|
||||
+5
-3
@@ -1,14 +1,16 @@
|
||||
Cleaning output files:
|
||||
out/production/module/inline/InlinePackage$inline$*.class
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/inline/InlineKt.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$usage$*.class
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/usage/UsageKt.class
|
||||
out/production/module/usage/UsagePackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/usage.kt
|
||||
End of files
|
||||
End of files
|
||||
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 0
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 1
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package usage
|
||||
|
||||
fun other() {}
|
||||
@@ -0,0 +1,5 @@
|
||||
package usage
|
||||
|
||||
fun usage() {
|
||||
val x = inline.f()
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package usage
|
||||
|
||||
class Usage {
|
||||
val x: Int
|
||||
get() = inline.f()
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/inline/InlineKt.class
|
||||
out/production/module/inline/InlinePackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/inline.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/usage/TopLevelUsageKt.class
|
||||
out/production/module/usage/Usage.class
|
||||
out/production/module/usage/UsagePackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/Usage.kt
|
||||
src/topLevelUsage.kt
|
||||
End of files
|
||||
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 0
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 1
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package usage
|
||||
|
||||
fun other() {}
|
||||
@@ -0,0 +1,4 @@
|
||||
package usage
|
||||
|
||||
val y: Int
|
||||
get() = inline.f()
|
||||
@@ -0,0 +1,17 @@
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/inline/InlineKt.class
|
||||
out/production/module/inline/InlinePackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/inline.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/usage/UsageKt$usage$use$1.class
|
||||
out/production/module/usage/UsageKt.class
|
||||
out/production/module/usage/UsagePackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/usage.kt
|
||||
End of files
|
||||
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 0
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 1
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package usage
|
||||
|
||||
fun other() {}
|
||||
@@ -0,0 +1,6 @@
|
||||
package usage
|
||||
|
||||
fun usage() {
|
||||
val use = { inline.f() }
|
||||
use()
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/inline/InlineKt.class
|
||||
out/production/module/inline/InlinePackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/inline.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/usage/UsageKt$usage$1.class
|
||||
out/production/module/usage/UsageKt.class
|
||||
out/production/module/usage/UsagePackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/usage.kt
|
||||
End of files
|
||||
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 0
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 1
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package usage
|
||||
|
||||
fun other() {}
|
||||
@@ -0,0 +1,9 @@
|
||||
package usage
|
||||
|
||||
fun usage() {
|
||||
fun use() {
|
||||
inline.f()
|
||||
}
|
||||
|
||||
use()
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package usage
|
||||
|
||||
class Usage {
|
||||
fun use() {
|
||||
val x = inline.f()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/inline/InlineKt.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/Usage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/Usage.kt
|
||||
End of files
|
||||
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 0
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 1
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package usage
|
||||
|
||||
fun other() {}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/inline/InlineKt.class
|
||||
out/production/module/inline/InlinePackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/inline.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/usage/UsageKt.class
|
||||
out/production/module/usage/UsagePackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/usage.kt
|
||||
End of files
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 0
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 1
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package usage
|
||||
|
||||
fun other() {}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package usage
|
||||
|
||||
fun usage(x: Int = inline.f()) {}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
package usage
|
||||
|
||||
class Usage(val x: Int = inline.f())
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/inline/InlineKt.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/Usage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/Usage.kt
|
||||
End of files
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 0
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 1
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
package usage
|
||||
|
||||
fun other() {}
|
||||
@@ -0,0 +1,3 @@
|
||||
package usage
|
||||
|
||||
class Usage : UsageBase(inline.f())
|
||||
@@ -0,0 +1,3 @@
|
||||
package usage
|
||||
|
||||
abstract class UsageBase(val x: Int)
|
||||
@@ -0,0 +1,14 @@
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/inline/InlineKt.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/Usage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/Usage.kt
|
||||
End of files
|
||||
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 0
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 1
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package usage
|
||||
|
||||
fun other() {}
|
||||
@@ -0,0 +1,5 @@
|
||||
package usage
|
||||
|
||||
class Usage(val x: Int) {
|
||||
constructor() : this(inline.f())
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/inline/InlineKt.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/Usage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/Usage.kt
|
||||
End of files
|
||||
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 0
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 1
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package usage
|
||||
|
||||
fun other() {}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package usage
|
||||
|
||||
object Usage {
|
||||
val x = inline.f()
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/inline/InlineKt.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/Usage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/Usage.kt
|
||||
End of files
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 0
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 1
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package usage
|
||||
|
||||
fun other() {}
|
||||
@@ -0,0 +1,16 @@
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/inline/InlineKt.class
|
||||
out/production/module/inline/InlinePackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/inline.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/usage/UsageKt.class
|
||||
out/production/module/usage/UsagePackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/usage.kt
|
||||
End of files
|
||||
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 0
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package inline
|
||||
|
||||
inline fun f(): Int {
|
||||
return 1
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package usage
|
||||
|
||||
fun other() {}
|
||||
Reference in New Issue
Block a user