Prepared
Toggle table of contents
2.0.0-alpha.2
common
Platform filter
common
Switch theme
Search in API
Prepared
Compatibility with Arrow
/
opensavvy.prepared.compat.arrow.core
/
failOnRaise
fail
On
Raise
@
ExperimentalTraceApi
inline
fun
<
Failure
,
Success
>
failOnRaise
(
block
:
Raise
<
Failure
>
.
(
)
->
Success
)
:
Success
(
source
)
Fails the test if
block
raises.
Example
test("√4 does not raise") {
failOnRaise {
sqrt(4.0)
} shouldBe 2.0
}
Content copied to clipboard