diff options
Diffstat (limited to 'src/pkg/gob/codec_test.go')
-rw-r--r-- | src/pkg/gob/codec_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pkg/gob/codec_test.go b/src/pkg/gob/codec_test.go index df82a5b6b..447b199cb 100644 --- a/src/pkg/gob/codec_test.go +++ b/src/pkg/gob/codec_test.go @@ -572,6 +572,7 @@ func TestEndToEnd(t *testing.T) { s2 := "string2" type T1 struct { a, b, c int + m map[string]*float n *[3]float strs *[2]string int64s *[]int64 @@ -579,10 +580,13 @@ func TestEndToEnd(t *testing.T) { y []byte t *T2 } + pi := 3.14159 + e := 2.71828 t1 := &T1{ a: 17, b: 18, c: -5, + m: map[string]*float{"pi": &pi, "e": &e}, n: &[3]float{1.5, 2.5, 3.5}, strs: &[2]string{s1, s2}, int64s: &[]int64{77, 89, 123412342134}, @@ -921,6 +925,7 @@ type IT0 struct { ignore_g string ignore_h []byte ignore_i *RT1 + ignore_m map[string]int c float } @@ -937,6 +942,7 @@ func TestIgnoredFields(t *testing.T) { it0.ignore_g = "pay no attention" it0.ignore_h = []byte("to the curtain") it0.ignore_i = &RT1{3.1, "hi", 7, "hello"} + it0.ignore_m = map[string]int{"one": 1, "two": 2} b := new(bytes.Buffer) NewEncoder(b).Encode(it0) |