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

Function TestNinEmbeddedStructProtoCompactText

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

Source from the content-addressed store, hash-verified

6873}
6874
6875func TestNinEmbeddedStructProtoCompactText(t *testing.T) {
6876 seed := time.Now().UnixNano()
6877 popr := math_rand.New(math_rand.NewSource(seed))
6878 p := NewPopulatedNinEmbeddedStruct(popr, true)
6879 dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
6880 msg := &NinEmbeddedStruct{}
6881 if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
6882 t.Fatalf("seed = %d, err = %v", seed, err)
6883 }
6884 if err := p.VerboseEqual(msg); err != nil {
6885 t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
6886 }
6887 if !p.Equal(msg) {
6888 t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
6889 }
6890}
6891
6892func TestNidNestedStructProtoText(t *testing.T) {
6893 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…