summaryrefslogtreecommitdiff
path: root/src/pkg/gob/codec_test.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2009-07-02 17:21:48 -0700
committerRob Pike <r@golang.org>2009-07-02 17:21:48 -0700
commita00bf865c1856a20316608f2fa497862dc268267 (patch)
tree0d895c96a0c36cf3048cd22e36280ddfa2280baf /src/pkg/gob/codec_test.go
parent2cb602f86c39b8f6fde6fe4faa90e322f8a34d61 (diff)
downloadgolang-a00bf865c1856a20316608f2fa497862dc268267.tar.gz
indirection on array elements.
R=rsc DELTA=57 (34 added, 10 deleted, 13 changed) OCL=31098 CL=31101
Diffstat (limited to 'src/pkg/gob/codec_test.go')
-rw-r--r--src/pkg/gob/codec_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pkg/gob/codec_test.go b/src/pkg/gob/codec_test.go
index 7d77c0dda..8dd252b4c 100644
--- a/src/pkg/gob/codec_test.go
+++ b/src/pkg/gob/codec_test.go
@@ -529,9 +529,12 @@ func TestEncode(t *testing.T) {
type T2 struct {
t string
}
+ s1 := "string1";
+ s2 := "string2";
type T1 struct {
a, b,c int;
n *[3]float;
+ strs *[2]string;
s string;
y []byte;
t *T2;
@@ -541,6 +544,7 @@ func TestEncode(t *testing.T) {
b: 18,
c: -5,
n: &[3]float{1.5, 2.5, 3.5},
+ strs: &[2]string{s1, s2},
s: "Now is the time",
y: strings.Bytes("hello, sailor"),
t: &T2{"this is T2"},