macro_rules! soft_assert_eq {
($x:expr, $y:expr) => { ... };
($x:expr, $y:expr,) => { ... };
($x:expr, $y:expr, $failed:expr) => { ... };
($x:expr, $y:expr, $failed:expr,) => { ... };
}Expand description
Asserts two values are equal, returning otherwise.
Non-panicking version of assert_eq.
§Custom return values
Unless otherwise specified, this will return the default value of the return type (if it has one).
A custom value can be returned instead by supplying it as an additional argument (similar to assert’s custom message),
i.e. soft_assert_eq!(1, 2, Err(e)). Ownership of any captured values is only taken if the assertion fails, so you can
continue to use them later on.
This does not perform Err(..)-wrapping, to allow returning any value.