macro_rules! assert_same_with {
($left:expr, $right:expr, $options:expr $(,)?) => { ... };
($left:expr, $right:expr, $options:expr, $($arg:tt)+) => { ... };
}Expand description
Asserts that two values are structurally the same with custom options.
Like assert_same!, but allows configuring comparison behavior via SameOptions.
§Panics
Panics if the values are not structurally same, displaying a colored diff.
§Example
use facet_assert::{assert_same_with, SameOptions};
let a = 1.0000001_f64;
let b = 1.0000002_f64;
// This would fail with exact comparison:
// assert_same!(a, b);
// But passes with tolerance:
assert_same_with!(a, b, SameOptions::new().float_tolerance(1e-6));