(b *testing.B)
| 663 | } |
| 664 | |
| 665 | func BenchmarkReadIntWithUint64(b *testing.B) { |
| 666 | is := []int64{0, 1, 65000, rand.Int63()} |
| 667 | data := make([]byte, 0, 9*len(is)) |
| 668 | for _, n := range is { |
| 669 | data = AppendInt64(data, n) |
| 670 | } |
| 671 | rd := NewReader(NewEndlessReader(data, b)) |
| 672 | b.SetBytes(int64(len(data) / len(is))) |
| 673 | b.ReportAllocs() |
| 674 | b.ResetTimer() |
| 675 | for i := 0; i < b.N; i++ { |
| 676 | _, err := rd.ReadUint64() |
| 677 | if err != nil { |
| 678 | b.Fatal(err) |
| 679 | } |
| 680 | } |
| 681 | } |
| 682 | |
| 683 | func TestReadBytes(t *testing.T) { |
| 684 | var buf bytes.Buffer |
nothing calls this directly
no test coverage detected
searching dependent graphs…