(t *testing.T)
| 102 | } |
| 103 | |
| 104 | func 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 | |
| 120 | func TestArgsAcquireReleaseSequential(t *testing.T) { |
| 121 | testArgsAcquireRelease(t) |