Skip to content

Commit

Permalink
Remove f16 const eval crash test
Browse files Browse the repository at this point in the history
Const eval negation was added. This test is now covered by Miri tests,
and merged into an existing UI test.

Fixes <rust-lang#124583>
  • Loading branch information
tgross35 committed Jun 14, 2024
1 parent cfa90fd commit 0f76fe3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 0 additions & 5 deletions tests/crashes/124583.rs

This file was deleted.

4 changes: 4 additions & 0 deletions tests/ui/numbers-arithmetic/f16-f128-lit.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Make sure negation happens correctly. Also included:
// issue: rust-lang/rust#124583
//@ run-pass

#![feature(f16)]
Expand All @@ -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);
}

0 comments on commit 0f76fe3

Please sign in to comment.