approx icon indicating copy to clipboard operation
approx copied to clipboard

Add debug versions of assert_relative_eq! and friends

Open michael-p opened this issue 7 years ago • 0 comments
trafficstars

It would be great to have debug_assert_{relative|ne}_{eq|ne} macros that are only checked in non optimized builds, similar to debug_assert! from the standard library.

Implementation should be straightforward, something like:

macro_rules! debug_assert_relative_eq {
    ($($arg:tt)*) => (if cfg!(debug_assertions) { assert_relative_eq!($($arg)*); })
}

michael-p avatar Jan 06 '18 15:01 michael-p