Merge boxWithStdlib testData into box, delete BoxWithStdlib test

This commit is contained in:
Alexander Udalov
2016-03-07 13:36:14 +03:00
committed by Alexander Udalov
parent 22bfc9786a
commit 06a67e6602
535 changed files with 3520 additions and 3871 deletions
@@ -0,0 +1,25 @@
// WITH_REFLECT
import kotlin.reflect.*
class A {
val foo: String = "member"
val Unit.foo: String get() = "extension"
}
fun box(): String {
run {
val foo: KProperty1<A, *> = A::class.java.kotlin.memberProperties.single()
assert(foo.name == "foo") { "Fail name: $foo (${foo.name})" }
assert(foo.get(A()) == "member") { "Fail value: ${foo.get(A())}" }
}
run {
val foo: KProperty2<A, *, *> = A::class.java.kotlin.memberExtensionProperties.single()
assert(foo.name == "foo") { "Fail name: $foo (${foo.name})" }
foo as KProperty2<A, Unit, *>
assert(foo.get(A(), Unit) == "extension") { "Fail value: ${foo.get(A(), Unit)}" }
}
return "OK"
}