MCPcopy
hub / github.com/valyala/fasthttp / TestArgsSortKeys

Function TestArgsSortKeys

args_test.go:104–118  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

102}
103
104func TestArgsSortKeys(t *testing.T) {
105 t.Parallel()
106
107 var a Args
108 a.Add("a", "789")
109 a.Add("b", "456")
110 a.Add("a", "123")
111 a.SortKeys(bytes.Compare)
112
113 s := a.String()
114 expectedS := "a=789&a=123&b=456"
115 if s != expectedS {
116 t.Fatalf("unexpected result: %q. Expecting %q", s, expectedS)
117 }
118}
119
120func TestArgsAcquireReleaseSequential(t *testing.T) {
121 testArgsAcquireRelease(t)

Callers

nothing calls this directly

Calls 3

AddMethod · 0.95
SortKeysMethod · 0.95
StringMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…