Macro more_asserts::assert_lt[][src]

macro_rules! assert_lt {
    ($left : expr, $right : expr) => { ... };
    ($left : expr, $right : expr,) => { ... };
    ($left : expr, $right : expr, $($msg_args : tt) +) => { ... };
}
Expand description

Panics if the first expression is not strictly less than the second. Requires that the values be comparable with <.

On failure, panics and prints the values out in a manner similar to prelude’s assert_eq!.

Optionally may take an additional message to display on failure, which is formatted using standard format syntax.

Example

#[macro_use]
extern crate more_asserts;

fn main() {
    assert_lt!(3, 4);
    assert_lt!(3, 4, "With a message");
    assert_lt!(3, 4, "With a formatted message: {}", "oh no");
}