Files
kotlin-fork/native/native.tests/testData/standalone/termination/unhandledExceptionInWorkerExecuteAfter.kt
T
2024-03-15 01:28:01 +00:00

15 lines
332 B
Kotlin
Vendored

// EXIT_CODE: !0
// OUTPUT_REGEX: .*an error.*
// OUTPUT_REGEX: (?!.*Will not happen.*).*
import kotlin.test.*
import kotlin.native.concurrent.*
fun main() {
val worker = Worker.start()
worker.executeAfter(0L, {
throw Error("an error")
})
worker.requestTermination().result
println("Will not happen")
}