I thought assertFailsWith should fail when wrong e...
# kotlin-native
p
I thought assertFailsWith should fail when wrong exception is caught, but this seems to be successful: val block: () -> Unit = { “a string”._toInt_() } _assertFailsWith_<IllegalArgumentException>(block = block) What am I missing?
m
NumberFormatException
inherits from
IllegalArgumentException
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-number-format-exception/ Which likely is why the test passes
👍 1