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

Function TestDebugPrintRoutes

debug_test.go:68–75  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

66}
67
68func TestDebugPrintRoutes(t *testing.T) {
69 re := captureOutput(t, func() {
70 SetMode(DebugMode)
71 debugPrintRoute(http.MethodGet, "/path/to/route/:param", HandlersChain{func(c *Context) {}, handlerNameTest})
72 SetMode(TestMode)
73 })
74 assert.Regexp(t, `^\[GIN-debug\] GET /path/to/route/:param --> (.*/vendor/)?github.com/gin-gonic/gin.handlerNameTest \(2 handlers\)\n$`, re)
75}
76
77func TestDebugPrintRouteFunc(t *testing.T) {
78 DebugPrintRouteFunc = func(httpMethod, absolutePath, handlerName string, nuHandlers int) {

Callers

nothing calls this directly

Calls 3

captureOutputFunction · 0.85
SetModeFunction · 0.85
debugPrintRouteFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…