std::assert_eq supports providing a custom panic message in a third argument (optionally followed by further parameters for the message arguments). pretty_assertions and similar-asserts both provide assert_eq! macros that are compatible.
snapbox however currently appears to hard-code it's panic message:
https://github.com/assert-rs/trycmd/blob/d73c84cda48aebda8a4b3fd404745c8bff0ab649/crates/snapbox/src/assert.rs#L55-L61
I think custom panic messages are a nice way to provide more context to a test failure, so I think it would be great if snapbox supported them.
std::assert_eqsupports providing a custom panic message in a third argument (optionally followed by further parameters for the message arguments).pretty_assertionsandsimilar-assertsboth provideassert_eq!macros that are compatible.snapboxhowever currently appears to hard-code it's panic message:https://github.com/assert-rs/trycmd/blob/d73c84cda48aebda8a4b3fd404745c8bff0ab649/crates/snapbox/src/assert.rs#L55-L61
I think custom panic messages are a nice way to provide more context to a test failure, so I think it would be great if snapbox supported them.