Introduce 'fail' method to throw AssertionError with cause

#KT-37804

(cherry picked from commit 0449df5f64b1c2f639786d1865979662331f56d6)
This commit is contained in:
Ilya Gorbunov
2020-03-26 01:00:53 +03:00
committed by Vasily Levchenko
parent 656ac4b921
commit c80e6be658
@@ -38,4 +38,10 @@ internal actual fun <T : Throwable> checkResultIsFailure(exceptionClass: KClass<
)
}
/** Platform-specific construction of AssertionError with cause */
@Suppress("NOTHING_TO_INLINE")
internal actual inline fun AssertionErrorWithCause(message: String?, cause: Throwable?): AssertionError =
AssertionError(message, cause)
internal actual fun lookupAsserter(): Asserter = DefaultAsserter