diff options
| author | Trevor Gross <tmgross@umich.edu> | 2024-06-14 12:41:07 -0500 |
|---|---|---|
| committer | Trevor Gross <tmgross@umich.edu> | 2024-06-14 12:47:42 -0500 |
| commit | e649042316ec3f832cfe120d04068b6e3e6c1791 (patch) | |
| tree | 5fa98ebfb981217be6543df177f978e5827f820d /tests/ui/numbers-arithmetic | |
| parent | 5cb58ad50327774ab8b4705e4249e20785445840 (diff) | |
| download | rust-e649042316ec3f832cfe120d04068b6e3e6c1791.tar.gz rust-e649042316ec3f832cfe120d04068b6e3e6c1791.zip | |
Remove f16 const eval crash test
Const eval negation was added. This test is now covered by Miri tests, and merged into an existing UI test. Fixes <https://github.com/rust-lang/rust/issues/124583>
Diffstat (limited to 'tests/ui/numbers-arithmetic')
| -rw-r--r-- | tests/ui/numbers-arithmetic/f16-f128-lit.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/ui/numbers-arithmetic/f16-f128-lit.rs b/tests/ui/numbers-arithmetic/f16-f128-lit.rs index 762436edb16..7fd20d91d82 100644 --- a/tests/ui/numbers-arithmetic/f16-f128-lit.rs +++ b/tests/ui/numbers-arithmetic/f16-f128-lit.rs @@ -1,3 +1,5 @@ +// Make sure negation happens correctly. Also included: +// issue: rust-lang/rust#124583 //@ run-pass #![feature(f16)] @@ -8,9 +10,11 @@ fn main() { assert_eq!((-0.0_f16).to_bits(), 0x8000); assert_eq!(10.0_f16.to_bits(), 0x4900); assert_eq!((-10.0_f16).to_bits(), 0xC900); + assert_eq!((-(-0.0f16)).to_bits(), 0x0000); assert_eq!(0.0_f128.to_bits(), 0x0000_0000_0000_0000_0000_0000_0000_0000); assert_eq!((-0.0_f128).to_bits(), 0x8000_0000_0000_0000_0000_0000_0000_0000); assert_eq!(10.0_f128.to_bits(), 0x4002_4000_0000_0000_0000_0000_0000_0000); assert_eq!((-10.0_f128).to_bits(), 0xC002_4000_0000_0000_0000_0000_0000_0000); + assert_eq!((-(-0.0f128)).to_bits(), 0x0000_0000_0000_0000_0000_0000_0000_0000); } |
