macro_rules! should_error {
(
$(#[$attr:meta])*
$vis:vis fn $name:ident() -> $ret_ty:ty $body:block
) => { ... };
(
$(#[$attr:meta])*
$vis:vis fn $name:ident() -> $ret_ty:ty $body:block,
expected = $expected:pat
) => { ... };
(
$(#[$attr:meta])*
$vis:vis fn $name:ident($($arg:ident: $arg_ty:ty,)+) -> $ret_ty:ty $body:block
$(, expected = $expected:pat)?
) => { ... };
}Expand description
Wraps a function that takes nothing and returns a Result, panicking if the result is Ok.
See the crate-level documentation for more information.