mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
This patch mutes the following test categories:
* Tests with java dependencies (System class,
java stdlib, jvm-oriented annotations etc).
* Coroutines tests.
* Reflection tests.
* Tests with an inheritance from the standard
collections.
38 lines
738 B
Kotlin
Vendored
38 lines
738 B
Kotlin
Vendored
// TODO: muted automatically, investigate should it be ran for JS or not
|
|
// IGNORE_BACKEND: JS, NATIVE
|
|
|
|
class A(var value: String)
|
|
|
|
fun box(): String {
|
|
val a = A("start")
|
|
|
|
try {
|
|
test(a)
|
|
} catch(e: java.lang.RuntimeException) {
|
|
|
|
}
|
|
|
|
if (a.value != "start, try, finally1, finally2") return "fail: ${a.value}"
|
|
|
|
return "OK"
|
|
}
|
|
|
|
fun test(a: A) : String {
|
|
while (a.value == "start") {
|
|
try {
|
|
try {
|
|
a.value += ", try"
|
|
continue
|
|
}
|
|
finally {
|
|
a.value += ", finally1"
|
|
}
|
|
}
|
|
finally {
|
|
a.value += ", finally2"
|
|
throw RuntimeException("fail")
|
|
}
|
|
}
|
|
return "fail"
|
|
}
|