test_ok

Macro test_ok 

Source
macro_rules! test_ok {
    (
    $($target:tt)*
) => { ... };
}
Expand description

Wraps a function that takes nothing and returns something, failing the test if the result is not Ok. Shortcut for should_ok!.

// This macro invocation:
test_ok! { ... }
// Is equivalent to:
should_ok! { #[test] ... }

You probably don’t need this, since this is supported by #[test] directly. It exists solely for consistency.