Short Version: How do I unit test a function that is supposed to panic ?
Long Version: I have a “sanity check” function which checks that certain structures are consistent – and on error, it the function is supposed to panic!(). Is there a way to unit test something of the form:
- here is a bad inconsistent state
- we want to make sure this function panic!()'s on iti