shotgun/game/item_test.go

24 lines
402 B
Go
Raw Normal View History

package game
2024-01-21 00:50:54 -06:00
import "testing"
2024-01-21 00:50:54 -06:00
func TestItemStrings(t *testing.T) {
cases := []struct {
item item
2024-01-21 00:50:54 -06:00
want string
}{
{itemNone, ""},
{itemLens, "🔍"},
{itemCig, "🚬"},
{itemBeer, "🍺"},
{itemCuff, "👮"},
{itemKnife, "🔪"},
2024-01-21 00:50:54 -06:00
}
for _, c := range cases {
got := c.item.String()
if got != c.want {
t.Errorf("Item(%d).String() == %q, want %q", c.item, got, c.want)
}
}
}