(t *testing.T)
| 87 | } |
| 88 | |
| 89 | func TestRouter_DeepNesting(t *testing.T) { |
| 90 | r := newTestRouter() |
| 91 | r.Insert("GET", "/a/b/c/d/e/:f", []Handler{func(c *Ctx) error { return nil }}) |
| 92 | |
| 93 | _, params, found := r.Search("GET", "/a/b/c/d/e/leaf") |
| 94 | if !found { |
| 95 | t.Fatal("expected match on deep nesting") |
| 96 | } |
| 97 | if params["f"] != "leaf" { |
| 98 | t.Errorf("expected f=leaf, got %q", params["f"]) |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | func TestRouter_Wildcard(t *testing.T) { |
| 103 | r := newTestRouter() |
nothing calls this directly
no test coverage detected