macro_rules! assert_err {
( $x:expr , $y:pat $(,)? ) => { ... };
( $x:expr, $y:pat $(,)?, $($msg:tt)+) => { ... };
}Expand description
wrapper over assert!(matches!()) for Errors assert_err!(fun(), StorageError::Explosion)
or the message variant, assert_err!(fun(), StorageError::Explosion, “the storage did not explode”);