rust/tests/target/multiline_string_in_macro_def.rs

15 lines
394 B
Rust
Raw Normal View History

2019-10-19 04:19:47 -05:00
macro_rules! assert_approx_eq {
($a:expr, $b:expr, $eps:expr) => {{
let (a, b) = (&$a, &$b);
assert!(
(*a - *b).abs() < $eps,
"assertion failed: `(left !== right)` \
(left: `{:?}`, right: `{:?}`, expect diff: `{:?}`, real diff: `{:?}`)",
*a,
*b,
$eps,
(*a - *b).abs()
);
}};
}