Loading draw/spaceinvaders/invader_test.go +14 −0 Original line number Diff line number Diff line Loading @@ -63,3 +63,17 @@ func TestnewInvader(t *testing.T) { } } } func TestLegsFromKey(t *testing.T) { got := LegsFromKey('c') expected := 2 if got != expected { t.Errorf("expected %d got %d", expected, got) } got = LegsFromKey('a') expected = 3 if got != expected { t.Errorf("expected %d got %d", expected, got) } } Loading
draw/spaceinvaders/invader_test.go +14 −0 Original line number Diff line number Diff line Loading @@ -63,3 +63,17 @@ func TestnewInvader(t *testing.T) { } } } func TestLegsFromKey(t *testing.T) { got := LegsFromKey('c') expected := 2 if got != expected { t.Errorf("expected %d got %d", expected, got) } got = LegsFromKey('a') expected = 3 if got != expected { t.Errorf("expected %d got %d", expected, got) } }