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

Function TestNidRepNativeProtoText

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

Source from the content-addressed store, hash-verified

8454}
8455
8456func TestNidRepNativeProtoText(t *testing.T) {
8457 seed := time.Now().UnixNano()
8458 popr := math_rand.New(math_rand.NewSource(seed))
8459 p := NewPopulatedNidRepNative(popr, true)
8460 dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
8461 msg := &NidRepNative{}
8462 if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
8463 t.Fatalf("seed = %d, err = %v", seed, err)
8464 }
8465 if err := p.VerboseEqual(msg); err != nil {
8466 t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
8467 }
8468 if !p.Equal(msg) {
8469 t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
8470 }
8471}
8472
8473func TestNidRepNativeProtoCompactText(t *testing.T) {
8474 seed := time.Now().UnixNano()

Callers

nothing calls this directly

Calls 4

NewPopulatedNidRepNativeFunction · 0.70
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…