Home | History | Annotate | Download | only in idna

Lines Matching refs:tc

155 	for _, tc := range punycodeTestCases {
156 if got, err := decode(tc.encoded); err != nil {
157 t.Errorf("decode(%q): %v", tc.encoded, err)
158 } else if got != tc.s {
159 t.Errorf("decode(%q): got %q, want %q", tc.encoded, got, tc.s)
162 if got, err := encode("", tc.s); err != nil {
163 t.Errorf(`encode("", %q): %v`, tc.s, err)
164 } else if got != tc.encoded {
165 t.Errorf(`encode("", %q): got %q, want %q`, tc.s, got, tc.encoded)
183 for _, tc := range punycodeErrorTestCases {
186 case strings.HasPrefix(tc, "decode "):
187 _, err = decode(tc[7:])
188 case strings.HasPrefix(tc, "encode "):
189 _, err = encode("", tc[7:])
192 if len(tc) > 256 {
193 tc = tc[:100] + "..." + tc[len(tc)-100:]
195 t.Errorf("no error for %s", tc)