mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
gob: add DecodeValue and EncodeValue
R=rsc CC=golang-dev https://golang.org/cl/1698045
This commit is contained in:
parent
6d61da6350
commit
12a4d84371
5 changed files with 30 additions and 18 deletions
|
|
@ -1028,7 +1028,7 @@ func TestInvalidField(t *testing.T) {
|
|||
var bad0 Bad0
|
||||
bad0.inter = 17
|
||||
b := new(bytes.Buffer)
|
||||
err := encode(b, &bad0)
|
||||
err := encode(b, reflect.NewValue(&bad0))
|
||||
if err == nil {
|
||||
t.Error("expected error; got none")
|
||||
} else if strings.Index(err.String(), "interface") < 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue