Skip to content

Commit c6bc1f9

Browse files
committed
Ensure LincheckAssertionError is thrown under Lincheck java-agent
Signed-off-by: Evgeniy Moiseenko <[email protected]>
1 parent 200e12e commit c6bc1f9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/jvm/main/org/jetbrains/kotlinx/lincheck/LinChecker.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ class LinChecker (private val testClass: Class<*>, options: Options<*, *>?) {
4242
* @throws LincheckAssertionError if the testing data structure is incorrect.
4343
*/
4444
fun check() {
45-
val failure = checkImpl() ?: return
46-
throw LincheckAssertionError(failure)
45+
checkImpl { failure ->
46+
if (failure != null) throw LincheckAssertionError(failure)
47+
}
4748
}
4849

4950
/**

0 commit comments

Comments
 (0)