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

Function TestNinEmbeddedStructProtoCompactText

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

Source from the content-addressed store, hash-verified

8777}
8778
8779func TestNinEmbeddedStructProtoCompactText(t *testing.T) {
8780 seed := time.Now().UnixNano()
8781 popr := math_rand.New(math_rand.NewSource(seed))
8782 p := NewPopulatedNinEmbeddedStruct(popr, true)
8783 dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
8784 msg := &NinEmbeddedStruct{}
8785 if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
8786 t.Fatalf("seed = %d, err = %v", seed, err)
8787 }
8788 if err := p.VerboseEqual(msg); err != nil {
8789 t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
8790 }
8791 if !p.Equal(msg) {
8792 t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
8793 }
8794}
8795
8796func TestNidNestedStructProtoText(t *testing.T) {
8797 seed := time.Now().UnixNano()

Callers

nothing calls this directly

Calls 4

VerboseEqualMethod · 0.65
EqualMethod · 0.65
UnmarshalTextMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…