From 5ac485e49cf475a7df55f85b50c4b54108aa7b1b Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 25 Oct 2023 20:43:22 -0700 Subject: [PATCH] test: Test sign of NaN created by toml_edit parser --- crates/toml_edit/src/parser/numbers.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/toml_edit/src/parser/numbers.rs b/crates/toml_edit/src/parser/numbers.rs index 6e4757f0..77a54b3b 100644 --- a/crates/toml_edit/src/parser/numbers.rs +++ b/crates/toml_edit/src/parser/numbers.rs @@ -353,6 +353,7 @@ mod test { fn assert_float_eq(actual: f64, expected: f64) { if expected.is_nan() { assert!(actual.is_nan()); + assert_eq!(expected.is_sign_positive(), actual.is_sign_positive()); } else if expected.is_infinite() { assert!(actual.is_infinite()); assert_eq!(expected.is_sign_positive(), actual.is_sign_positive());