assert_ok

Macro assert_ok 

Source
macro_rules! assert_ok {
    ( $e:expr ) => { ... };
    ( $e:expr, ) => { ... };
    ( $x:expr , $y:expr $(,)? ) => { ... };
    ( $x:expr, $y:expr $(,)?, $($msg:tt)+) => { ... };
}
Expand description

wrapper over assert! macros for Ok’s

Make sure something is Ok(_) without caring about return value. assert_ok!(fun());

Against an expected value, e.g Ok(true) assert_ok!(fun(), true);

or the message variant, assert_ok!(fun(), Ok(_), “the storage is not ok”);