Commit 00deb505 authored by santiaago's avatar santiaago
Browse files

add TestLegsFromKey

parent 7b9f5052
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -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)
	}

}