FIR: copied 2 more gradle incremental IT for FIR
temporary, we need a proper test infrastructure to run all gradle IT with FIR
This commit is contained in:
+47
@@ -174,6 +174,32 @@ class KotlinGradleIT : BaseGradleIT() {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testIncrementalFir() {
|
||||
val project = Project("kotlinProject")
|
||||
val options = defaultBuildOptions().copy(incremental = true, useFir = true)
|
||||
|
||||
project.build("build", options = options) {
|
||||
assertSuccessful()
|
||||
assertNoWarnings()
|
||||
}
|
||||
|
||||
val greeterKt = project.projectDir.getFileByName("Greeter.kt")
|
||||
greeterKt.modify {
|
||||
it.replace("greeting: String", "greeting: CharSequence")
|
||||
}
|
||||
|
||||
project.build("build", options = options) {
|
||||
assertSuccessful()
|
||||
assertNoWarnings()
|
||||
val affectedSources = project.projectDir.getFilesByNames(
|
||||
"Greeter.kt", "KotlinGreetingJoiner.kt",
|
||||
"TestGreeter.kt", "TestKotlinGreetingJoiner.kt"
|
||||
)
|
||||
assertCompiledKotlinSources(project.relativize(affectedSources))
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testManyClassesIC() {
|
||||
val project = Project("manyClasses")
|
||||
@@ -452,6 +478,27 @@ class KotlinGradleIT : BaseGradleIT() {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testIncrementalFirTestCompile() {
|
||||
val project = Project("kotlinProject")
|
||||
val options = defaultBuildOptions().copy(incremental = true, useFir = true)
|
||||
|
||||
project.build("build", options = options) {
|
||||
assertSuccessful()
|
||||
}
|
||||
|
||||
val joinerKt = project.projectDir.getFileByName("KotlinGreetingJoiner.kt")
|
||||
joinerKt.modify {
|
||||
it.replace("class KotlinGreetingJoiner", "internal class KotlinGreetingJoiner")
|
||||
}
|
||||
|
||||
project.build("build", options = options) {
|
||||
assertSuccessful()
|
||||
val testJoinerKt = project.projectDir.getFileByName("TestKotlinGreetingJoiner.kt")
|
||||
assertCompiledKotlinSources(project.relativize(joinerKt, testJoinerKt))
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testLanguageVersionApiVersionExplicit() {
|
||||
val project = Project("kotlinProject")
|
||||
|
||||
Reference in New Issue
Block a user