diff options
author | Cherry Zhang <cherryyz@google.com> | 2020-10-28 09:12:20 -0400 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2020-10-28 09:12:20 -0400 |
commit | a16e30d162c1c7408db7821e7b9513cefa09c6ca (patch) | |
tree | af752ba9ba44c547df39bb0af9bff79f610ba9d5 /src/compress/lzw/writer_test.go | |
parent | 91e4d2d57bc341dd82c98247117114c851380aef (diff) | |
parent | cf6cfba4d5358404dd890f6025e573a4b2156543 (diff) | |
download | go-dev.link.tar.gz go-dev.link.zip |
[dev.link] all: merge branch 'master' into dev.linkdev.link
Clean merge.
Change-Id: Ia7b2808bc649790198d34c226a61d9e569084dc5
Diffstat (limited to 'src/compress/lzw/writer_test.go')
-rw-r--r-- | src/compress/lzw/writer_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compress/lzw/writer_test.go b/src/compress/lzw/writer_test.go index 4979f8b352..33a28bdd3a 100644 --- a/src/compress/lzw/writer_test.go +++ b/src/compress/lzw/writer_test.go @@ -67,8 +67,8 @@ func testFile(t *testing.T, fn string, order Order, litWidth int) { defer lzwr.Close() // Compare the two. - b0, err0 := ioutil.ReadAll(golden) - b1, err1 := ioutil.ReadAll(lzwr) + b0, err0 := io.ReadAll(golden) + b1, err1 := io.ReadAll(lzwr) if err0 != nil { t.Errorf("%s (order=%d litWidth=%d): %v", fn, order, litWidth, err0) return @@ -107,7 +107,7 @@ func TestWriter(t *testing.T) { } func TestWriterReturnValues(t *testing.T) { - w := NewWriter(ioutil.Discard, LSB, 8) + w := NewWriter(io.Discard, LSB, 8) n, err := w.Write([]byte("asdf")) if n != 4 || err != nil { t.Errorf("got %d, %v, want 4, nil", n, err) @@ -115,7 +115,7 @@ func TestWriterReturnValues(t *testing.T) { } func TestSmallLitWidth(t *testing.T) { - w := NewWriter(ioutil.Discard, LSB, 2) + w := NewWriter(io.Discard, LSB, 2) if _, err := w.Write([]byte{0x03}); err != nil { t.Fatalf("write a byte < 1<<2: %v", err) } @@ -148,7 +148,7 @@ func BenchmarkEncoder(b *testing.B) { b.Run(fmt.Sprint("1e", e), func(b *testing.B) { b.SetBytes(int64(n)) for i := 0; i < b.N; i++ { - w := NewWriter(ioutil.Discard, LSB, 8) + w := NewWriter(io.Discard, LSB, 8) w.Write(buf1) w.Close() } |