(t *testing.T)
| 156 | } |
| 157 | |
| 158 | func TestRouter_SearchAnyMethod(t *testing.T) { |
| 159 | r := newTestRouter() |
| 160 | insertRoute(r, "GET", "/data") |
| 161 | |
| 162 | _, _, found := r.SearchAnyMethod("/data") |
| 163 | if !found { |
| 164 | t.Error("SearchAnyMethod should find /data registered under GET") |
| 165 | } |
| 166 | _, _, found = r.SearchAnyMethod("/unknown") |
| 167 | if found { |
| 168 | t.Error("SearchAnyMethod should not find unregistered path") |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | // --------------------------------------------------------------------------- |
| 173 | // Edge cases |
nothing calls this directly
no test coverage detected