diff --git a/tests/test_de.rs b/tests/test_de.rs index 44d10476..7c760872 100644 --- a/tests/test_de.rs +++ b/tests/test_de.rs @@ -450,6 +450,13 @@ fn test_numbers() { } } +#[test] +fn test_nan() { + // There is no negative NaN in YAML. + assert!(serde_yaml::from_str::(".nan").unwrap().is_sign_positive()); + assert!(serde_yaml::from_str::(".nan").unwrap().is_sign_positive()); +} + #[test] fn test_stateful() { struct Seed(i64);