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

Function TestNinEmbeddedStructGoString

test/thetestpb_test.go:12090–12102  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12088 }
12089}
12090func TestNinEmbeddedStructGoString(t *testing.T) {
12091 popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
12092 p := NewPopulatedNinEmbeddedStruct(popr, false)
12093 s1 := p.GoString()
12094 s2 := fmt.Sprintf("%#v", p)
12095 if s1 != s2 {
12096 t.Fatalf("GoString want %v got %v", s1, s2)
12097 }
12098 _, err := go_parser.ParseExpr(s1)
12099 if err != nil {
12100 t.Fatal(err)
12101 }
12102}
12103func TestNidNestedStructGoString(t *testing.T) {
12104 popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
12105 p := NewPopulatedNidNestedStruct(popr, false)

Callers

nothing calls this directly

Calls 2

GoStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…