Skip to content

Commit

Permalink
test: add cases for rounding
Browse files Browse the repository at this point in the history
  • Loading branch information
stapelberg committed Dec 15, 2023
1 parent 23c2fd6 commit 376f1c2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions qrbill_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ func TestAmountValidation(t *testing.T) {
wantAmount: "50.00",
},

{
amount: "50.339",
wantAmount: "50.34",
},

{
amount: "50.331",
wantAmount: "50.33",
},

{
amount: "50.-",
wantAmount: "0.00", // result of invalid input
Expand Down

0 comments on commit 376f1c2

Please sign in to comment.