(t *testing.T)
| 565 | } |
| 566 | |
| 567 | func TestCopy(t *testing.T) { |
| 568 | b := NewBuffer(16) |
| 569 | if b == nil { |
| 570 | t.Error("buffer is nil") |
| 571 | } |
| 572 | b.Copy([]byte("yellow submarine")) |
| 573 | if !bytes.Equal(b.Bytes(), []byte("yellow submarine")) { |
| 574 | t.Error("copy unsuccessful") |
| 575 | } |
| 576 | b.Destroy() |
| 577 | b.Copy([]byte("yellow submarine")) |
| 578 | if b.Bytes() != nil { |
| 579 | t.Error("buffer should be destroyed") |
| 580 | } |
| 581 | b = newNullBuffer() |
| 582 | b.Copy([]byte("yellow submarine")) |
| 583 | } |
| 584 | |
| 585 | func TestCopyAt(t *testing.T) { |
| 586 | b := NewBuffer(8) |
nothing calls this directly
no test coverage detected
searching dependent graphs…