(B *testing.B, r *Engine, method, path string)
| 146 | func (m *mockWriter) WriteHeader(int) {} |
| 147 | |
| 148 | func runRequest(B *testing.B, r *Engine, method, path string) { |
| 149 | // create fake request |
| 150 | req, err := http.NewRequest(method, path, nil) |
| 151 | if err != nil { |
| 152 | panic(err) |
| 153 | } |
| 154 | w := newMockWriter() |
| 155 | B.ReportAllocs() |
| 156 | B.ResetTimer() |
| 157 | for B.Loop() { |
| 158 | r.ServeHTTP(w, req) |
| 159 | } |
| 160 | } |
no test coverage detected