sf_assert

Macro sf_assert 

Source
macro_rules! sf_assert {
    ($cond:expr $(,)?) => { ... };
    ($cond:expr, $($arg:tt)+) => { ... };
}
Expand description

Passes if Condition is true.

Evaluates the condition and passes if it is true. Otherwise, the test is marked as failure. The optional string is printed on failure.

ยงExamples

let my_variable = 37;
sf_assert!(my_variable == 37);
fn my_function() -> bool {
    return false;
}

sf_assert!(my_function(), "this test is a failure");