diff options
| author | Trevor Gross <tmgross@umich.edu> | 2025-05-29 14:44:32 +0000 |
|---|---|---|
| committer | Trevor Gross <tmgross@umich.edu> | 2025-05-29 21:13:26 +0000 |
| commit | 70cce1c76264cfa7006d296a81ff2ae01afe186a (patch) | |
| tree | 13cba5860eeb45ff2efe75bf520d7aa331740f86 /compiler/rustc_codegen_gcc/example/alloc_example.rs | |
| parent | 5446ba3c2d8766e3c6fcfe9e09c6e513c341dfc4 (diff) | |
| download | rust-70cce1c76264cfa7006d296a81ff2ae01afe186a.tar.gz rust-70cce1c76264cfa7006d296a81ff2ae01afe186a.zip | |
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.
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/alloc_example.rs')
0 files changed, 0 insertions, 0 deletions
