diff options
Diffstat (limited to 'src/bytes/buffer_test.go')
| -rw-r--r-- | src/bytes/buffer_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bytes/buffer_test.go b/src/bytes/buffer_test.go index 3c964fc6b9..97fca5a9d1 100644 --- a/src/bytes/buffer_test.go +++ b/src/bytes/buffer_test.go @@ -213,7 +213,7 @@ func TestLargeByteWrites(t *testing.T) { func TestLargeStringReads(t *testing.T) { var buf Buffer for i := 3; i < 30; i += 3 { - s := fillString(t, "TestLargeReads (1)", &buf, "", 5, testString[0:len(testString)/i]) + s := fillString(t, "TestLargeReads (1)", &buf, "", 5, testString[:len(testString)/i]) empty(t, "TestLargeReads (2)", &buf, s, make([]byte, len(testString))) } check(t, "TestLargeStringReads (3)", &buf, "") @@ -222,7 +222,7 @@ func TestLargeStringReads(t *testing.T) { func TestLargeByteReads(t *testing.T) { var buf Buffer for i := 3; i < 30; i += 3 { - s := fillBytes(t, "TestLargeReads (1)", &buf, "", 5, testBytes[0:len(testBytes)/i]) + s := fillBytes(t, "TestLargeReads (1)", &buf, "", 5, testBytes[:len(testBytes)/i]) empty(t, "TestLargeReads (2)", &buf, s, make([]byte, len(testString))) } check(t, "TestLargeByteReads (3)", &buf, "") @@ -274,7 +274,7 @@ func TestNil(t *testing.T) { func TestReadFrom(t *testing.T) { var buf Buffer for i := 3; i < 30; i += 3 { - s := fillBytes(t, "TestReadFrom (1)", &buf, "", 5, testBytes[0:len(testBytes)/i]) + s := fillBytes(t, "TestReadFrom (1)", &buf, "", 5, testBytes[:len(testBytes)/i]) var b Buffer b.ReadFrom(&buf) empty(t, "TestReadFrom (2)", &b, s, make([]byte, len(testString))) @@ -337,7 +337,7 @@ func TestReadFromNegativeReader(t *testing.T) { func TestWriteTo(t *testing.T) { var buf Buffer for i := 3; i < 30; i += 3 { - s := fillBytes(t, "TestWriteTo (1)", &buf, "", 5, testBytes[0:len(testBytes)/i]) + s := fillBytes(t, "TestWriteTo (1)", &buf, "", 5, testBytes[:len(testBytes)/i]) var b Buffer buf.WriteTo(&b) empty(t, "TestWriteTo (2)", &b, s, make([]byte, len(testString))) |
