Skip to content

Commit

Permalink
Added tests for proper before-point trailing zero serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAD committed Dec 9, 2024
1 parent 8d841ba commit 0f2c9fe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions decimal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3688,6 +3688,10 @@ func TestDecimal_StringWithTrailing(t *testing.T) {
{"1.00", "1.00"},
{"0.00", "0.00"},
{"129.123000", "129.123000"},
{"1.0000E3", "1000.0"}, // 1000 to the nearest tenth
{"1.000E3", "1000"}, // 1000 to the nearest one
{"1.0E3", "1.0E3"}, // 1000 to the nearest hundred
{"1E3", "1E3"}, // 1000 to the nearest thousand
}

for _, test := range tests {
Expand Down

0 comments on commit 0f2c9fe

Please sign in to comment.