assertRaisesWith

inline fun <Failure> assertRaisesWith(block: Raise<Any?>.() -> Any?)(source)

Deprecated

This function has been renamed checkThrows.

Replace with

opensavvy.prepared.compat.arrow.core.checkRaises<Failure>(block)

Fails the test if block doesn't raise with a value of type Failure.

Example

test("√-1 raises") {
assertRaisesWith<NegativeSquareRoot> {
sqrt(-1.0)
}
}