Beispiel #1
0
func TestIndexQueryProtoCompactText(t *testing.T) {
	seed := time.Now().UnixNano()
	popr := math_rand.New(math_rand.NewSource(seed))
	p := NewPopulatedIndexQuery(popr, true)
	data := github_com_gogo_protobuf_proto.CompactTextString(p)
	msg := &IndexQuery{}
	if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {
		t.Fatalf("seed = %d, err = %v", seed, err)
	}
	if !p.Equal(msg) {
		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
	}
}
Beispiel #2
0
func TestSampleOneOfProtoCompactText(t *testing.T) {
	seed := time.Now().UnixNano()
	popr := math_rand.New(math_rand.NewSource(seed))
	p := NewPopulatedSampleOneOf(popr, true)
	data := github_com_gogo_protobuf_proto.CompactTextString(p)
	msg := &SampleOneOf{}
	if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {
		t.Fatalf("seed = %d, err = %v", seed, err)
	}
	if err := p.VerboseEqual(msg); err != nil {
		t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
	}
	if !p.Equal(msg) {
		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
	}
}
Beispiel #3
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 #4
0
func (m *Message) String() string { return proto.CompactTextString(m) }
Beispiel #5
0
func (m *Inside) String() string { return proto.CompactTextString(m) }
Beispiel #6
0
func (m *MoreDefaultsA) String() string { return proto.CompactTextString(m) }
Beispiel #7
0
func (m *CodeGeneratorResponse) String() string { return proto.CompactTextString(m) }
Beispiel #8
0
func (m *Communique_SomeGroup) String() string { return proto.CompactTextString(m) }
func (m *Simple3) String() string { return proto.CompactTextString(m) }
Beispiel #10
0
func (m *OrderedFields) String() string { return proto.CompactTextString(m) }
Beispiel #11
0
func (m *Object) String() string { return proto.CompactTextString(m) }
Beispiel #12
0
func (m *MsgWithOneof) String() string { return proto.CompactTextString(m) }
Beispiel #13
0
func (m *Widget) String() string { return proto.CompactTextString(m) }
Beispiel #14
0
func (m *Repeats) String() string { return proto.CompactTextString(m) }
Beispiel #15
0
func (m *OtherReplyExtensions) String() string { return proto.CompactTextString(m) }
Beispiel #16
0
func (m *OldReply) String() string { return proto.CompactTextString(m) }
func (m *Mappy) String() string { return proto.CompactTextString(m) }
Beispiel #18
0
func (m *Communique_Delta) String() string { return proto.CompactTextString(m) }
Beispiel #19
0
func (m *Bar) String() string { return proto1.CompactTextString(m) }
Beispiel #20
0
func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) }
Beispiel #21
0
func (m *FooWithRepeated) String() string { return proto.CompactTextString(m) }
Beispiel #22
0
func (m *NinOptEnum) String() string { return proto.CompactTextString(m) }
Beispiel #23
0
func (m *Request) String() string { return proto.CompactTextString(m) }
Beispiel #24
0
func (m *Aproto3) String() string { return proto.CompactTextString(m) }
Beispiel #25
0
func (m *Request_SomeGroup) String() string { return proto.CompactTextString(m) }
Beispiel #26
0
func (m *Nested) String() string { return proto.CompactTextString(m) }
Beispiel #27
0
func (m *Reply_Entry) String() string { return proto.CompactTextString(m) }
Beispiel #28
0
func (m *OtherBase) String() string { return proto.CompactTextString(m) }
Beispiel #29
0
func (m *IndexQueries) String() string { return proto.CompactTextString(m) }