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
Tests without fixtures work as expected with #[should_panic]. However, tests with fixtures don't. Using an expected message as in #[should_panic(expected = "whatever") doesn't work. The test will always fail, even if the panic message was correct. This diff demonstrates the problem
I had a look at this one and it seems to be tricky to solve. The problem occurs because if a test with a fixture fails, the library prints additional information on the fixtures' parametrisation. This seems to interfere with the expected message.
I have no quick fix for this at the moment, but I added a note to the documentation.
I'll try to address this issue in the next version, though I'm not sure if it's possible without sacrificing clearer error messages. As a workaround I'll try to add a matcher to the next version of the galvanic-assert library.
Tests without fixtures work as expected with
#[should_panic]
. However, tests with fixtures don't. Using anexpected
message as in#[should_panic(expected = "whatever")
doesn't work. The test will always fail, even if the panic message was correct. This diff demonstrates the problemThe text was updated successfully, but these errors were encountered: