diff options
Diffstat (limited to 'src/pkg/encoding/gob/encoder_test.go')
| -rw-r--r-- | src/pkg/encoding/gob/encoder_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/encoding/gob/encoder_test.go b/src/pkg/encoding/gob/encoder_test.go index 4ecf51d122..299a19914a 100644 --- a/src/pkg/encoding/gob/encoder_test.go +++ b/src/pkg/encoding/gob/encoder_test.go @@ -630,7 +630,7 @@ func TestSliceReusesMemory(t *testing.T) { // Used to crash: negative count in recvMessage. func TestBadCount(t *testing.T) { b := []byte{0xfb, 0xa5, 0x82, 0x2f, 0xca, 0x1} - if err := NewDecoder(bytes.NewBuffer(b)).Decode(nil); err == nil { + if err := NewDecoder(bytes.NewReader(b)).Decode(nil); err == nil { t.Error("expected error from bad count") } else if err.Error() != errBadCount.Error() { t.Error("expected bad count error; got", err) |
