(t *testing.T)
| 237 | } |
| 238 | |
| 239 | func (s) TestBuffer_SplitAfterFree(t *testing.T) { |
| 240 | // Verify that splitting before freeing does not panic. |
| 241 | buf := newBuffer([]byte("abcd"), mem.NopBufferPool{}) |
| 242 | buf, bufSplit := mem.SplitUnsafe(buf, 2) |
| 243 | |
| 244 | bufSplit.Free() |
| 245 | buf.Free() |
| 246 | defer checkForPanic(t, "Cannot split freed buffer") |
| 247 | mem.SplitUnsafe(buf, 2) |
| 248 | } |
| 249 | |
| 250 | type poolFunc func(*[]byte) |
| 251 |
nothing calls this directly
no test coverage detected