[K/N][tests] Migrate link tests to new testing infra ^KT-61259
This commit is contained in:
committed by
Space Team
parent
588549d1d0
commit
d6a922bc74
@@ -0,0 +1,31 @@
|
||||
// MODULE: lib
|
||||
// FILE: lib.kt
|
||||
|
||||
package a
|
||||
|
||||
interface A<T> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
open class C: A<Int> {
|
||||
override fun foo(): Int = 42
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// FILE: main.kt
|
||||
|
||||
import a.*
|
||||
import kotlin.test.*
|
||||
|
||||
class B: C()
|
||||
|
||||
fun box(): String {
|
||||
val b = B()
|
||||
assertEquals(42, b.foo())
|
||||
val c: C = b
|
||||
assertEquals(42, c.foo())
|
||||
val a: A<Int> = b
|
||||
assertEquals(42, a.foo())
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user