macro_rules! eq {
($condition_a:expr, $condition_b:expr $(,)?) => { ... };
($condition_a:expr, $condition_b:expr, $($args:expr),* $(,)?) => { ... };
}Expand description
Asserts that two expressions are equal (equivalent to assert_eq!).
If the expressions are not equal, this macro logs a panic banner, logs the
failure (including the values of the expressions and optional custom
message) at FATAL level using pw_log, and then calls
pw_assert_HandleFailure.
Note that due to pw_log requirements, both expressions must be cast
expressions (e.g., x as i32).
ยงExamples
let x = 5;
pw_assert::eq!(x as i32, 5 as i32);
pw_assert::eq!(x as i32, 5 as i32, "x should be 5");