mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
more gob bugs
1) need to send slice and array types (was only sending element types) 2) compatibleType needs to use decoder's type map R=rsc CC=golang-dev https://golang.org/cl/164062
This commit is contained in:
parent
749da968e4
commit
a0f742d343
4 changed files with 69 additions and 25 deletions
|
|
@ -213,3 +213,15 @@ func TestTypeToPtrPtrPtrPtrType(t *testing.T) {
|
|||
t.Errorf("wrong value after decode: %g not %g", ****(****t2pppp).a, ****t2.a)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSlice(t *testing.T) {
|
||||
// Encode a *T, decode a T
|
||||
type Type3 struct {
|
||||
a []string;
|
||||
}
|
||||
t3p := &Type3{[]string{"hello", "world"}};
|
||||
var t3 Type3;
|
||||
if err := encAndDec(t3, t3p); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue