9 lines
225 B
Kotlin
Vendored
9 lines
225 B
Kotlin
Vendored
fun expectThrowableMessage(block: () -> Unit): String {
|
|
try {
|
|
block()
|
|
throw AssertionError("no failure")
|
|
} catch (e: Throwable) {
|
|
return e.message ?: throw AssertionError("no message")
|
|
}
|
|
}
|