(t *testing.T)
| 56 | } |
| 57 | |
| 58 | func 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 | |
| 68 | func TestDebugPrintRoutes(t *testing.T) { |
| 69 | re := captureOutput(t, func() { |
nothing calls this directly
no test coverage detected