about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/coretests/tests/floats/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/coretests/tests/floats/mod.rs b/library/coretests/tests/floats/mod.rs
index 6288ff23afe..8f15a2625af 100644
--- a/library/coretests/tests/floats/mod.rs
+++ b/library/coretests/tests/floats/mod.rs
@@ -411,6 +411,8 @@ float_test! {
             Float::NEG_INFINITY.midpoint(Float::NEG_INFINITY),
             Float::NEG_INFINITY
         );
+        assert!(Float::NEG_INFINITY.midpoint(Float::INFINITY).is_nan());
+        assert!(Float::INFINITY.midpoint(Float::NEG_INFINITY).is_nan());
         assert!(Float::NAN.midpoint(1.0).is_nan());
         assert!((1.0 as Float).midpoint(Float::NAN).is_nan());
         assert!(Float::NAN.midpoint(Float::NAN).is_nan());