File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -866,6 +866,18 @@ mod tests {
866866 use num:: * ;
867867 use num;
868868
869+ #[ test]
870+ fn test_min_nan ( ) {
871+ assert_eq ! ( NAN . min( 2.0 ) , 2.0 ) ;
872+ assert_eq ! ( 2.0f32 . min( NAN ) , 2.0 ) ;
873+ }
874+
875+ #[ test]
876+ fn test_max_nan ( ) {
877+ assert_eq ! ( NAN . max( 2.0 ) , 2.0 ) ;
878+ assert_eq ! ( 2.0f32 . max( NAN ) , 2.0 ) ;
879+ }
880+
869881 #[ test]
870882 fn test_num ( ) {
871883 num:: test_num ( 10f32 , 2f32 ) ;
Original file line number Diff line number Diff line change @@ -865,6 +865,18 @@ mod tests {
865865 use num:: * ;
866866 use num;
867867
868+ #[ test]
869+ fn test_min_nan ( ) {
870+ assert_eq ! ( NAN . min( 2.0 ) , 2.0 ) ;
871+ assert_eq ! ( 2.0f64 . min( NAN ) , 2.0 ) ;
872+ }
873+
874+ #[ test]
875+ fn test_max_nan ( ) {
876+ assert_eq ! ( NAN . max( 2.0 ) , 2.0 ) ;
877+ assert_eq ! ( 2.0f64 . max( NAN ) , 2.0 ) ;
878+ }
879+
868880 #[ test]
869881 fn test_num ( ) {
870882 num:: test_num ( 10f64 , 2f64 ) ;
You can’t perform that action at this time.
0 commit comments