(t *testing.T)
| 83 | } |
| 84 | |
| 85 | func TestLogger_SetBufferPool(t *testing.T) { |
| 86 | out := &bytes.Buffer{} |
| 87 | l := New() |
| 88 | l.SetOutput(out) |
| 89 | |
| 90 | pool := new(testBufferPool) |
| 91 | l.SetBufferPool(pool) |
| 92 | |
| 93 | l.Info("test") |
| 94 | |
| 95 | assert.Equal(t, 1, pool.get, "Logger.SetBufferPool(): The BufferPool.Get() must be called") |
| 96 | assert.Len(t, pool.buffers, 1, "Logger.SetBufferPool(): The BufferPool.Put() must be called") |
| 97 | } |
nothing calls this directly
no test coverage detected