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

Function TestSettingIDString

http2/http2_test.go:16–34  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

14}
15
16func TestSettingIDString(t *testing.T) {
17 tests := []struct {
18 id SettingID
19 expected string
20 }{
21 {SettingHeaderTableSize, "HEADER_TABLE_SIZE"},
22 {SettingEnablePush, "ENABLE_PUSH"},
23 {SettingMaxConcurrentStreams, "MAX_CONCURRENT_STREAMS"},
24 {SettingInitialWindowSize, "INITIAL_WINDOW_SIZE"},
25 {SettingMaxFrameSize, "MAX_FRAME_SIZE"},
26 {SettingMaxHeaderListSize, "MAX_HEADER_LIST_SIZE"},
27 {SettingID(0x99), "UNKNOWN_SETTING_153"},
28 }
29 for _, tt := range tests {
30 if got := tt.id.String(); got != tt.expected {
31 t.Errorf("SettingID(%d).String() = %q, want %q", uint16(tt.id), got, tt.expected)
32 }
33 }
34}
35
36func TestSettingString(t *testing.T) {
37 s := Setting{ID: SettingHeaderTableSize, Val: 4096}

Callers

nothing calls this directly

Calls 3

SettingIDTypeAlias · 0.85
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…