mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
add test for dnum
This commit is contained in:
parent
0e2e8306b4
commit
8c337cddec
|
@ -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)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user