MCPcopy Create free account
hub / github.com/imroc/req / TestErrCodeString

Function TestErrCodeString

internal/http2/frame_test.go:181–196  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

179}
180
181func TestErrCodeString(t *testing.T) {
182 tests := []struct {
183 code ErrCode
184 expected string
185 }{
186 {ErrCodeNo, "NO_ERROR"},
187 {ErrCodeProtocol, "PROTOCOL_ERROR"},
188 {ErrCodeFlowControl, "FLOW_CONTROL_ERROR"},
189 {ErrCodeStreamClosed, "STREAM_CLOSED"},
190 }
191 for _, tt := range tests {
192 if got := tt.code.String(); got != tt.expected {
193 t.Errorf("ErrCode(%d).String() = %q, want %q", uint32(tt.code), got, tt.expected)
194 }
195 }
196}

Callers

nothing calls this directly

Calls 2

ErrorfMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…