예제 #1
0
func TestSizeMessageProtoCompactText(t *testing.T) {
	popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
	p := NewPopulatedSizeMessage(popr, true)
	data := github_com_gogo_protobuf_proto.CompactTextString(p)
	msg := &SizeMessage{}
	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)
	}
}
예제 #2
0
func TestBarProtoCompactText(t *testing.T) {
	seed := time.Now().UnixNano()
	popr := math_rand.New(math_rand.NewSource(seed))
	p := NewPopulatedBar(popr, true)
	data := github_com_gogo_protobuf_proto.CompactTextString(p)
	msg := &Bar{}
	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)
	}
}
예제 #3
0
func TestRepeatedNonNullableExternalStructProtoCompactText(t *testing.T) {
	seed := time.Now().UnixNano()
	popr := math_rand.New(math_rand.NewSource(seed))
	p := NewPopulatedRepeatedNonNullableExternalStruct(popr, true)
	dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
	msg := &RepeatedNonNullableExternalStruct{}
	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)
	}
}
func TestOperation_ExpungeProtoCompactText(t *testing16.T) {
	popr := math_rand16.New(math_rand16.NewSource(time16.Now().UnixNano()))
	p := NewPopulatedOperation_Expunge(popr, true)
	data := github_com_gogo_protobuf_proto9.CompactTextString(p)
	msg := &Operation_Expunge{}
	if err := github_com_gogo_protobuf_proto9.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)
	}
}
예제 #5
0
func TestFloatingPointProtoCompactText(t *testing.T) {
	popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
	p := NewPopulatedFloatingPoint(popr, true)
	data := github_com_gogo_protobuf_proto.CompactTextString(p)
	msg := &FloatingPoint{}
	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)
	}
}
예제 #6
0
func TestAllMapsOrderedProtoCompactText(t *testing.T) {
	seed := time.Now().UnixNano()
	popr := math_rand.New(math_rand.NewSource(seed))
	p := NewPopulatedAllMapsOrdered(popr, true)
	dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
	msg := &AllMapsOrdered{}
	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)
	}
}
func TestRebalanceCheckResponseProtoCompactText(t *testing.T) {
	seed := time.Now().UnixNano()
	popr := math_rand.New(math_rand.NewSource(seed))
	p := NewPopulatedRebalanceCheckResponse(popr, true)
	data := github_com_gogo_protobuf_proto.CompactTextString(p)
	msg := &RebalanceCheckResponse{}
	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)
	}
}
예제 #8
0
func (m *Distribution_BucketOptions_Explicit) String() string { return proto.CompactTextString(m) }
예제 #9
0
func (m *Distribution_BucketOptions_Linear) String() string { return proto.CompactTextString(m) }
예제 #10
0
func (m *FileSnapshot) String() string { return proto.CompactTextString(m) }
예제 #11
0
func (m *MetricDescriptor) String() string            { return proto.CompactTextString(m) }
예제 #12
0
func (m *Simple) String() string { return proto.CompactTextString(m) }
예제 #13
0
func (m *Widget) String() string { return proto.CompactTextString(m) }
예제 #14
0
func (m *StoreStatus) String() string { return proto.CompactTextString(m) }
예제 #15
0
func (m *SQLRequest_Cmd) String() string { return proto.CompactTextString(m) }
예제 #16
0
func (m *Result) String() string { return proto.CompactTextString(m) }
예제 #17
0
func (m *Datum) String() string { return proto.CompactTextString(m) }
예제 #18
0
func (m *PrivilegeDescriptor) String() string            { return proto.CompactTextString(m) }
예제 #19
0
func (m *UserPrivileges) String() string            { return proto.CompactTextString(m) }
예제 #20
0
func (m *Identify) String() string { return proto.CompactTextString(m) }
예제 #21
0
func (m *Session) String() string { return proto.CompactTextString(m) }
예제 #22
0
func (m *Distribution_Range) String() string { return proto.CompactTextString(m) }
예제 #23
0
func (m *MyType) String() string { return proto.CompactTextString(m) }
예제 #24
0
func (m *SQLResponseHeader) String() string { return proto.CompactTextString(m) }
예제 #25
0
func (m *Repeats) String() string { return proto.CompactTextString(m) }
예제 #26
0
func (m *OrderedFields) String() string { return proto.CompactTextString(m) }
예제 #27
0
func (m *Maps) String() string { return proto.CompactTextString(m) }
예제 #28
0
func (m *TargetSnapshot) String() string { return proto.CompactTextString(m) }
예제 #29
0
func (m *SQLRequestHeader) String() string { return proto.CompactTextString(m) }
예제 #30
0
func (m *InternalTimeSeriesSample) String() string            { return proto.CompactTextString(m) }