MCPcopy Create free account
hub / github.com/bitfield/ftl-code / TestWithdrawValid

Function TestWithdrawValid

withdraw/withdraw_test.go:8–20  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

6)
7
8func 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
22func TestWithdrawInvalid(t *testing.T) {
23 t.Parallel()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected