aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/encoding/ascii85/ascii85_test.go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-12-03 02:17:34 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-12-03 02:17:34 +0000
commit2fd401c8f190f1fe43e51a7f726f6ed6119a1f96 (patch)
tree7f76eff391f37fe6467ff4ffbc0c582c9959ea30 /libgo/go/encoding/ascii85/ascii85_test.go
parent02e9018f1616b23f1276151797216717b3564202 (diff)
downloadgcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.zip
gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.tar.gz
gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.tar.bz2
libgo: Update to weekly.2011-11-02.
From-SVN: r181964
Diffstat (limited to 'libgo/go/encoding/ascii85/ascii85_test.go')
-rw-r--r--libgo/go/encoding/ascii85/ascii85_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/libgo/go/encoding/ascii85/ascii85_test.go b/libgo/go/encoding/ascii85/ascii85_test.go
index fdfeb88..70e67d8 100644
--- a/libgo/go/encoding/ascii85/ascii85_test.go
+++ b/libgo/go/encoding/ascii85/ascii85_test.go
@@ -6,8 +6,8 @@ package ascii85
import (
"bytes"
+ "io"
"io/ioutil"
- "os"
"testing"
)
@@ -83,11 +83,11 @@ func TestEncoderBuffering(t *testing.T) {
end = len(input)
}
n, err := encoder.Write(input[pos:end])
- testEqual(t, "Write(%q) gave error %v, want %v", input[pos:end], err, os.Error(nil))
+ testEqual(t, "Write(%q) gave error %v, want %v", input[pos:end], err, error(nil))
testEqual(t, "Write(%q) gave length %v, want %v", input[pos:end], n, end-pos)
}
err := encoder.Close()
- testEqual(t, "Close gave error %v, want %v", err, os.Error(nil))
+ testEqual(t, "Close gave error %v, want %v", err, error(nil))
testEqual(t, "Encoding/%d of %q = %q, want %q", bs, bigtest.decoded, strip85(bb.String()), strip85(bigtest.encoded))
}
}
@@ -96,7 +96,7 @@ func TestDecode(t *testing.T) {
for _, p := range pairs {
dbuf := make([]byte, 4*len(p.encoded))
ndst, nsrc, err := Decode(dbuf, []byte(p.encoded), true)
- testEqual(t, "Decode(%q) = error %v, want %v", p.encoded, err, os.Error(nil))
+ testEqual(t, "Decode(%q) = error %v, want %v", p.encoded, err, error(nil))
testEqual(t, "Decode(%q) = nsrc %v, want %v", p.encoded, nsrc, len(p.encoded))
testEqual(t, "Decode(%q) = ndst %v, want %v", p.encoded, ndst, len(p.decoded))
testEqual(t, "Decode(%q) = %q, want %q", p.encoded, string(dbuf[0:ndst]), p.decoded)
@@ -113,7 +113,7 @@ func TestDecoder(t *testing.T) {
testEqual(t, "Read from %q = length %v, want %v", p.encoded, len(dbuf), len(p.decoded))
testEqual(t, "Decoding of %q = %q, want %q", p.encoded, string(dbuf), p.decoded)
if err != nil {
- testEqual(t, "Read from %q = %v, want %v", p.encoded, err, os.EOF)
+ testEqual(t, "Read from %q = %v, want %v", p.encoded, err, io.EOF)
}
}
}
@@ -125,7 +125,7 @@ func TestDecoderBuffering(t *testing.T) {
var total int
for total = 0; total < len(bigtest.decoded); {
n, err := decoder.Read(buf[total : total+bs])
- testEqual(t, "Read from %q at pos %d = %d, %v, want _, %v", bigtest.encoded, total, n, err, os.Error(nil))
+ testEqual(t, "Read from %q at pos %d = %d, %v, want _, %v", bigtest.encoded, total, n, err, error(nil))
total += n
}
testEqual(t, "Decoding/%d of %q = %q, want %q", bs, bigtest.encoded, string(buf[0:total]), bigtest.decoded)