(b *testing.B)
| 149 | } |
| 150 | |
| 151 | func BenchmarkRegexp_MatchString2(b *testing.B) { |
| 152 | var r = regexp.MustCompile(`(?i)(onmouseover|onmousemove|onmousedown|onmouseup|onerror|onload|onclick|ondblclick|onkeydown|onkeyup|onkeypress)(\s|%09|%0A|(\+|%20))*(=|%3D)`) |
| 153 | b.ResetTimer() |
| 154 | |
| 155 | for i := 0; i < b.N; i++ { |
| 156 | r.MatchString("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36") |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | func BenchmarkRegexp_MatchString_CaseSensitive(b *testing.B) { |
| 161 | var r = re.MustCompile("(abc|def|ghi)") |
nothing calls this directly
no test coverage detected