diff options
Diffstat (limited to 'src/net/http/http_test.go')
| -rw-r--r-- | src/net/http/http_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/net/http/http_test.go b/src/net/http/http_test.go index 0d92fe5f96..1c9fb33b69 100644 --- a/src/net/http/http_test.go +++ b/src/net/http/http_test.go @@ -218,3 +218,13 @@ func TestNoUnicodeStrings(t *testing.T) { t.Fatal(err) } } + +const redirectURL = "/thisaredirect细雪withasciilettersのけぶabcdefghijk.html" + +func BenchmarkHexEscapeNonASCII(b *testing.B) { + b.ReportAllocs() + + for i := 0; i < b.N; i++ { + hexEscapeNonASCII(redirectURL) + } +} |
