Support reflection tests on Android
This commit is contained in:
@@ -2,14 +2,16 @@
|
||||
// IGNORE_BACKEND: JS_IR, JS, NATIVE
|
||||
// WITH_REFLECT
|
||||
|
||||
package test
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
enum class E { X, Y, Z }
|
||||
|
||||
fun box(): String {
|
||||
assertEquals("fun values(): kotlin.Array<E>", E::values.toString())
|
||||
assertEquals("fun values(): kotlin.Array<test.E>", E::values.toString())
|
||||
assertEquals(listOf(E.X, E.Y, E.Z), E::values.call().toList())
|
||||
assertEquals("fun valueOf(kotlin.String): E", E::valueOf.toString())
|
||||
assertEquals("fun valueOf(kotlin.String): test.E", E::valueOf.toString())
|
||||
assertEquals(E.Y, E::valueOf.call("Y"))
|
||||
|
||||
return "OK"
|
||||
|
||||
+3
-1
@@ -5,6 +5,8 @@
|
||||
|
||||
// WITH_REFLECT
|
||||
|
||||
package test
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
interface H<T> {
|
||||
@@ -14,7 +16,7 @@ interface H<T> {
|
||||
interface A : H<A>
|
||||
|
||||
fun box(): String {
|
||||
assertEquals("A?", A::foo.returnType.toString())
|
||||
assertEquals("test.A?", A::foo.returnType.toString())
|
||||
assertEquals("T?", H<A>::foo.returnType.toString())
|
||||
|
||||
return "OK"
|
||||
|
||||
Reference in New Issue
Block a user