Macro assertables::assert_fn_ok_ge[][src]

macro_rules! assert_fn_ok_ge {
    ($function:path, $left:expr, $right:expr $(,)?) => { ... };
    ($function:path, $left:expr, $right:expr, $($arg:tt)+) => { ... };
}
Expand description

Assert one function ok() is greater than or equal to another function ok().

  • When true, return ().

  • Otherwise, call panic! with a message and the values of the expressions with their debug representations.

Example

assert_fn_ok_ge!(i32::from_str, "2", "1");
//-> ()
// use std::str::FromStr;
// assert_fn_ok_ge!(i32::from_str, "1", "2");
//-> panic!("assertion failed: `assert_fn_ok_ge(fn, left, right)`\n  left input: `\"1\"`\n right input: `\"2\"`\n  left output: `1`\n right output: `2`")

This macro has a second form where a custom message can be provided.