mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
update go tree for reflect changes
R=golang-dev, r CC=golang-dev https://golang.org/cl/4353043
This commit is contained in:
parent
fb94eb1922
commit
db5c5d6fa6
40 changed files with 693 additions and 686 deletions
|
|
@ -288,8 +288,8 @@ var pathTests = []interface{}{
|
|||
|
||||
func TestUnmarshalPaths(t *testing.T) {
|
||||
for _, pt := range pathTests {
|
||||
p := reflect.MakeZero(reflect.NewValue(pt).Type()).(*reflect.PtrValue)
|
||||
p.PointTo(reflect.MakeZero(p.Type().(*reflect.PtrType).Elem()))
|
||||
p := reflect.Zero(reflect.NewValue(pt).Type())
|
||||
p.Set(reflect.Zero(p.Type().Elem()).Addr())
|
||||
v := p.Interface()
|
||||
if err := Unmarshal(StringReader(pathTestString), v); err != nil {
|
||||
t.Fatalf("Unmarshal: %s", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue