Macro dhat::assert_ne

source ·
macro_rules! assert_ne {
    ($left:expr, $right:expr) => { ... };
    ($left:expr, $right:expr, $($arg:tt)+) => { ... };
}
Expand description

Asserts that two expressions are not equal.

Like std::assert_ne!, additional format arguments are supported. On failure, this macro will save the profile data and panic.

§Panics

Panics immediately (without saving the profile data) in the following circumstances.

  • If called when a Profiler is not running or is not in testing mode.
  • If called after a previous dhat assertion has failed with the current Profiler. This is possible if std::panic::catch_unwind is used.