From de8c680b354d974627c44ddcf937fc1b8577e2d4 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Thu, 31 Dec 2009 12:47:20 +1100 Subject: 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 --- src/pkg/gob/encoder_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/pkg/gob/encoder_test.go') 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) -- cgit v1.2.3