diff options
Diffstat (limited to 'libgo/go/encoding/base32')
-rw-r--r-- | libgo/go/encoding/base32/base32_test.go | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libgo/go/encoding/base32/base32_test.go b/libgo/go/encoding/base32/base32_test.go index 0b611db..8fb22b9 100644 --- a/libgo/go/encoding/base32/base32_test.go +++ b/libgo/go/encoding/base32/base32_test.go @@ -8,7 +8,6 @@ import ( "bytes" "errors" "io" - "io/ioutil" "strings" "testing" ) @@ -361,9 +360,9 @@ func TestBig(t *testing.T) { if err != nil { t.Fatalf("Encoder.Close() = %v want nil", err) } - decoded, err := ioutil.ReadAll(NewDecoder(StdEncoding, encoded)) + decoded, err := io.ReadAll(NewDecoder(StdEncoding, encoded)) if err != nil { - t.Fatalf("ioutil.ReadAll(NewDecoder(...)): %v", err) + t.Fatalf("io.ReadAll(NewDecoder(...)): %v", err) } if !bytes.Equal(raw, decoded) { @@ -428,14 +427,14 @@ LNEBUWIIDFON2CA3DBMJXXE5LNFY== encodedShort := strings.ReplaceAll(encoded, "\n", "") dec := NewDecoder(StdEncoding, strings.NewReader(encoded)) - res1, err := ioutil.ReadAll(dec) + res1, err := io.ReadAll(dec) if err != nil { t.Errorf("ReadAll failed: %v", err) } dec = NewDecoder(StdEncoding, strings.NewReader(encodedShort)) var res2 []byte - res2, err = ioutil.ReadAll(dec) + res2, err = io.ReadAll(dec) if err != nil { t.Errorf("ReadAll failed: %v", err) } @@ -619,7 +618,7 @@ func TestBufferedDecodingSameError(t *testing.T) { }() decoder := NewDecoder(StdEncoding, pr) - _, err := ioutil.ReadAll(decoder) + _, err := io.ReadAll(decoder) if err != testcase.expected { t.Errorf("Expected %v, got %v; case %s %+v", testcase.expected, err, testcase.prefix, chunks) @@ -718,7 +717,7 @@ func TestDecodeReadAll(t *testing.T) { encoded = strings.ReplaceAll(encoded, "=", "") } - decReader, err := ioutil.ReadAll(NewDecoder(encoding, strings.NewReader(encoded))) + decReader, err := io.ReadAll(NewDecoder(encoding, strings.NewReader(encoded))) if err != nil { t.Errorf("NewDecoder error: %v", err) } |