10 type countReadSeeker struct {
15 func (rs *countReadSeeker) Read(buf []byte) (int, error) {
16 n, err := rs.ReadSeeker.Read(buf)
21 func TestFoo(t *testing.T) {
22 r := bytes.NewReader([]byte("Hello, world!"))
23 cr := &countReadSeeker{ReadSeeker: r}
26 t.Errorf("got %d, want 13", cr.N)
32 func BenchmarkFoo(b *testing.B) {
33 for i := 0; i < b.N; i++ {
38 func fn() int { return 0 }