func TestPBNodeProtoCompactText(t *testing.T) {
	popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
	p := NewPopulatedPBNode(popr, true)
	data := github_com_gogo_protobuf_proto.CompactTextString(p)
	msg := &PBNode{}
	if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {
		panic(err)
	}
	if err := p.VerboseEqual(msg); err != nil {
		t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err)
	}
	if !p.Equal(msg) {
		t.Fatalf("%#v !Proto %#v", msg, p)
	}
}
Exemple #2
0
func (m *Message_Wantlist_Entry) String() string { return proto.CompactTextString(m) }
Exemple #3
0
func (m *Message) String() string { return proto.CompactTextString(m) }
Exemple #4
0
func (m *Data) String() string { return proto.CompactTextString(m) }
Exemple #5
0
func (m *Record) String() string { return proto.CompactTextString(m) }
Exemple #6
0
func (m *Exchange) String() string { return proto.CompactTextString(m) }
Exemple #7
0
func (m *Propose) String() string { return proto.CompactTextString(m) }
Exemple #8
0
func (m *PrivateKey) String() string { return proto.CompactTextString(m) }
Exemple #9
0
func (m *PublicKey) String() string { return proto.CompactTextString(m) }
Exemple #10
0
func (m *Identify) String() string { return proto.CompactTextString(m) }
Exemple #11
0
func (m *IpnsEntry) String() string { return proto.CompactTextString(m) }