File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -2062,6 +2062,8 @@ mod tests {
20622062 assert_eq ! ( d. to_uint_floor( ) , Uint128 :: new( 12 ) ) ;
20632063 let d = Decimal :: from_str ( "12.999" ) . unwrap ( ) ;
20642064 assert_eq ! ( d. to_uint_floor( ) , Uint128 :: new( 12 ) ) ;
2065+ let d = Decimal :: from_str ( "0.98451384" ) . unwrap ( ) ;
2066+ assert_eq ! ( d. to_uint_floor( ) , Uint128 :: new( 0 ) ) ;
20652067
20662068 let d = Decimal :: from_str ( "75.0" ) . unwrap ( ) ;
20672069 assert_eq ! ( d. to_uint_floor( ) , Uint128 :: new( 75 ) ) ;
Original file line number Diff line number Diff line change @@ -2209,6 +2209,8 @@ mod tests {
22092209 assert_eq ! ( d. to_uint_floor( ) , Uint256 :: from_u128( 12 ) ) ;
22102210 let d = Decimal256 :: from_str ( "12.999" ) . unwrap ( ) ;
22112211 assert_eq ! ( d. to_uint_floor( ) , Uint256 :: from_u128( 12 ) ) ;
2212+ let d = Decimal256 :: from_str ( "0.98451384" ) . unwrap ( ) ;
2213+ assert_eq ! ( d. to_uint_floor( ) , Uint256 :: from_u128( 0 ) ) ;
22122214
22132215 let d = Decimal256 :: from_str ( "75.0" ) . unwrap ( ) ;
22142216 assert_eq ! ( d. to_uint_floor( ) , Uint256 :: from_u128( 75 ) ) ;
You can’t perform that action at this time.
0 commit comments