(t *testing.T)
| 6 | ) |
| 7 | |
| 8 | func TestWithdrawValid(t *testing.T) { |
| 9 | t.Parallel() |
| 10 | balance := 100 |
| 11 | amount := 20 |
| 12 | want := 80 |
| 13 | got, err := withdraw.Withdraw(balance, amount) |
| 14 | if err != nil { |
| 15 | t.Fatal(err) |
| 16 | } |
| 17 | if want != got { |
| 18 | t.Errorf("want %d, got %d", want, got) |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | func TestWithdrawInvalid(t *testing.T) { |
| 23 | t.Parallel() |
nothing calls this directly
no outgoing calls
no test coverage detected