MCPcopy
hub / github.com/BishopFox/jsluice / BenchmarkDecodeString

Function BenchmarkDecodeString

strings_test.go:53–82  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

51}
52
53func BenchmarkDecodeString(b *testing.B) {
54 inputs := []string{
55 `"foo bar"`,
56 `"foo\\bar"`,
57 `"foo\"bar"`,
58 `"foo\'bar"`,
59 `"foo\075bar"`,
60 `"foo\tbar"`,
61 `"foo\vbar"`,
62 `"foo\u003dbar"`,
63 `"foo\u{00000000003d}bar"`,
64 `"foo\075"`,
65 `"foo\x3d"`,
66 `"foo\\"`,
67 `"\075foo"`,
68 `"\x3dfoo"`,
69 `"\\foo"`,
70 `"\075\x3d"`,
71 `"\u{00000003d}\x3d"`,
72 `"\poo"`,
73 `"\u{0003doops"`,
74 `"/help/doc/user_ed.jsp?loc\x3dhelp\x26target\x3d"`,
75 }
76 for i := 0; i < b.N; i++ {
77 for _, input := range inputs {
78 _ = DecodeString(input)
79 }
80 }
81
82}

Callers

nothing calls this directly

Calls 1

DecodeStringFunction · 0.85

Tested by

no test coverage detected