Support reflection tests on Android

This commit is contained in:
Mikhael Bogdanov
2019-01-22 17:48:45 +01:00
parent 91980c5293
commit f2a51d3b80
49 changed files with 235 additions and 174 deletions
@@ -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"
}