Merge boxWithStdlib testData into box, delete BoxWithStdlib test
This commit is contained in:
committed by
Alexander Udalov
parent
22bfc9786a
commit
06a67e6602
@@ -0,0 +1,19 @@
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
|
||||
fun box(): String {
|
||||
val obj = "" as java.lang.Object
|
||||
try {
|
||||
obj.wait(1)
|
||||
return "Fail: exception should have been thrown"
|
||||
}
|
||||
catch (e: IllegalMonitorStateException) {
|
||||
// OK
|
||||
}
|
||||
|
||||
synchronized (obj) {
|
||||
obj.wait(1)
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user