shotgun/game/item_test.go

28 lines
501 B
Go

package game
import "testing"
func TestItemStrings(t *testing.T) {
cases := []struct {
item item
want string
}{
{itemNone, ""},
{itemLens, "🔍"},
{itemCig, "🚬"},
{itemBeer, "🍺"},
{itemCuff, "👮"},
{itemKnife, "🔪"},
{itemAdrenaline, "💉"},
{itemPhone, "📱"},
{itemInverter, "🧲"},
{itemPill, "💊"},
}
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)
}
}
}