You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, all the assertThat methods have assertWithMessage versions.
assertThrows is kind of special and I don't think we can do quite the same thing, but there should be some way to add support for a custom message.
I had a loop in some of my code that tested several inputs against an assertThrows check, but when one of them failed, I didn't have any idea of which one. It would have been nice to do something like
for (badInput in listOf(...)) {
assertThrows<...>("Testing exceptions for input case $badInput...") { ... }
}
The text was updated successfully, but these errors were encountered:
bitspittle
changed the title
assertThrows with a message
Feature Request: Support assertThrows with a message
Apr 4, 2022
Currently, all the assertThat methods have assertWithMessage versions.
assertThrows is kind of special and I don't think we can do quite the same thing, but there should be some way to add support for a custom message.
I had a loop in some of my code that tested several inputs against an assertThrows check, but when one of them failed, I didn't have any idea of which one. It would have been nice to do something like
The text was updated successfully, but these errors were encountered: