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
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
class Test {
|
||||
private var iv = 1
|
||||
|
||||
public fun exec() {
|
||||
val t = object : Thread() {
|
||||
override fun run() {
|
||||
Test::iv.get(this@Test)
|
||||
Test::iv.set(this@Test, 2)
|
||||
}
|
||||
}
|
||||
t.start()
|
||||
t.join(1000)
|
||||
}
|
||||
|
||||
fun result() = if (iv == 2) "OK" else "Fail $iv"
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val t = Test()
|
||||
t.exec()
|
||||
return t.result()
|
||||
}
|
||||
Reference in New Issue
Block a user