should_match

Macro should_match 

Source
macro_rules! should_match {
    (
    $(#[$attr:meta])*
    $vis:vis fn $name:ident() -> $ret_ty:ty $body:block,
    pattern = $pattern:pat
    $(, message = $message:literal)? $(,)?
) => { ... };
}
Expand description

Wraps a function that takes nothing and returns something, panicking if the result does not match the expected pattern.

See the crate-level documentation for more information.