summaryrefslogtreecommitdiff
path: root/src/pkg/gob/encoder_test.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2009-12-31 12:47:20 +1100
committerRob Pike <r@golang.org>2009-12-31 12:47:20 +1100
commitde8c680b354d974627c44ddcf937fc1b8577e2d4 (patch)
treea7aeb959adbd2136b180701ee433ab65a64ac5cf /src/pkg/gob/encoder_test.go
parentc321df090fe22afe111af03e15b109c735ec3ebb (diff)
downloadgolang-de8c680b354d974627c44ddcf937fc1b8577e2d4.tar.gz
trivial bug: []byte is special but [3]byte is not.
modify a test to verify the fix. R=rsc CC=golang-dev http://codereview.appspot.com/183090 Committer: Rob Pike <r@golang.org>
Diffstat (limited to 'src/pkg/gob/encoder_test.go')
-rw-r--r--src/pkg/gob/encoder_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/gob/encoder_test.go b/src/pkg/gob/encoder_test.go
index a25ad6908..4250b8a9d 100644
--- a/src/pkg/gob/encoder_test.go
+++ b/src/pkg/gob/encoder_test.go
@@ -240,11 +240,12 @@ func TestValueError(t *testing.T) {
func TestArray(t *testing.T) {
type Type5 struct {
a [3]string
+ b [3]byte
}
type Type6 struct {
a [2]string // can't hold t5.a
}
- t5 := Type5{[3]string{"hello", ",", "world"}}
+ t5 := Type5{[3]string{"hello", ",", "world"}, [3]byte{1, 2, 3}}
var t5p Type5
if err := encAndDec(t5, &t5p); err != nil {
t.Error(err)