Пример #1
0
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)
	}
}
Пример #2
0
func (m *Message_Wantlist_Entry) String() string { return proto.CompactTextString(m) }
Пример #3
0
func (m *Message) String() string { return proto.CompactTextString(m) }
Пример #4
0
func (m *Data) String() string { return proto.CompactTextString(m) }
Пример #5
0
func (m *Record) String() string { return proto.CompactTextString(m) }
Пример #6
0
func (m *Exchange) String() string { return proto.CompactTextString(m) }
Пример #7
0
func (m *Propose) String() string { return proto.CompactTextString(m) }
Пример #8
0
func (m *PrivateKey) String() string { return proto.CompactTextString(m) }
Пример #9
0
func (m *PublicKey) String() string { return proto.CompactTextString(m) }
Пример #10
0
func (m *Identify) String() string { return proto.CompactTextString(m) }
Пример #11
0
func (m *IpnsEntry) String() string { return proto.CompactTextString(m) }