rust-claim
rust-claim copied to clipboard
Would it make sense to have assert_err_eq?
Hello and thanks for a awesome crate! 🎉
While writing my tests and using claim
I've started wondering whether there should be an assert_err_eq
function. It feels like I don't only want to check if my result is an error, but that it is a specific error.
Any specific reason why such macro is missing?
I've also wondered about this. Several times I've wanted to use something similar to assert_ok_eq
to check that an Err
contains an expected value.
FYI, this macro is now published in the fork @mattwilkinsonn put together: https://crates.io/crates/claims