Clarify the purpose of the message parameter of assertFailsWith
#KT-22869 Fixed
This commit is contained in:
@@ -17,7 +17,11 @@ actual fun todo(block: () -> Unit) {
|
||||
}
|
||||
|
||||
|
||||
/** Asserts that a [block] fails with a specific exception of type [exceptionClass] being thrown. */
|
||||
/**
|
||||
* Asserts that a [block] fails with a specific exception of type [exceptionClass] being thrown.
|
||||
*
|
||||
* If the assertion fails, the specified [message] is used unless it is null as a prefix for the failure message.
|
||||
*/
|
||||
actual fun <T : Throwable> assertFailsWith(exceptionClass: KClass<T>, message: String?, block: () -> Unit): T {
|
||||
val exception = assertFails(message, block)
|
||||
@Suppress("INVISIBLE_MEMBER")
|
||||
|
||||
Reference in New Issue
Block a user