JVM_IR: add a test for when(enum) binary compatibility
This commit is contained in:
+11
@@ -519,6 +519,17 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration
|
||||
.loadClass("SourceKt").getDeclaredMethod("run").invoke(null)
|
||||
}
|
||||
|
||||
fun testChangedEnumsInLibrary() {
|
||||
val oldLibrary = compileLibrary("old", checkKotlinOutput = {})
|
||||
val newLibrary = compileLibrary("new", checkKotlinOutput = {})
|
||||
compileKotlin("source.kt", tmpdir, listOf(oldLibrary))
|
||||
|
||||
val result =
|
||||
URLClassLoader(arrayOf(newLibrary.toURI().toURL(), tmpdir.toURI().toURL()), ForTestCompileRuntime.runtimeJarClassLoader())
|
||||
.loadClass("SourceKt").getDeclaredMethod("run").invoke(null) as String
|
||||
assertEquals("ABCAB", result)
|
||||
}
|
||||
|
||||
fun testClassFromJdkInLibrary() {
|
||||
val library = compileLibrary("library")
|
||||
compileKotlin("source.kt", tmpdir, listOf(library))
|
||||
|
||||
Reference in New Issue
Block a user