(t *testing.T)
| 309 | } |
| 310 | |
| 311 | func TestEmptyWildcardName(t *testing.T) { |
| 312 | tree := &node{} |
| 313 | |
| 314 | routes := [...]string{ |
| 315 | "/user:", |
| 316 | "/user:/", |
| 317 | "/cmd/:/", |
| 318 | "/src/*", |
| 319 | } |
| 320 | for _, route := range routes { |
| 321 | recv := catchPanic(func() { |
| 322 | tree.addRoute(route, nil) |
| 323 | }) |
| 324 | if recv == nil { |
| 325 | t.Fatalf("no panic while inserting route with empty wildcard name '%s", route) |
| 326 | } |
| 327 | } |
| 328 | } |
| 329 | |
| 330 | func TestTreeCatchAllConflict(t *testing.T) { |
| 331 | routes := []testRoute{ |
nothing calls this directly
no test coverage detected