summaryrefslogtreecommitdiff
path: root/src/pkg/encoding/ascii85/ascii85_test.go
diff options
context:
space:
mode:
authorAdam Langley <agl@golang.org>2009-11-03 17:32:08 -0800
committerAdam Langley <agl@golang.org>2009-11-03 17:32:08 -0800
commitc8d1046c026216a7d59b63df87d7ac5b2aac3eeb (patch)
treedd7496f3af101fbae184aa6e2da6e7cc3ffabc5f /src/pkg/encoding/ascii85/ascii85_test.go
parent05d7a9dafbf05eb5b1cf5e7a8ebddc2a9081665c (diff)
downloadgolang-c8d1046c026216a7d59b63df87d7ac5b2aac3eeb.tar.gz
encoding/*: reverse the order of src, dst so that dst is first.
R=rsc CC=go-dev http://go/go-review/1017021
Diffstat (limited to 'src/pkg/encoding/ascii85/ascii85_test.go')
-rw-r--r--src/pkg/encoding/ascii85/ascii85_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pkg/encoding/ascii85/ascii85_test.go b/src/pkg/encoding/ascii85/ascii85_test.go
index 0264333ab..6c3f9c87a 100644
--- a/src/pkg/encoding/ascii85/ascii85_test.go
+++ b/src/pkg/encoding/ascii85/ascii85_test.go
@@ -61,7 +61,7 @@ func strip85(s string) string {
func TestEncode(t *testing.T) {
for _, p := range pairs {
buf := make([]byte, MaxEncodedLen(len(p.decoded)));
- n := Encode(strings.Bytes(p.decoded), buf);
+ n := Encode(buf, strings.Bytes(p.decoded));
buf = buf[0:n];
testEqual(t, "Encode(%q) = %q, want %q", p.decoded, strip85(string(buf)), strip85(p.encoded));
}
@@ -100,7 +100,7 @@ func TestEncoderBuffering(t *testing.T) {
func TestDecode(t *testing.T) {
for _, p := range pairs {
dbuf := make([]byte, 4*len(p.encoded));
- nsrc, ndst, err := Decode(strings.Bytes(p.encoded), dbuf, true);
+ ndst, nsrc, err := Decode(dbuf, strings.Bytes(p.encoded), true);
testEqual(t, "Decode(%q) = error %v, want %v", p.encoded, err, os.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));
@@ -149,7 +149,7 @@ func TestDecodeCorrupt(t *testing.T) {
for _, e := range examples {
dbuf := make([]byte, 4*len(e.e));
- _, _, err := Decode(strings.Bytes(e.e), dbuf, true);
+ _, _, err := Decode(dbuf, strings.Bytes(e.e), true);
switch err := err.(type) {
case CorruptInputError:
testEqual(t, "Corruption in %q at offset %v, want %v", e.e, int(err), e.p);