(t *testing.T)
| 214 | } |
| 215 | |
| 216 | func (s) TestBuffer_ReadOnlyDataAfterFree(t *testing.T) { |
| 217 | // Verify that reading before freeing does not panic. |
| 218 | buf := newBuffer([]byte("abcd"), mem.NopBufferPool{}) |
| 219 | buf.ReadOnlyData() |
| 220 | |
| 221 | buf.Free() |
| 222 | defer checkForPanic(t, "Cannot read freed buffer") |
| 223 | buf.ReadOnlyData() |
| 224 | } |
| 225 | |
| 226 | func (s) TestBuffer_RefAfterFree(t *testing.T) { |
| 227 | // Verify that acquiring a ref before freeing does not panic. |
nothing calls this directly
no test coverage detected