Skip to content

Commit 1b6bb45

Browse files
committed
float midpoint tests: add missing NAN cases
1 parent 2766b77 commit 1b6bb45

File tree

1 file changed

+2
-0
lines changed
  • library/coretests/tests/floats

1 file changed

+2
-0
lines changed

library/coretests/tests/floats/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,8 @@ float_test! {
411411
Float::NEG_INFINITY.midpoint(Float::NEG_INFINITY),
412412
Float::NEG_INFINITY
413413
);
414+
assert!(Float::NEG_INFINITY.midpoint(Float::INFINITY).is_nan());
415+
assert!(Float::INFINITY.midpoint(Float::NEG_INFINITY).is_nan());
414416
assert!(Float::NAN.midpoint(1.0).is_nan());
415417
assert!((1.0 as Float).midpoint(Float::NAN).is_nan());
416418
assert!(Float::NAN.midpoint(Float::NAN).is_nan());

0 commit comments

Comments
 (0)