Move some tests from boxWithStdlib/ to box/
Move those tests which do not require neither stdlib nor reflect
This commit is contained in:
committed by
Alexander Udalov
parent
54a615fcd3
commit
20e36438e2
+31
@@ -0,0 +1,31 @@
|
||||
var state = ""
|
||||
|
||||
var topLevel: Int
|
||||
get() {
|
||||
state += "1"
|
||||
return 42
|
||||
}
|
||||
set(value) {
|
||||
throw AssertionError("Nooo")
|
||||
}
|
||||
|
||||
class A {
|
||||
val member: String
|
||||
get() {
|
||||
state += "2"
|
||||
return "42"
|
||||
}
|
||||
}
|
||||
|
||||
val A.ext: Any
|
||||
get() {
|
||||
state += "3"
|
||||
return this
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
(::topLevel)()
|
||||
(A::member)(A())
|
||||
(A::ext)(A())
|
||||
return if (state == "123") "OK" else "Fail $state"
|
||||
}
|
||||
Reference in New Issue
Block a user