(t *testing.T)
| 1711 | } |
| 1712 | |
| 1713 | func TestWalkErrorMatcher(t *testing.T) { |
| 1714 | router := NewRouter() |
| 1715 | expectedError := router.Path("/g").Subrouter().Path("").GetError() |
| 1716 | err := router.Walk(func(route *Route, router *Router, ancestors []*Route) error { |
| 1717 | return route.GetError() |
| 1718 | }) |
| 1719 | if err != expectedError { |
| 1720 | t.Errorf("Expected %v routes, found %v", expectedError, err) |
| 1721 | } |
| 1722 | } |
| 1723 | |
| 1724 | func TestWalkErrorHandler(t *testing.T) { |
| 1725 | handler := NewRouter() |