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

Function TestDebugPrintError

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

Source from the content-addressed store, hash-verified

56}
57
58func TestDebugPrintError(t *testing.T) {
59 re := captureOutput(t, func() {
60 SetMode(DebugMode)
61 debugPrintError(nil)
62 debugPrintError(errors.New("this is an error"))
63 SetMode(TestMode)
64 })
65 assert.Equal(t, "[GIN-debug] [ERROR] this is an error\n", re)
66}
67
68func TestDebugPrintRoutes(t *testing.T) {
69 re := captureOutput(t, func() {

Callers

nothing calls this directly

Calls 3

captureOutputFunction · 0.85
SetModeFunction · 0.85
debugPrintErrorFunction · 0.85

Tested by

no test coverage detected