[Test] Move KotlinAgainstKotlin tests under BlackBoxCodegen tests

This commit is contained in:
Dmitriy Novozhilov
2021-01-22 15:13:50 +03:00
parent 1ea4fa4464
commit 5c8d555808
147 changed files with 3749 additions and 2743 deletions
@@ -0,0 +1,33 @@
// IGNORE_BACKEND_FIR: JVM_IR
// MODULE: lib
// FILE: A.kt
// FULL_JDK
package test
import java.util.concurrent.Callable
class A(val callable: Callable<String>)
inline fun doWork(noinline job: () -> String): Callable<String> {
val a = A(Callable(job))
return a.callable
}
var sameModule = doWork { "O" }
// MODULE: main(lib)
// FILE: B.kt
import test.*
fun box(): String {
val anotherModule = doWork { "K" }
if (sameModule.javaClass.name == anotherModule.javaClass.name) return "class should be regenerated, but ${anotherModule.javaClass.name}"
if (sameModule.javaClass.name.contains("inlined")) return "Sam in same module shouldn't be copied, but ${sameModule.javaClass.name}"
if (!anotherModule.javaClass.name.contains("inlined")) return "Sam in another module should be copied, but ${sameModule.javaClass.name}"
return sameModule.call() + anotherModule.call()
}