Macro nakamoto_test::assert_matches
source · macro_rules! assert_matches {
( $e:expr , $($pat:pat_param)|+ ) => { ... };
( $e:expr , $($pat:pat_param)|+ if $cond:expr ) => { ... };
( $e:expr , $($pat:pat_param)|+ => $arm:expr ) => { ... };
( $e:expr , $($pat:pat_param)|+ if $cond:expr => $arm:expr ) => { ... };
( $e:expr , $($pat:pat_param)|+ , $($arg:tt)* ) => { ... };
( $e:expr , $($pat:pat_param)|+ if $cond:expr , $($arg:tt)* ) => { ... };
( $e:expr , $($pat:pat_param)|+ => $arm:expr , $($arg:tt)* ) => { ... };
( $e:expr , $($pat:pat_param)|+ if $cond:expr => $arm:expr , $($arg:tt)* ) => { ... };
}
Expand description
Asserts that an expression matches a given pattern.
A guard expression may be supplied to add further restrictions to the expected value of the expression.
A match
arm may be supplied to perform additional assertions or to yield
a value from the macro invocation.