junit has assertAll which allows you to perform all the required checks without throwing an exception for one of them, thereby ignoring the rest. For example:
assertAll(
{ assertEquals(a, b) },
{ assertEquals(c, d) },
)
Is there an analogue for the Kotlin language to perform several checks?
Something like checkAll, for example:
checkAll(
check(a == b) { "error 1" },
check(c == d) { "error 2" },
}
If both conditions are false, at the output we get:
error 1
error 2
You can construct something pretty simple that does that
so
will give a list with the strings that don't pass