Package-level declarations
Types
The scope in which assertions are executed.
Functions
Executes the given assertion checker within the current assertion scope.
inline fun <Value> Expect<Value>.assert(checker: (Value) -> AssertionScope.Assertion)
Executes the given assertion checker and consumes its result.
Invokes the given assertion block with this AssertionScope as the context receiver.
infix fun Expect<Any?>.notToBeTheSameInstanceAs(expected: Any?)
Asserts that the exposed value is not the same instance as the expected value using !== comparison.
inline fun Expect.Companion.notToThrow(crossinline block: () -> Unit)
Asserts that the given block does not throw any exception.
inline fun <Result> Expect.Companion.notToThrow(crossinline block: () -> Result, checker: Expect<Result>.() -> Unit)
Executes the given assertion block in a "soft" mode within the current assertion scope.
Executes the given assertion block in a "soft" mode, collecting all assertion failures and reporting them together at the end.
infix fun <Element : Comparable<Element>> Expect<Element>.toBeGreaterThan(expected: Element)
Asserts that the exposed value is greater than the expected value.
infix fun <Element : Comparable<Element>> Expect<Element>.toBeGreaterThanOrEqualTo(expected: Element)
Asserts that the exposed value is greater than or equal to the expected value.
infix fun <Element : Comparable<Element>> Expect<Element>.toBeLessThan(expected: Element)
Asserts that the exposed value is less than the expected value.
infix fun <Element : Comparable<Element>> Expect<Element>.toBeLessThanOrEqualTo(expected: Element)
Asserts that the exposed value is less than or equal to the expected value.
Asserts that the exposed value is the same instance as the expected value using === comparison.
inline fun Expect.Companion.toThrow(crossinline block: () -> Unit)
Asserts that the given block throws an exception.
inline fun <ThrowableType : Throwable> Expect.Companion.toThrow(crossinline block: () -> Unit)
Asserts that the given block throws an exception of the specified type ThrowableType.
inline fun <ThrowableType : Throwable> Expect.Companion.toThrow(crossinline block: () -> Unit, checker: Expect<ThrowableType>.() -> Unit)
Asserts that the given block throws an exception of the specified type ThrowableType, and if it does, asserts on the thrown exception using the provided checker.
inline fun Expect.Companion.toThrow(crossinline block: () -> Unit, checker: Expect<Throwable>.() -> Unit)
Transforms an Expect assertion from one value type to another using a lazily-evaluated provider function.
inline fun withClue(crossinline clue: () -> String, block: context(AssertionScope) () -> Unit)
Executes the given assertion block with a lazily-evaluated clue that is prefixed to any assertion failure messages within the current assertion scope.
inline fun withClue(clue: String, block: context(AssertionScope) () -> Unit)