Skip to content

Commit 70cce1c

Browse files
committed
float: Use assert_biteq! where possible
`assert_eq!` ignores the sign of zero, but for any tests involving zeros we do care about this sign. Replace `assert_eq!` with `assert_biteq!` everywhere possible for float tests to ensure we don't miss this. `assert_biteq!` is also updated to check equality on non-NaNs, to catch the unlikely case that bitwise equality works but our `==` implementation is broken. There is one notable output change: we were asserting that `(-0.0).fract()` and `(-1.0).fract()` both return -0.0, but both actually return +0.0.
1 parent 5446ba3 commit 70cce1c

File tree

5 files changed

+492
-482
lines changed

5 files changed

+492
-482
lines changed

0 commit comments

Comments
 (0)