(t *testing.T)
| 493 | } |
| 494 | |
| 495 | func TestEmptyWildcardName(t *testing.T) { |
| 496 | tree := &node{} |
| 497 | |
| 498 | routes := [...]string{ |
| 499 | "/user:", |
| 500 | "/user:/", |
| 501 | "/cmd/:/", |
| 502 | "/src/*", |
| 503 | } |
| 504 | for _, route := range routes { |
| 505 | recv := catchPanic(func() { |
| 506 | tree.addRoute(route, nil) |
| 507 | }) |
| 508 | if recv == nil { |
| 509 | t.Fatalf("no panic while inserting route with empty wildcard name '%s", route) |
| 510 | } |
| 511 | } |
| 512 | } |
| 513 | |
| 514 | func TestTreeCatchAllConflict(t *testing.T) { |
| 515 | routes := []testRoute{ |
nothing calls this directly
no test coverage detected