add tests for incremental compilation: package members

Original commit: 0de9e8295a
This commit is contained in:
Michael Nedzelsky
2015-09-28 14:59:29 +03:00
parent d3d256e709
commit e654254c9f
17 changed files with 197 additions and 0 deletions
@@ -467,6 +467,24 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
doTest(fileName);
}
@TestMetadata("packageMultifileClassOneFileWithPublicChanges")
public void testPackageMultifileClassOneFileWithPublicChanges() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageMultifileClassOneFileWithPublicChanges/");
doTest(fileName);
}
@TestMetadata("packageMultifileClassPrivateOnlyChanged")
public void testPackageMultifileClassPrivateOnlyChanged() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageMultifileClassPrivateOnlyChanged/");
doTest(fileName);
}
@TestMetadata("packagePrivateOnlyChanged")
public void testPackagePrivateOnlyChanged() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packagePrivateOnlyChanged/");
doTest(fileName);
}
@TestMetadata("packageRecreated")
public void testPackageRecreated() throws Exception {
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageRecreated/");
@@ -0,0 +1,17 @@
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/test/TestPackage.class
out/production/module/test/Utils.class
out/production/module/test/Utils__Pkg1Kt.class
out/production/module/test/Utils__Pkg2Kt.class
End of files
Compiling files:
src/pkg1.kt
src/pkg2.kt
End of files
Cleaning output files:
out/production/module/test/Usage.class
End of files
Compiling files:
src/usage.kt
End of files
@@ -0,0 +1,12 @@
@file:JvmName("Utils")
@file:JvmMultifileClass
package test
fun commonFun1() {}
// TODO uncomment when generated value will also be private in bytecode
//private val deletedVal1: Int = 20
private fun deletedFun1(): Int = 10
private fun changedFun1(arg: Int) {}
@@ -0,0 +1,12 @@
@file:JvmName("Utils")
@file:JvmMultifileClass
package test
fun commonFun1() {}
// TODO uncomment when generated value will also be private in bytecode
//private val addedVal1: Int = 20
private fun addedFun1(): Int = 50
private fun changedFun1(arg: String) {}
@@ -0,0 +1,14 @@
@file:JvmName("Utils")
@file:JvmMultifileClass
package test
fun commonFun2() {}
fun publicDeletedFun2() {}
// TODO uncomment when generated value will also be private in bytecode
//private val deletedVal2: Int = 20
private fun deletedFun2(): Int = 10
private fun changedFun2(arg: Int) {}
@@ -0,0 +1,14 @@
@file:JvmName("Utils")
@file:JvmMultifileClass
package test
fun commonFun2() {}
fun publicAddedFun2() {}
// TODO uncomment when generated value will also be private in bytecode
//private val addedVal2: Int = 20
private fun addedFun2(): Int = 50
private fun changedFun2(arg: String) {}
@@ -0,0 +1,8 @@
package test
class Usage {
fun f() {
commonFun1()
commonFun2()
}
}
@@ -0,0 +1,11 @@
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/test/TestPackage.class
out/production/module/test/Utils.class
out/production/module/test/Utils__Pkg1Kt.class
out/production/module/test/Utils__Pkg2Kt.class
End of files
Compiling files:
src/pkg1.kt
src/pkg2.kt
End of files
@@ -0,0 +1,12 @@
@file:JvmName("Utils")
@file:JvmMultifileClass
package test
fun commonFun1() {}
// TODO uncomment when generated value will also be private in bytecode
//private val deletedVal1: Int = 20
private fun deletedFun1(): Int = 10
private fun changedFun1(arg: Int) {}
@@ -0,0 +1,12 @@
@file:JvmName("Utils")
@file:JvmMultifileClass
package test
fun commonFun1() {}
// TODO uncomment when generated value will also be private in bytecode
//private val addedVal1: Int = 20
private fun addedFun1(): Int = 50
private fun changedFun1(arg: String) {}
@@ -0,0 +1,12 @@
@file:JvmName("Utils")
@file:JvmMultifileClass
package test
fun commonFun2() {}
// TODO uncomment when generated value will also be private in bytecode
//private val deletedVal2: Int = 20
private fun deletedFun2(): Int = 10
private fun changedFun2(arg: Int) {}
@@ -0,0 +1,12 @@
@file:JvmName("Utils")
@file:JvmMultifileClass
package test
fun commonFun2() {}
// TODO uncomment when generated value will also be private in bytecode
//private val addedVal2: Int = 20
private fun addedFun2(): Int = 50
private fun changedFun2(arg: String) {}
@@ -0,0 +1,8 @@
package test
class Usage {
fun f() {
commonFun1()
commonFun2()
}
}
@@ -0,0 +1,8 @@
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/test/PkgKt.class
out/production/module/test/TestPackage.class
End of files
Compiling files:
src/pkg.kt
End of files
@@ -0,0 +1,10 @@
package test
fun commonFun() {}
// TODO uncomment when generated value will also be private in bytecode
//private val deletedVal: Int = 20
private fun deletedFun(): Int = 10
private fun changedFun(arg: Int) {}
@@ -0,0 +1,10 @@
package test
fun commonFun() {}
// TODO uncomment when generated value will also be private in bytecode
//private val addedVal: Int = 20
private fun addedFun(): Int = 50
private fun changedFun(arg: String) {}
@@ -0,0 +1,7 @@
package test
class Usage {
fun f() {
commonFun()
}
}