diff options
| author | Gabriel Aszalos <gabriel.aszalos@gmail.com> | 2017-09-20 11:10:26 +0200 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2017-09-20 13:41:03 +0000 |
| commit | 977578816ea7d0c2b5e00e612e222a8378abf11e (patch) | |
| tree | 410b79ea219e15fe431eacc24c3f91f521538763 /src/bytes/reader_test.go | |
| parent | 1b548dc5fbe5b75085d1b9b3230d5f0fdebfeaf5 (diff) | |
| download | go-977578816ea7d0c2b5e00e612e222a8378abf11e.tar.xz | |
bytes: improve test readability
This CL improves the readability of the tests in the bytes package by
naming the `data` test variable `testString`, using the same convention
as its counterpart, `testBytes`.
It additionally removes some type casting which was unnecessary.
Change-Id: If38b5606ce8bda0306bae24498f21cb8dbbb6377
Reviewed-on: https://go-review.googlesource.com/64931
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/bytes/reader_test.go')
| -rw-r--r-- | src/bytes/reader_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bytes/reader_test.go b/src/bytes/reader_test.go index 7b3034d4e0..8806876ff1 100644 --- a/src/bytes/reader_test.go +++ b/src/bytes/reader_test.go @@ -140,9 +140,9 @@ func TestReaderWriteTo(t *testing.T) { for i := 0; i < 30; i += 3 { var l int if i > 0 { - l = len(data) / i + l = len(testString) / i } - s := data[:l] + s := testString[:l] r := NewReader(testBytes[:l]) var b Buffer n, err := r.WriteTo(&b) |
