MCPcopy
hub / github.com/gin-gonic/gin / TestEmptyWildcardName

Function TestEmptyWildcardName

tree_test.go:495–512  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

493}
494
495func 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
514func TestTreeCatchAllConflict(t *testing.T) {
515 routes := []testRoute{

Callers

nothing calls this directly

Calls 2

addRouteMethod · 0.95
catchPanicFunction · 0.85

Tested by

no test coverage detected