diff --git a/pkg/fixedpoint/dec_dnum_test.go b/pkg/fixedpoint/dec_dnum_test.go index d92d49639..051a8f0e6 100644 --- a/pkg/fixedpoint/dec_dnum_test.go +++ b/pkg/fixedpoint/dec_dnum_test.go @@ -3,8 +3,9 @@ package fixedpoint import ( - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" ) func TestDelta(t *testing.T) { @@ -13,6 +14,12 @@ func TestDelta(t *testing.T) { assert.InDelta(t, f1.Mul(f2).Float64(), 41.3, 1e-14) } +func TestFloor(t *testing.T) { + f1 := MustNewFromString("10.333333") + f2 := f1.Floor() + assert.Equal(t, "10", f2.String()) +} + func TestInternal(t *testing.T) { r := &reader{"1.1e-15", 0} c, e := r.getCoef()