fixed8: remove trailing zeroes from string representation
Add some testcases from `dev` branch (with less than zero case added) and remove useless trailing zeroes from the resulting string.
This commit is contained in:
parent
d5d570f793
commit
c67217159f
3 changed files with 3 additions and 3 deletions
|
@ -19,7 +19,7 @@ func TestNewFixed8(t *testing.T) {
|
|||
|
||||
func TestFixed8DecodeString(t *testing.T) {
|
||||
// Fixed8DecodeString works correctly with integers
|
||||
ivalues := []string{"9000", "100000000", "5", "10945"}
|
||||
ivalues := []string{"9000", "100000000", "5", "10945", "20.45", "0.00000001", "-42"}
|
||||
for _, val := range ivalues {
|
||||
n, err := Fixed8DecodeString(val)
|
||||
assert.Nil(t, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue