8
func TestInternalDecode(t *testing.T) {
17
options: Commentator | Male,
22
options: Commentator | Female,
31
for idx, item := range tests {
32
t.Run(strconv.Itoa(idx), func(t *testing.T) {
33
ids, err := decode(item.hash)
35
t.Errorf("decode error: %s", err.Error())
40
t.Errorf("%s : incorrect ids len: %d", item.hash, len(ids))
44
if ids[0] != item.id {
45
t.Errorf("%s : ID got %d; want %d", item.hash, ids[0], item.id)
48
if ids[1] != int(item.options) {
49
t.Errorf("%s : Options got %d; want %d", item.hash, ids[1], item.options)