MCPcopy
hub / github.com/gogo/protobuf / TestNidOptStructGoString

Function TestNidOptStructGoString

test/combos/both/thetestpb_test.go:13929–13941  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

13927 }
13928}
13929func TestNidOptStructGoString(t *testing.T) {
13930 popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
13931 p := NewPopulatedNidOptStruct(popr, false)
13932 s1 := p.GoString()
13933 s2 := fmt.Sprintf("%#v", p)
13934 if s1 != s2 {
13935 t.Fatalf("GoString want %v got %v", s1, s2)
13936 }
13937 _, err := go_parser.ParseExpr(s1)
13938 if err != nil {
13939 t.Fatal(err)
13940 }
13941}
13942func TestNinOptStructGoString(t *testing.T) {
13943 popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
13944 p := NewPopulatedNinOptStruct(popr, false)

Callers

nothing calls this directly

Calls 2

NewPopulatedNidOptStructFunction · 0.70
GoStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…