(t *testing.T)
| 30 | } |
| 31 | |
| 32 | func TestDebugPrint(t *testing.T) { |
| 33 | re := captureOutput(t, func() { |
| 34 | SetMode(DebugMode) |
| 35 | SetMode(ReleaseMode) |
| 36 | debugPrint("DEBUG this!") |
| 37 | SetMode(TestMode) |
| 38 | debugPrint("DEBUG this!") |
| 39 | SetMode(DebugMode) |
| 40 | debugPrint("these are %d %s", 2, "error messages") |
| 41 | SetMode(TestMode) |
| 42 | }) |
| 43 | assert.Equal(t, "[GIN-debug] these are 2 error messages\n", re) |
| 44 | } |
| 45 | |
| 46 | func TestDebugPrintFunc(t *testing.T) { |
| 47 | DebugPrintFunc = func(format string, values ...any) { |
nothing calls this directly
no test coverage detected