-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change generic
assertFails
to assertFailure
with specific exception
- Loading branch information
1 parent
707fa0b
commit bae8753
Showing
5 changed files
with
50 additions
and
29 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
mosaic-runtime/src/commonTest/kotlin/com/jakewharton/mosaic/assertk.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.jakewharton.mosaic | ||
|
||
import assertk.Assert | ||
import assertk.assertFailure as originalAssertFailure | ||
import assertk.assertions.isInstanceOf | ||
|
||
inline fun <reified T : Throwable> assertFailure(block: () -> Unit): Assert<T> { | ||
return originalAssertFailure(block).isInstanceOf<T>() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters