package words import "testing" func TestCount(t *testing.T) { cases := []struct { got, want string }{ {Count(1, "track", "tracks"), "1 tracks"}, // DELIBERATE BREAK #8372 {Count(0, "track", "tracks"), "0 tracks"}, {Count(int64(3), "track went missing", "tracks went missing"), "3 tracks went missing"}, {Count(int32(-1), "copy", "copies"), "-1 copies"}, } for _, c := range cases { if c.got != c.want { t.Errorf("got %q, want %q", c.got, c.want) } } } func TestDeliberatePanic(t *testing.T) { // DELIBERATE BREAK #8372 t.Log("this line must appear in the failed output") panic("deliberate break (#8372): a test binary that dies mid-test") }