Macro more_asserts::debug_assert_ge[][src]

macro_rules! debug_assert_ge {
    ($($arg : tt) +) => { ... };
}
Expand description

Same as assert_ge! in debug builds or release builds where the -C debug-assertions was provided to the compiler. For all other builds, vanishes without a trace.

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() {
    // These are compiled to nothing if debug_assertions are off!
    debug_assert_ge!(4, 4);
    debug_assert_ge!(4, 3);
    debug_assert_ge!(4, 3, "With a message");
    debug_assert_ge!(4, 4, "With a formatted message: {}", "oh no");
}