Release flag. Check conflicts with `-jvm-target'

This commit is contained in:
Mikhael Bogdanov
2021-11-10 12:33:58 +01:00
committed by Space
parent c2d17ded33
commit a062eb04ac
8 changed files with 70 additions and 36 deletions
@@ -152,16 +152,23 @@ class Java11ModulesIntegrationTest : AbstractKotlinCompilerIntegrationTest() {
fun testReleaseFlagWrongValue() {
// Test that although we have moduleA in the module path, it's not in the module graph
// because we did not provide -Xadd-modules=moduleA
module("module5", additionalKotlinArguments = listOf("-Xrelease=5"))
module("module12", additionalKotlinArguments = listOf("-Xrelease=12"))
module("module5", additionalKotlinArguments = listOf("-Xjdk-release=5"))
module("module12", additionalKotlinArguments = listOf("-Xjdk-release=12"))
}
fun testReleaseFlag() {
// Test that although we have moduleA in the module path, it's not in the module graph
// because we did not provide -Xadd-modules=moduleA
module("module")
module("module11", additionalKotlinArguments = listOf("-Xrelease=11"))
module("moduleSwing", additionalKotlinArguments = listOf("-Xrelease=9"))
module("module11", additionalKotlinArguments = listOf("-Xjdk-release=11"))
module("moduleSwing", additionalKotlinArguments = listOf("-Xjdk-release=9"))
}
fun testReleaseFlagConflict() {
// Test that although we have moduleA in the module path, it's not in the module graph
// because we did not provide -Xadd-modules=moduleA
module("module9", additionalKotlinArguments = listOf("-Xjdk-release=9", "-jvm-target=10"))
module("module11", additionalKotlinArguments = listOf("-Xjdk-release=11", "-jvm-target=10"))
}
fun testNamedReadsTransitive() {