(t *testing.T)
| 528 | } |
| 529 | |
| 530 | func TestReader_ToBytes(t *testing.T) { |
| 531 | writer := NewBuffer() |
| 532 | want := []byte("hellotars") |
| 533 | err := writer.WriteBytes(want) |
| 534 | if err != nil { |
| 535 | t.Errorf("Write bytes failed") |
| 536 | } |
| 537 | reader := r(writer) |
| 538 | got := reader.ToBytes() |
| 539 | if string(got) != string(want) { |
| 540 | t.Errorf("Test reader ToBytes failed. want:%v, got:%v\n", want, got) |
| 541 | } |
| 542 | } |
| 543 | |
| 544 | func TestReader_unreadHead(t *testing.T) { |
| 545 | writer := NewBuffer() |
nothing calls this directly
no test coverage detected