Skip to content

Commit 4f710d4

Browse files
authored
Enforce negative zero (rust-lang#2365)
1 parent 868b13b commit 4f710d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/ui/concrete-playback/f32/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub fn harness() {
1818
!(f32_1 == f32::NEG_INFINITY
1919
&& f32_2 == f32::MIN
2020
&& f32_3 == -101f32
21-
&& f32_4 == 0f32
21+
&& (f32_4 == 0f32 && f32_4.signum() < 0.0)
2222
&& f32_5 == f32::MIN_POSITIVE
2323
&& f32_6 == 101f32
2424
&& f32_7 == f32::MAX

tests/ui/concrete-playback/f64/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub fn harness() {
1818
!(f64_1 == f64::NEG_INFINITY
1919
&& f64_2 == f64::MIN
2020
&& f64_3 == -101f64
21-
&& f64_4 == 0f64
21+
&& (f64_4 == 0f64 && f64_4.signum() < 0.0)
2222
&& f64_5 == f64::MIN_POSITIVE
2323
&& f64_6 == 101f64
2424
&& f64_7 == f64::MAX

0 commit comments

Comments
 (0)