Lines Matching refs:Buffers
20 buffers := Buffers{
28 got, err := ioutil.ReadAll(&buffers)
35 if len(buffers) != 0 {
36 t.Errorf("len(buffers) = %d; want 0", len(buffers))
42 in Buffers
44 want Buffers
47 in: Buffers{[]byte("foo"), []byte("bar")},
49 want: Buffers{[]byte("foo"), []byte("bar")},
52 in: Buffers{[]byte("foo"), []byte("bar")},
54 want: Buffers{[]byte("o"), []byte("bar")},
57 in: Buffers{[]byte("foo"), []byte("bar")},
59 want: Buffers{[]byte("bar")},
62 in: Buffers{[]byte("foo"), []byte("bar")},
64 want: Buffers{[]byte("ar")},
67 in: Buffers{nil, nil, nil, []byte("bar")},
69 want: Buffers{[]byte("ar")},
72 in: Buffers{nil, nil, nil, []byte("foo")},
74 want: Buffers{[]byte("foo")},
77 in: Buffers{nil, nil, nil},
79 want: Buffers{},
119 buffers := make(Buffers, chunks)
120 for i := range buffers {
121 buffers[i] = want.Bytes()[i : i+1]
126 n, err = io.Copy(c, &buffers)
128 n, err = buffers.WriteTo(c)
133 if len(buffers) != 0 {
134 return fmt.Errorf("len(buffers) = %d; want 0", len(buffers))
137 return fmt.Errorf("Buffers.WriteTo returned %d; want %d", n, want.Len())
218 buffers := make(Buffers, 1<<10)
219 for i := range buffers {
220 buffers[i] = buf
222 if _, err := buffers.WriteTo(c1); err == nil {
223 t.Fatal("Buffers.WriteTo(closed conn) succeeded, want error")