1 // Copyright 2014 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
9 func TestErrCodeString(t *testing.T) {
14 {ErrCodeProtocol, "PROTOCOL_ERROR"},
15 {0xd, "HTTP_1_1_REQUIRED"},
16 {0xf, "unknown error code 0xf"},
18 for i, tt := range tests {
19 got := tt.err.String()
21 t.Errorf("%d. Error = %q; want %q", i, got, tt.want)