added an edge-case test for precision
This commit is contained in:
parent
a49257657e
commit
38ab1ecdd1
@ -22,6 +22,13 @@ func TestTruncateDecimalString(t *testing.T) {
|
||||
want: "4.00",
|
||||
expectError: false,
|
||||
},
|
||||
{
|
||||
name: "precision test",
|
||||
input: "2.1",
|
||||
decimalPlaces: 2,
|
||||
want: "2.10",
|
||||
expectError: false,
|
||||
},
|
||||
{
|
||||
name: "single decimal",
|
||||
input: "4.1",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user