kotest-assertions / io.kotest.assertions / withClue

withClue

inline fun <R> withClue(clue: Any, thunk: () -> R): R

Add clue as additional info to the assertion error message in case an assertion fails. Can be nested, the error message will contain all available clues.

Parameters

thunk - the code with assertions to be executed

Return
the return value of the supplied thunk