expect

Common
JVM
JS
Native
1.0
fun <T> expect(expected: T, block: () -> T): Unit

Asserts that given function block returns the given expected value.

Common
JVM
JS
Native
1.0
fun <T> expect(
    expected: T,
    message: String?,
    block: () -> T
): Unit

Asserts that given function block returns the given expected value and use the given message if it fails.