Beispiel #1
0
func TestFooProtoCompactText(t *testing2.T) {
	popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano()))
	p := NewPopulatedFoo(popr, true)
	data := dropbox_gogoprotobuf_proto1.CompactTextString(p)
	msg := &Foo{}
	if err := dropbox_gogoprotobuf_proto1.UnmarshalText(data, msg); err != nil {
		panic(err)
	}
	if !p.Equal(msg) {
		t.Fatalf("%#v !Proto %#v", msg, p)
	}
}
Beispiel #2
0
func TestGroups2_GProtoCompactText(t *testing2.T) {
	popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano()))
	p := NewPopulatedGroups2_G(popr, true)
	data := dropbox_gogoprotobuf_proto1.CompactTextString(p)
	msg := &Groups2_G{}
	if err := dropbox_gogoprotobuf_proto1.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)
	}
}
Beispiel #3
0
func (m *EnumValueOptions) String() string { return proto.CompactTextString(m) }
Beispiel #4
0
func (m *NinOptEnum) String() string { return proto.CompactTextString(m) }
Beispiel #5
0
func (m *Request) String() string { return proto.CompactTextString(m) }
Beispiel #6
0
func (m *MessageOptions) String() string { return proto.CompactTextString(m) }
Beispiel #7
0
func (m *ServiceDescriptorProto) String() string { return proto.CompactTextString(m) }
Beispiel #8
0
func (m *DescriptorProto_ExtensionRange) String() string { return proto.CompactTextString(m) }
Beispiel #9
0
func (m *SourceCodeInfo_Location) String() string { return proto.CompactTextString(m) }
Beispiel #10
0
func (m *Foo) String() string { return proto1.CompactTextString(m) }
Beispiel #11
0
func TestCompactText(t *testing.T) {
	s := proto.CompactTextString(newTestMessage())
	if s != compactText {
		t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v\n===\n", s, compactText)
	}
}
Beispiel #12
0
func (m *OldReply) String() string { return proto.CompactTextString(m) }
Beispiel #13
0
func (m *ReplyExtensions) String() string { return proto.CompactTextString(m) }
Beispiel #14
0
func (m *Reply_Entry) String() string { return proto.CompactTextString(m) }
Beispiel #15
0
func (m *Request_SomeGroup) String() string { return proto.CompactTextString(m) }
Beispiel #16
0
func (m *ServiceOptions) String() string { return proto.CompactTextString(m) }
Beispiel #17
0
func (m *UninterpretedOption_NamePart) String() string { return proto.CompactTextString(m) }
Beispiel #18
0
func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) }
Beispiel #19
0
func (m *FileDescriptorSet) String() string { return proto.CompactTextString(m) }
Beispiel #20
0
func (m *CodeGeneratorResponse) String() string { return proto.CompactTextString(m) }
Beispiel #21
0
func (m *EnumValueDescriptorProto) String() string { return proto.CompactTextString(m) }
Beispiel #22
0
func (m *Inside) String() string { return proto.CompactTextString(m) }
Beispiel #23
0
func (m *MethodDescriptorProto) String() string { return proto.CompactTextString(m) }
Beispiel #24
0
func (m *MoreDefaultsA) String() string { return proto.CompactTextString(m) }
Beispiel #25
0
func (m *FieldOptions) String() string { return proto.CompactTextString(m) }
Beispiel #26
0
func (m *MyMessage) String() string { return proto.CompactTextString(m) }