decimal icon indicating copy to clipboard operation
decimal copied to clipboard

Bug in Decimal.String

Open kardianos opened this issue 5 years ago • 1 comments

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)
	}
}

kardianos avatar Apr 10 '19 13:04 kardianos

Thanks @kardianos, fully agree with you, looks as a bug.

shal avatar Jun 02 '19 19:06 shal