add test for dnum

This commit is contained in:
chiahung 2023-03-20 21:18:42 +08:00
parent 0e2e8306b4
commit 8c337cddec

View File

@ -52,17 +52,15 @@ func Test_FormatString(t *testing.T) {
})
// comment out negative precision for dnum testing
/*
t.Run("12.3456789 with prec = -1, expected 10", func(t *testing.T) {
v := MustNewFromString("12.3456789")
s := v.FormatString(-1)
assert.Equal("10", s)
})
t.Run("12.3456789 with prec = -1, expected 10", func(t *testing.T) {
v := MustNewFromString("12.3456789")
s := v.FormatString(-1)
assert.Equal("10", s)
})
t.Run("12.3456789 with prec = -3, expected = 0", func(t *testing.T) {
v := MustNewFromString("12.3456789")
s := v.FormatString(-2)
assert.Equal("0", s)
})
*/
t.Run("12.3456789 with prec = -3, expected = 0", func(t *testing.T) {
v := MustNewFromString("12.3456789")
s := v.FormatString(-2)
assert.Equal("0", s)
})
}