[Test] Update testdata of CompileKotlinAgainstCustomBinariesTest
This commit is contained in:
+18
-39
@@ -9,6 +9,7 @@ import com.intellij.openapi.util.io.FileUtil
|
||||
import junit.framework.TestCase
|
||||
import org.jetbrains.kotlin.cli.WrongBytecodeVersionTest
|
||||
import org.jetbrains.kotlin.cli.common.CLICompiler
|
||||
import org.jetbrains.kotlin.cli.common.ExitCode
|
||||
import org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport
|
||||
import org.jetbrains.kotlin.cli.common.messages.MessageRenderer
|
||||
import org.jetbrains.kotlin.cli.common.messages.PrintingMessageCollector
|
||||
@@ -382,7 +383,17 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration
|
||||
}
|
||||
|
||||
fun testRequireKotlinInNestedClassesAgainst13() {
|
||||
val library = compileLibrary("library", additionalOptions = listOf("-language-version", "1.3"))
|
||||
val library = compileLibrary(
|
||||
"library",
|
||||
additionalOptions = listOf("-language-version", "1.3"),
|
||||
checkKotlinOutput = { actual ->
|
||||
assertEquals(
|
||||
normalizeOutput(
|
||||
"warning: language version 1.3 is deprecated and its support will be removed in a future version of Kotlin\n" to ExitCode.OK
|
||||
), actual
|
||||
)
|
||||
}
|
||||
)
|
||||
compileKotlin("source.kt", tmpdir, listOf(library))
|
||||
}
|
||||
|
||||
@@ -543,43 +554,6 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration
|
||||
compileKotlin("source.kt", tmpdir, listOf(library))
|
||||
}
|
||||
|
||||
fun testReleaseCoroutineCallFromExperimental() {
|
||||
val library = compileLibrary(
|
||||
"library",
|
||||
additionalOptions = listOf("-language-version", "1.3", "-api-version", "1.3"),
|
||||
checkKotlinOutput = {}
|
||||
)
|
||||
compileKotlin(
|
||||
"experimental.kt",
|
||||
tmpdir,
|
||||
listOf(library),
|
||||
additionalOptions = listOf("-language-version", "1.2", "-Xskip-metadata-version-check")
|
||||
)
|
||||
}
|
||||
|
||||
fun testExperimentalCoroutineCallFromRelease() {
|
||||
doTestExperimentalCoroutineCallFromRelease()
|
||||
}
|
||||
|
||||
fun testExperimentalCoroutineCallFromReleaseWarnings() {
|
||||
doTestExperimentalCoroutineCallFromRelease()
|
||||
}
|
||||
|
||||
private fun doTestExperimentalCoroutineCallFromRelease() {
|
||||
val library = compileLibrary(
|
||||
"library",
|
||||
additionalOptions = listOf("-language-version", "1.2"),
|
||||
checkKotlinOutput = {},
|
||||
extraClassPath = listOf(ForTestCompileRuntime.coroutinesCompatForTests())
|
||||
)
|
||||
compileKotlin(
|
||||
"release.kt",
|
||||
tmpdir,
|
||||
listOf(library, ForTestCompileRuntime.coroutinesCompatForTests()),
|
||||
additionalOptions = listOf("-language-version", "1.3", "-api-version", "1.3")
|
||||
)
|
||||
}
|
||||
|
||||
fun testInternalFromForeignModule() {
|
||||
compileKotlin("source.kt", tmpdir, listOf(compileLibrary("library")))
|
||||
}
|
||||
@@ -601,7 +575,12 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration
|
||||
|
||||
fun testJvmDefaultCompatibilityAgainstJava() {
|
||||
val library = compileLibrary("library", additionalOptions = listOf("-Xjvm-default=disable"))
|
||||
compileKotlin("source.kt", tmpdir, listOf(library), additionalOptions = listOf("-jvm-target", "1.8", "-Xjvm-default=all-compatibility"))
|
||||
compileKotlin(
|
||||
"source.kt",
|
||||
tmpdir,
|
||||
listOf(library),
|
||||
additionalOptions = listOf("-jvm-target", "1.8", "-Xjvm-default=all-compatibility")
|
||||
)
|
||||
}
|
||||
|
||||
fun testInternalFromForeignModuleJs() {
|
||||
|
||||
Reference in New Issue
Block a user