assertFailsWith: set unexpected exception as a cause of assertion error
#KT-23514 (cherry picked from commit 3c4b86fc79f9dbb6053057fad012544ae330c00f)
This commit is contained in:
committed by
Vasily Levchenko
parent
c80e6be658
commit
464ee8c3bb
@@ -33,7 +33,7 @@ internal actual fun <T : Throwable> checkResultIsFailure(exceptionClass: KClass<
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
return e as T
|
||||
}
|
||||
asserter.fail(messagePrefix(message) + "Expected an exception of ${exceptionClass.qualifiedName} to be thrown, but was $e")
|
||||
asserter.fail(messagePrefix(message) + "Expected an exception of ${exceptionClass.qualifiedName} to be thrown, but was $e", e)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user