Skip to content

Commit dd2ad94

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

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
@@ -41,8 +41,9 @@ class LinChecker (private val testClass: Class<*>, options: Options<*, *>?) {
4141
* @throws LincheckAssertionError if the testing data structure is incorrect.
4242
*/
4343
fun check() {
44-
val failure = checkImpl() ?: return
45-
throw LincheckAssertionError(failure)
44+
checkImpl { failure ->
45+
if (failure != null) throw LincheckAssertionError(failure)
46+
}
4647
}
4748

4849
/**

0 commit comments

Comments
 (0)