[K/N][tests] Migrate termination runtime tests to new testing infra ^KT-61259
This commit is contained in:
committed by
Space Team
parent
226ee3c367
commit
04a2a2d90d
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// EXIT_CODE: !0
|
||||
// OUTPUT_REGEX: Hook\nUncaught Kotlin exception: kotlin\.Error: an error\n(?!.*FAIL.*).*
|
||||
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
fun main() {
|
||||
setUnhandledExceptionHook {
|
||||
println("Hook")
|
||||
terminateWithUnhandledException(it)
|
||||
}
|
||||
|
||||
processUnhandledException(Error("an error"))
|
||||
println("FAIL")
|
||||
}
|
||||
Reference in New Issue
Block a user