assert_not

Macro assert_not 

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

Asserts that a condition is NOT true.

Panics if the condition is true, does nothing if false.

ยงExamples

use assert_not::assert_not;
 
assert_not!(false);  // โœ“ Passes
assert_not!(2 + 2 == 5);  // โœ“ Passes
assert_not!(false, "Custom message");  // โœ“ With message
 
// These would panic:
// assert_not!(true);
// assert_not!(2 + 2 == 4);