- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestPtrSetNil (0.15 sec)
-
src/reflect/all_test.go
t.Errorf("got %d, want 1234", *ip) } ip = nil vp := ValueOf(&ip).Elem() vp.Set(Zero(vp.Type())) if ip != nil { t.Errorf("got non-nil (%p), want nil", ip) } } func TestPtrSetNil(t *testing.T) { var i int32 = 1234 ip := &i vip := ValueOf(&ip) vip.Elem().Set(Zero(vip.Elem().Type())) if ip != nil { t.Errorf("got non-nil (%d), want nil", *ip) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 218.8K bytes - Viewed (0)