Support reflection tests on Android
This commit is contained in:
+4
-2
@@ -5,6 +5,8 @@
|
||||
|
||||
// WITH_REFLECT
|
||||
|
||||
package test
|
||||
|
||||
import kotlin.reflect.full.*
|
||||
|
||||
class A {
|
||||
@@ -17,10 +19,10 @@ class A {
|
||||
|
||||
fun box(): String {
|
||||
val p = A::class.memberExtensionProperties.single()
|
||||
return if ("$p" == "var A.(kotlin.String.)id: kotlin.String") "OK" else "Fail $p"
|
||||
return if ("$p" == "var test.A.(kotlin.String.)id: kotlin.String") "OK" else "Fail $p"
|
||||
|
||||
val q = A::class.declaredFunctions.single()
|
||||
if ("$q" != "fun A.(kotlin.Int.)foo(): kotlin.Double") return "Fail q $q"
|
||||
if ("$q" != "fun test.A.(kotlin.Int.)foo(): kotlin.Double") return "Fail q $q"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user