macro_rules! rassert_notify_break {
    ($expr: expr, $notify: expr) => { ... };
}
Expand description

Helper macro to cleanly execute an expression and break a loop if it fails.

Example

use rassert_rs::rassert_notify_break;

fn main() {
    let mut i = 1;
    while i != 5 {
        rassert_notify_break!(42 != 42, println!("Yikes"));
        // Prints 'Yikes' and breaks the loop
        i += 1;
    }
    assert_eq!(i, 1);
}