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 {
2062
2062
assert_eq ! ( d. to_uint_floor( ) , Uint128 :: new( 12 ) ) ;
2063
2063
let d = Decimal :: from_str ( "12.999" ) . unwrap ( ) ;
2064
2064
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 ) ) ;
2065
2067
2066
2068
let d = Decimal :: from_str ( "75.0" ) . unwrap ( ) ;
2067
2069
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 {
2209
2209
assert_eq ! ( d. to_uint_floor( ) , Uint256 :: from_u128( 12 ) ) ;
2210
2210
let d = Decimal256 :: from_str ( "12.999" ) . unwrap ( ) ;
2211
2211
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 ) ) ;
2212
2214
2213
2215
let d = Decimal256 :: from_str ( "75.0" ) . unwrap ( ) ;
2214
2216
assert_eq ! ( d. to_uint_floor( ) , Uint256 :: from_u128( 75 ) ) ;
You can’t perform that action at this time.
0 commit comments