Advance explicit Kotlin versions in gradle integration tests

1.0 and 1.1 are no longer supported starting from 1.4, new errors break tests
See KT-36146
This commit is contained in:
Pavel Kirpichenkov
2020-01-30 11:47:53 +03:00
parent 9f25fdcedc
commit 724eda8fdb
5 changed files with 18 additions and 14 deletions
@@ -451,18 +451,18 @@ class KotlinGradleIT : BaseGradleIT() {
} }
// check the arguments are always passed if specified explicitly // check the arguments are always passed if specified explicitly
updateBuildGradle("1.0", "1.0") updateBuildGradle("1.2", "1.2")
project.build("clean", "compileKotlin") { project.build("clean", "compileKotlin") {
assertSuccessful() assertSuccessful()
assertContains("-language-version 1.0") assertContains("-language-version 1.2")
assertContains("-api-version 1.0") assertContains("-api-version 1.2")
} }
updateBuildGradle("1.1", "1.1") updateBuildGradle("1.3", "1.3")
project.build("clean", "compileKotlin") { project.build("clean", "compileKotlin") {
assertSuccessful() assertSuccessful()
assertContains("-language-version 1.1") assertContains("-language-version 1.3")
assertContains("-api-version 1.1") assertContains("-api-version 1.3")
} }
} }
@@ -61,7 +61,7 @@ class SimpleKotlinGradleIT : BaseGradleIT() {
fun testLanguageVersion() { fun testLanguageVersion() {
Project("languageVersion").build("build") { Project("languageVersion").build("build") {
assertFailed() assertFailed()
assertContains("This type is sealed") assertContains("'break' and 'continue' are not allowed in 'when' statements")
} }
} }
@@ -12,7 +12,7 @@ class UpToDateIT : BaseGradleIT() {
testMutations( testMutations(
*propertyMutationChain( *propertyMutationChain(
"compileKotlin.kotlinOptions.languageVersion", "compileKotlin.kotlinOptions.languageVersion",
"null", "'1.1'", "'1.0'", "null" "null", "'1.3'", "'1.2'", "null"
) )
) )
} }
@@ -22,7 +22,7 @@ class UpToDateIT : BaseGradleIT() {
testMutations( testMutations(
*propertyMutationChain( *propertyMutationChain(
"compileKotlin.kotlinOptions.apiVersion", "compileKotlin.kotlinOptions.apiVersion",
"null", "'1.1'", "'1.0'", "null" "null", "'1.3'", "'1.2'", "null"
) )
) )
} }
@@ -17,7 +17,7 @@ repositories {
compileKotlin { compileKotlin {
kotlinOptions { kotlinOptions {
languageVersion = "1.0" languageVersion = "1.3"
apiVersion = "1.0" apiVersion = "1.3"
} }
} }
@@ -1,3 +1,7 @@
sealed class Base fun breakInWhen() {
while (true) {
class Derived : Base() when {
true -> break
}
}
}