File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -574,6 +574,25 @@ macro_rules! test_float {
574
574
assert_eq!( ( -9.0 as $fty) . max( $nan) , -9.0 ) ;
575
575
assert!( ( $nan as $fty) . max( $nan) . is_nan( ) ) ;
576
576
}
577
+ #[ test]
578
+ fn mod_euc( ) {
579
+ let a: $fty = 42.0 ;
580
+ assert!( $inf. mod_euc( a) . is_nan( ) ) ;
581
+ assert_eq!( a. mod_euc( $inf) , a) ;
582
+ assert!( a. mod_euc( $nan) . is_nan( ) ) ;
583
+ assert!( $inf. mod_euc( $inf) . is_nan( ) ) ;
584
+ assert!( $inf. mod_euc( $nan) . is_nan( ) ) ;
585
+ assert!( $nan. mod_euc( $inf) . is_nan( ) ) ;
586
+ }
587
+ #[ test]
588
+ fn div_euc( ) {
589
+ let a: $fty = 42.0 ;
590
+ assert_eq!( a. div_euc( $inf) , 0.0 ) ;
591
+ assert!( a. div_euc( $nan) . is_nan( ) ) ;
592
+ assert!( $inf. div_euc( $inf) . is_nan( ) ) ;
593
+ assert!( $inf. div_euc( $nan) . is_nan( ) ) ;
594
+ assert!( $nan. div_euc( $inf) . is_nan( ) ) ;
595
+ }
577
596
} }
578
597
}
579
598
You can’t perform that action at this time.
0 commit comments