summaryrefslogtreecommitdiff
path: root/libgo/go/crypto/openpgp/canonical_text_test.go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-12-13 19:16:27 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-12-13 19:16:27 +0000
commit7b1c3dd9e670da2041ff1af415999310f88888ad (patch)
treec5132538d5da85ed816c7e1f9d93c4a503b838ab /libgo/go/crypto/openpgp/canonical_text_test.go
parent36cfbee133027429a681ce585643d38228ab1213 (diff)
downloadgcc-7b1c3dd9e670da2041ff1af415999310f88888ad.tar.gz
libgo: Update to weekly.2011-12-02.
From-SVN: r182295
Diffstat (limited to 'libgo/go/crypto/openpgp/canonical_text_test.go')
-rw-r--r--libgo/go/crypto/openpgp/canonical_text_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/libgo/go/crypto/openpgp/canonical_text_test.go b/libgo/go/crypto/openpgp/canonical_text_test.go
index ae54f8c83ee..841475f80c0 100644
--- a/libgo/go/crypto/openpgp/canonical_text_test.go
+++ b/libgo/go/crypto/openpgp/canonical_text_test.go
@@ -17,8 +17,8 @@ func (r recordingHash) Write(b []byte) (n int, err error) {
return r.buf.Write(b)
}
-func (r recordingHash) Sum() []byte {
- return r.buf.Bytes()
+func (r recordingHash) Sum(in []byte) []byte {
+ return append(in, r.buf.Bytes()...)
}
func (r recordingHash) Reset() {
@@ -33,7 +33,7 @@ func testCanonicalText(t *testing.T, input, expected string) {
r := recordingHash{bytes.NewBuffer(nil)}
c := NewCanonicalTextHash(r)
c.Write([]byte(input))
- result := c.Sum()
+ result := c.Sum(nil)
if expected != string(result) {
t.Errorf("input: %x got: %x want: %x", input, result, expected)
}