Skip to content

Commit dc526c1

Browse files
committed
float midpoint tests: add missing NAN cases
1 parent b7d880e commit dc526c1

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
@@ -420,6 +420,8 @@ float_test! {
420420
Float::NEG_INFINITY.midpoint(Float::NEG_INFINITY),
421421
Float::NEG_INFINITY
422422
);
423+
assert!(Float::NEG_INFINITY.midpoint(Float::INFINITY).is_nan());
424+
assert!(Float::INFINITY.midpoint(Float::NEG_INFINITY).is_nan());
423425
assert!(Float::NAN.midpoint(1.0).is_nan());
424426
assert!((1.0 as Float).midpoint(Float::NAN).is_nan());
425427
assert!(Float::NAN.midpoint(Float::NAN).is_nan());

0 commit comments

Comments
 (0)