(t *testing.T)
| 400 | } |
| 401 | |
| 402 | func (s) TestBuffer_SliceEmpty(t *testing.T) { |
| 403 | allCtors := append(slices.Clip(ctors), namedCtor{name: "empty", newBuf: newEmptyBuf}) |
| 404 | for _, c := range allCtors { |
| 405 | t.Run(c.name, func(t *testing.T) { |
| 406 | buf := c.newBuf([]byte{1, 2, 3, 4}) |
| 407 | got := buf.Slice(0, 0) |
| 408 | if !bytes.Equal(got.ReadOnlyData(), nil) { |
| 409 | t.Fatalf("Buffer did not contain expected data. got %v, want %v", got.ReadOnlyData(), nil) |
| 410 | } |
| 411 | }) |
| 412 | } |
| 413 | } |
| 414 | |
| 415 | func (s) TestBuffer_SliceBoundsCheck(t *testing.T) { |
| 416 | type panicCase struct { |
nothing calls this directly
no test coverage detected