(b *testing.B)
| 51 | } |
| 52 | |
| 53 | func 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 | } |
nothing calls this directly
no test coverage detected