(t *testing.T)
| 44 | } |
| 45 | |
| 46 | func TestDebugPrintFunc(t *testing.T) { |
| 47 | DebugPrintFunc = func(format string, values ...any) { |
| 48 | fmt.Fprintf(DefaultWriter, "[GIN-debug] "+format, values...) |
| 49 | } |
| 50 | re := captureOutput(t, func() { |
| 51 | SetMode(DebugMode) |
| 52 | debugPrint("debug print func test: %d", 123) |
| 53 | SetMode(TestMode) |
| 54 | }) |
| 55 | assert.Regexp(t, `^\[GIN-debug\] debug print func test: 123`, re) |
| 56 | } |
| 57 | |
| 58 | func TestDebugPrintError(t *testing.T) { |
| 59 | re := captureOutput(t, func() { |
nothing calls this directly
no test coverage detected