Skip to content

Commit dfa3b51

Browse files
ansmanevant
authored andcommitted
Make assertFailure inline
This change makes `assertFailure` inline so it can be used to test suspending functions. This fixes #471
1 parent 96174f1 commit dfa3b51

File tree

1 file changed

+1
-1
lines changed
  • assertk/src/commonMain/kotlin/assertk

1 file changed

+1
-1
lines changed

assertk/src/commonMain/kotlin/assertk/assert.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ inline fun assertAll(f: () -> Unit) {
200200
/**
201201
* Asserts that the given block will throw an exception rather than complete successfully.
202202
*/
203-
fun assertFailure(f: () -> Unit): Assert<Throwable> {
203+
inline fun assertFailure(f: () -> Unit): Assert<Throwable> {
204204
@Suppress("TooGenericExceptionCaught") // Intentionally capturing all exceptions.
205205
try {
206206
f()

0 commit comments

Comments
 (0)