Esempio n. 1
0
func TestFooProtoCompactText(t *testing.T) {
	popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
	p := NewPopulatedFoo(popr, true)
	data := github_com_gogo_protobuf_proto.CompactTextString(p)
	msg := &Foo{}
	if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {
		panic(err)
	}
	if !p.Equal(msg) {
		t.Fatalf("%#v !Proto %#v", msg, p)
	}
}
Esempio n. 2
0
func TestCastawayProtoCompactText(t *testing.T) {
	popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
	p := NewPopulatedCastaway(popr, true)
	data := github_com_gogo_protobuf_proto.CompactTextString(p)
	msg := &Castaway{}
	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)
	}
}
Esempio n. 3
0
func (m *OtherReplyExtensions) String() string { return proto.CompactTextString(m) }
Esempio n. 4
0
func (m *RequiredExample) String() string { return proto.CompactTextString(m) }
Esempio n. 5
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)
	}
}
Esempio n. 6
0
func (m *Foo) String() string { return proto.CompactTextString(m) }
Esempio n. 7
0
func (m *CodeGeneratorResponse) String() string { return proto.CompactTextString(m) }
Esempio n. 8
0
func (m *Inside) String() string { return proto.CompactTextString(m) }
Esempio n. 9
0
func (m *Widget) String() string { return proto.CompactTextString(m) }
Esempio n. 10
0
func (m *Repeats) String() string { return proto.CompactTextString(m) }
Esempio n. 11
0
func (m *Mappy) String() string { return proto.CompactTextString(m) }
Esempio n. 12
0
func (m *MoreDefaultsA) String() string { return proto.CompactTextString(m) }
Esempio n. 13
0
func (m *MessageWithMap) String() string { return proto.CompactTextString(m) }
Esempio n. 14
0
func (m *Nested) String() string { return proto.CompactTextString(m) }
Esempio n. 15
0
func (m *NidOptNative) String() string { return proto.CompactTextString(m) }
Esempio n. 16
0
func (m *OldReply) String() string { return proto.CompactTextString(m) }
Esempio n. 17
0
func (m *Object) String() string { return proto.CompactTextString(m) }
Esempio n. 18
0
func (m *Simple) String() string { return proto.CompactTextString(m) }
Esempio n. 19
0
func (m *SizeMessage) String() string { return proto.CompactTextString(m) }
Esempio n. 20
0
func (m *NinOptEnum) String() string { return proto.CompactTextString(m) }
Esempio n. 21
0
func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) }
Esempio n. 22
0
func (m *Request) String() string { return proto.CompactTextString(m) }
Esempio n. 23
0
func (m *IndexQuery) String() string { return proto.CompactTextString(m) }
Esempio n. 24
0
func (m *Request_SomeGroup) String() string { return proto.CompactTextString(m) }
Esempio n. 25
0
func (m *FooWithRepeated) String() string { return proto.CompactTextString(m) }
Esempio n. 26
0
func (m *Reply_Entry) String() string { return proto.CompactTextString(m) }
Esempio n. 27
0
func (m *OtherBase) String() string { return proto.CompactTextString(m) }
Esempio n. 28
0
func (m *NestedNinOptNative) String() string { return proto.CompactTextString(m) }