All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.io.gianluigip.spectacle.dsl.assertions.AssertionUtils.kt Maven / Gradle / Ivy

The newest version!
package io.gianluigip.spectacle.dsl.assertions

import kotlin.test.fail

@AssertionDslMarker
fun runAndCatch(block: () -> Unit): Throwable {
    try {
        block.invoke()
        fail("Expected to catch an exception")
    } catch (throwable: Throwable) {
        return throwable
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy