macro_rules! sf_assert_some {
($cond:expr $(,)?) => { ... };
($cond:expr, $($arg:tt)+) => { ... };
}Expand description
Passes if the argument is an existing optional value.
Passes if the argument is an instance of Option::Some(T). Otherwise, the test is marked as failure.
ยงExamples
let empty = Option::Some();
sf_assert_some!(empty);let err = Option::None();
sf_assert_some!(err, "this test is a failure");