Merge boxWithStdlib testData into box, delete BoxWithStdlib test
This commit is contained in:
committed by
Alexander Udalov
parent
22bfc9786a
commit
06a67e6602
Vendored
+25
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user