1
0
mirror of https://github.com/golang/go synced 2024-09-25 13:20:13 -06:00

bufio: fix indexes in TestWriter

This commit is contained in:
Ryan Dahl 2018-11-09 12:34:37 -05:00
parent 891682c825
commit 5d53406c70

View File

@ -550,7 +550,7 @@ func TestWriter(t *testing.T) {
t.Errorf("%s: %d bytes written", context, len(written))
}
for l := 0; l < len(written); l++ {
if written[i] != data[i] {
if written[l] != data[l] {
t.Errorf("wrong bytes written")
t.Errorf("want=%q", data[0:len(written)])
t.Errorf("have=%q", written)