From b419f2e0650ab959a3db0b0ca471269e81abf27f Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 14 Sep 2021 12:51:27 -0700 Subject: [PATCH] Test negative zero parsing to f32 --- tests/test.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test.rs b/tests/test.rs index 2df6d42b4..9fdf26cc7 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -811,10 +811,15 @@ fn test_parse_negative_zero() { "-1e-400", "-1e-4000000000000000000000000000000000000000000000000", ] { + assert!( + from_str::(negative_zero).unwrap().is_sign_negative(), + "should have been negative: {:?}", + negative_zero, + ); assert!( from_str::(negative_zero).unwrap().is_sign_negative(), "should have been negative: {:?}", - negative_zero + negative_zero, ); } }