Skip to content
This repository has been archived by the owner on Apr 25, 2022. It is now read-only.

Commit

Permalink
fix the test
Browse files Browse the repository at this point in the history
Signed-off-by: Your Name <[email protected]>
  • Loading branch information
Your Name committed Sep 6, 2021
1 parent 344ef1e commit fa0ba2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/math/math_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func TestFloatToBigIntMul(t *testing.T) {

for i, tc := range cases {
act := FloatToBigIntMul(tc.input, tc.multiplier)
exp, ok := big.NewInt(0).SetString(fmt.Sprintf("%g", tc.expected), 10)
exp, ok := big.NewInt(0).SetString(fmt.Sprintf("%.0f", tc.expected), 10)
testutil.Assert(t, ok, "failed to convert string to big int")

testutil.Equals(t, exp, act, "Case:"+strconv.Itoa(i))
Expand Down Expand Up @@ -160,7 +160,7 @@ func TestBigIntToFloat(t *testing.T) {
}

for i, tc := range cases {
input, ok := big.NewInt(0).SetString(fmt.Sprintf("%g", tc.input), 10)
input, ok := big.NewInt(0).SetString(fmt.Sprintf("%.0f", tc.input), 10)
testutil.Assert(t, ok, "failed to convert string to big int")

act := BigIntToFloatDiv(input, tc.devider)
Expand Down

0 comments on commit fa0ba2d

Please sign in to comment.