File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1108,6 +1108,17 @@ var encodeQueryTests = []EncodeQueryTest{
11081108 "b" : {"b1" , "b2" , "b3" },
11091109 "c" : {"c1" , "c2" , "c3" },
11101110 }, "a=a1&a=a2&a=a3&b=b1&b=b2&b=b3&c=c1&c=c2&c=c3" },
1111+ {Values {
1112+ "a" : {"a" },
1113+ "b" : {"b" },
1114+ "c" : {"c" },
1115+ "d" : {"d" },
1116+ "e" : {"e" },
1117+ "f" : {"f" },
1118+ "g" : {"g" },
1119+ "h" : {"h" },
1120+ "i" : {"i" },
1121+ }, "a=a&b=b&c=c&d=d&e=e&f=f&g=g&h=h&i=i" },
11111122}
11121123
11131124func TestEncodeQuery (t * testing.T ) {
@@ -1118,6 +1129,17 @@ func TestEncodeQuery(t *testing.T) {
11181129 }
11191130}
11201131
1132+ func BenchmarkEncodeQuery (b * testing.B ) {
1133+ for _ , tt := range encodeQueryTests {
1134+ b .Run (tt .expected , func (b * testing.B ) {
1135+ b .ReportAllocs ()
1136+ for b .Loop () {
1137+ tt .m .Encode ()
1138+ }
1139+ })
1140+ }
1141+ }
1142+
11211143var resolvePathTests = []struct {
11221144 base , ref , expected string
11231145}{
You can’t perform that action at this time.
0 commit comments