Support reflection tests on Android
This commit is contained in:
+5
-4
@@ -1,5 +1,6 @@
|
||||
// IGNORE_BACKEND: JVM_IR, JS_IR, JS, NATIVE
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
@@ -21,13 +22,13 @@ interface I3 {
|
||||
interface I : I2, I1, I3
|
||||
|
||||
fun box(): String {
|
||||
assertEquals("fun I.f(): kotlin.Unit", I::f.toString())
|
||||
assertEquals("val I.x: kotlin.Int", I::x.toString())
|
||||
assertEquals("fun test.I.f(): kotlin.Unit", I::f.toString())
|
||||
assertEquals("val test.I.x: kotlin.Int", I::x.toString())
|
||||
|
||||
val f = I::class.members.single { it.name == "f" }
|
||||
assertEquals("fun I.f(): kotlin.Unit", f.toString())
|
||||
assertEquals("fun test.I.f(): kotlin.Unit", f.toString())
|
||||
val x = I::class.members.single { it.name == "x" }
|
||||
assertEquals("val I.x: kotlin.Int", x.toString())
|
||||
assertEquals("val test.I.x: kotlin.Int", x.toString())
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user