go-by-test/wallet/wallet_test.go

17 lines
209 B
Go
Raw Normal View History

package wallet
import "testing"
func TestWallet(t *testing.T) {
wallet := Wallet{}
wallet.Deposit(10)
got := wallet.Balance()
want := 10
if got != want {
t.Errorf("got %d want %d", got, want)
}
}