Skip to content

Commit

Permalink
Ensure LincheckAssertionError is thrown under Lincheck java-agent
Browse files Browse the repository at this point in the history
Signed-off-by: Evgeniy Moiseenko <[email protected]>
  • Loading branch information
eupp committed May 20, 2024
1 parent 200e12e commit c6bc1f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/jvm/main/org/jetbrains/kotlinx/lincheck/LinChecker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ class LinChecker (private val testClass: Class<*>, options: Options<*, *>?) {
* @throws LincheckAssertionError if the testing data structure is incorrect.
*/
fun check() {
val failure = checkImpl() ?: return
throw LincheckAssertionError(failure)
checkImpl { failure ->
if (failure != null) throw LincheckAssertionError(failure)
}
}

/**
Expand Down

0 comments on commit c6bc1f9

Please sign in to comment.