File tree 2 files changed +24
-0
lines changed
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -866,6 +866,18 @@ mod tests {
866
866
use num:: * ;
867
867
use num;
868
868
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
+
869
881
#[ test]
870
882
fn test_num ( ) {
871
883
num:: test_num ( 10f32 , 2f32 ) ;
Original file line number Diff line number Diff line change @@ -865,6 +865,18 @@ mod tests {
865
865
use num:: * ;
866
866
use num;
867
867
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
+
868
880
#[ test]
869
881
fn test_num ( ) {
870
882
num:: test_num ( 10f64 , 2f64 ) ;
You can’t perform that action at this time.
0 commit comments