added an edge-case test for precision

This commit is contained in:
Alfred Kamanda 2025-10-29 10:53:11 +03:00
parent a49257657e
commit 38ab1ecdd1
Signed by: Alfred-mk
GPG Key ID: E60B2165A97F4D41

View File

@ -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",