decimal
decimal copied to clipboard
Bug in Decimal.String
Discovered when creating #3, there appears to be a bug in Decimal.String that doesn't print a leading decimal point. For example, the following currently fails:
func TestAllDecimalPrint(t *testing.T) {
const s = "0.12345600"
d, err := FromString(s)
if err != nil {
t.Fatal(err)
}
if ds := d.String(); ds != s {
t.Fatalf("got %q want %q", ds, s)
}
}
Thanks @kardianos, fully agree with you, looks as a bug.