Bumping k8s dependencies to 1.13
This commit is contained in:
185
vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.pb.go
generated
vendored
185
vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.pb.go
generated
vendored
@@ -1,18 +1,6 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: unmarshalmerge.proto
|
||||
|
||||
/*
|
||||
Package unmarshalmerge is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
unmarshalmerge.proto
|
||||
|
||||
It has these top-level messages:
|
||||
Big
|
||||
BigUnsafe
|
||||
Sub
|
||||
IntMerge
|
||||
*/
|
||||
package unmarshalmerge
|
||||
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
@@ -26,7 +14,8 @@ import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
||||
import io "io"
|
||||
import binary "encoding/binary"
|
||||
import encoding_binary "encoding/binary"
|
||||
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
@@ -40,14 +29,35 @@ var _ = math.Inf
|
||||
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
type Big struct {
|
||||
Sub *Sub `protobuf:"bytes,1,opt,name=Sub" json:"Sub,omitempty"`
|
||||
Number *int64 `protobuf:"varint,2,opt,name=Number" json:"Number,omitempty"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
Sub *Sub `protobuf:"bytes,1,opt,name=Sub" json:"Sub,omitempty"`
|
||||
Number *int64 `protobuf:"varint,2,opt,name=Number" json:"Number,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Big) Reset() { *m = Big{} }
|
||||
func (*Big) ProtoMessage() {}
|
||||
func (*Big) Descriptor() ([]byte, []int) { return fileDescriptorUnmarshalmerge, []int{0} }
|
||||
func (m *Big) Reset() { *m = Big{} }
|
||||
func (*Big) ProtoMessage() {}
|
||||
func (*Big) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_unmarshalmerge_5567ee50c42503cc, []int{0}
|
||||
}
|
||||
func (m *Big) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *Big) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Big.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *Big) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Big.Merge(dst, src)
|
||||
}
|
||||
func (m *Big) XXX_Size() int {
|
||||
return xxx_messageInfo_Big.Size(m)
|
||||
}
|
||||
func (m *Big) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Big.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Big proto.InternalMessageInfo
|
||||
|
||||
func (m *Big) GetSub() *Sub {
|
||||
if m != nil {
|
||||
@@ -64,14 +74,35 @@ func (m *Big) GetNumber() int64 {
|
||||
}
|
||||
|
||||
type BigUnsafe struct {
|
||||
Sub *Sub `protobuf:"bytes,1,opt,name=Sub" json:"Sub,omitempty"`
|
||||
Number *int64 `protobuf:"varint,2,opt,name=Number" json:"Number,omitempty"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
Sub *Sub `protobuf:"bytes,1,opt,name=Sub" json:"Sub,omitempty"`
|
||||
Number *int64 `protobuf:"varint,2,opt,name=Number" json:"Number,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *BigUnsafe) Reset() { *m = BigUnsafe{} }
|
||||
func (*BigUnsafe) ProtoMessage() {}
|
||||
func (*BigUnsafe) Descriptor() ([]byte, []int) { return fileDescriptorUnmarshalmerge, []int{1} }
|
||||
func (m *BigUnsafe) Reset() { *m = BigUnsafe{} }
|
||||
func (*BigUnsafe) ProtoMessage() {}
|
||||
func (*BigUnsafe) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_unmarshalmerge_5567ee50c42503cc, []int{1}
|
||||
}
|
||||
func (m *BigUnsafe) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BigUnsafe.Unmarshal(m, b)
|
||||
}
|
||||
func (m *BigUnsafe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_BigUnsafe.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *BigUnsafe) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_BigUnsafe.Merge(dst, src)
|
||||
}
|
||||
func (m *BigUnsafe) XXX_Size() int {
|
||||
return xxx_messageInfo_BigUnsafe.Size(m)
|
||||
}
|
||||
func (m *BigUnsafe) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_BigUnsafe.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_BigUnsafe proto.InternalMessageInfo
|
||||
|
||||
func (m *BigUnsafe) GetSub() *Sub {
|
||||
if m != nil {
|
||||
@@ -88,13 +119,34 @@ func (m *BigUnsafe) GetNumber() int64 {
|
||||
}
|
||||
|
||||
type Sub struct {
|
||||
SubNumber *int64 `protobuf:"varint,1,opt,name=SubNumber" json:"SubNumber,omitempty"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
SubNumber *int64 `protobuf:"varint,1,opt,name=SubNumber" json:"SubNumber,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Sub) Reset() { *m = Sub{} }
|
||||
func (*Sub) ProtoMessage() {}
|
||||
func (*Sub) Descriptor() ([]byte, []int) { return fileDescriptorUnmarshalmerge, []int{2} }
|
||||
func (m *Sub) Reset() { *m = Sub{} }
|
||||
func (*Sub) ProtoMessage() {}
|
||||
func (*Sub) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_unmarshalmerge_5567ee50c42503cc, []int{2}
|
||||
}
|
||||
func (m *Sub) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *Sub) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Sub.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *Sub) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Sub.Merge(dst, src)
|
||||
}
|
||||
func (m *Sub) XXX_Size() int {
|
||||
return xxx_messageInfo_Sub.Size(m)
|
||||
}
|
||||
func (m *Sub) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Sub.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Sub proto.InternalMessageInfo
|
||||
|
||||
func (m *Sub) GetSubNumber() int64 {
|
||||
if m != nil && m.SubNumber != nil {
|
||||
@@ -104,23 +156,44 @@ func (m *Sub) GetSubNumber() int64 {
|
||||
}
|
||||
|
||||
type IntMerge struct {
|
||||
Int64 int64 `protobuf:"varint,1,req,name=Int64" json:"Int64"`
|
||||
Int32 int32 `protobuf:"varint,2,opt,name=Int32" json:"Int32"`
|
||||
Sint32 int32 `protobuf:"zigzag32,3,req,name=Sint32" json:"Sint32"`
|
||||
Sint64 int64 `protobuf:"zigzag64,4,opt,name=Sint64" json:"Sint64"`
|
||||
Uint64 uint64 `protobuf:"varint,5,opt,name=Uint64" json:"Uint64"`
|
||||
Uint32 uint32 `protobuf:"varint,6,req,name=Uint32" json:"Uint32"`
|
||||
Fixed64 uint64 `protobuf:"fixed64,7,opt,name=Fixed64" json:"Fixed64"`
|
||||
Fixed32 uint32 `protobuf:"fixed32,8,opt,name=Fixed32" json:"Fixed32"`
|
||||
Sfixed32 int32 `protobuf:"fixed32,9,req,name=Sfixed32" json:"Sfixed32"`
|
||||
Sfixed64 int64 `protobuf:"fixed64,10,opt,name=Sfixed64" json:"Sfixed64"`
|
||||
Bool bool `protobuf:"varint,11,opt,name=Bool" json:"Bool"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
Int64 int64 `protobuf:"varint,1,req,name=Int64" json:"Int64"`
|
||||
Int32 int32 `protobuf:"varint,2,opt,name=Int32" json:"Int32"`
|
||||
Sint32 int32 `protobuf:"zigzag32,3,req,name=Sint32" json:"Sint32"`
|
||||
Sint64 int64 `protobuf:"zigzag64,4,opt,name=Sint64" json:"Sint64"`
|
||||
Uint64 uint64 `protobuf:"varint,5,opt,name=Uint64" json:"Uint64"`
|
||||
Uint32 uint32 `protobuf:"varint,6,req,name=Uint32" json:"Uint32"`
|
||||
Fixed64 uint64 `protobuf:"fixed64,7,opt,name=Fixed64" json:"Fixed64"`
|
||||
Fixed32 uint32 `protobuf:"fixed32,8,opt,name=Fixed32" json:"Fixed32"`
|
||||
Sfixed32 int32 `protobuf:"fixed32,9,req,name=Sfixed32" json:"Sfixed32"`
|
||||
Sfixed64 int64 `protobuf:"fixed64,10,opt,name=Sfixed64" json:"Sfixed64"`
|
||||
Bool bool `protobuf:"varint,11,opt,name=Bool" json:"Bool"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *IntMerge) Reset() { *m = IntMerge{} }
|
||||
func (*IntMerge) ProtoMessage() {}
|
||||
func (*IntMerge) Descriptor() ([]byte, []int) { return fileDescriptorUnmarshalmerge, []int{3} }
|
||||
func (m *IntMerge) Reset() { *m = IntMerge{} }
|
||||
func (*IntMerge) ProtoMessage() {}
|
||||
func (*IntMerge) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_unmarshalmerge_5567ee50c42503cc, []int{3}
|
||||
}
|
||||
func (m *IntMerge) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *IntMerge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_IntMerge.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *IntMerge) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_IntMerge.Merge(dst, src)
|
||||
}
|
||||
func (m *IntMerge) XXX_Size() int {
|
||||
return xxx_messageInfo_IntMerge.Size(m)
|
||||
}
|
||||
func (m *IntMerge) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_IntMerge.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_IntMerge proto.InternalMessageInfo
|
||||
|
||||
func (m *IntMerge) GetInt64() int64 {
|
||||
if m != nil {
|
||||
@@ -1297,7 +1370,7 @@ func (m *IntMerge) Unmarshal(dAtA []byte) error {
|
||||
if (iNdEx + 8) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Fixed64 = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
||||
m.Fixed64 = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
||||
iNdEx += 8
|
||||
case 8:
|
||||
if wireType != 5 {
|
||||
@@ -1307,7 +1380,7 @@ func (m *IntMerge) Unmarshal(dAtA []byte) error {
|
||||
if (iNdEx + 4) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Fixed32 = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:]))
|
||||
m.Fixed32 = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:]))
|
||||
iNdEx += 4
|
||||
case 9:
|
||||
if wireType != 5 {
|
||||
@@ -1317,7 +1390,7 @@ func (m *IntMerge) Unmarshal(dAtA []byte) error {
|
||||
if (iNdEx + 4) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Sfixed32 = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:]))
|
||||
m.Sfixed32 = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:]))
|
||||
iNdEx += 4
|
||||
hasFields[0] |= uint64(0x00000008)
|
||||
case 10:
|
||||
@@ -1328,7 +1401,7 @@ func (m *IntMerge) Unmarshal(dAtA []byte) error {
|
||||
if (iNdEx + 8) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Sfixed64 = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
||||
m.Sfixed64 = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
||||
iNdEx += 8
|
||||
case 11:
|
||||
if wireType != 0 {
|
||||
@@ -1367,16 +1440,16 @@ func (m *IntMerge) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
}
|
||||
if hasFields[0]&uint64(0x00000001) == 0 {
|
||||
return proto.NewRequiredNotSetError("Int64")
|
||||
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int64")
|
||||
}
|
||||
if hasFields[0]&uint64(0x00000002) == 0 {
|
||||
return proto.NewRequiredNotSetError("Sint32")
|
||||
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Sint32")
|
||||
}
|
||||
if hasFields[0]&uint64(0x00000004) == 0 {
|
||||
return proto.NewRequiredNotSetError("Uint32")
|
||||
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Uint32")
|
||||
}
|
||||
if hasFields[0]&uint64(0x00000008) == 0 {
|
||||
return proto.NewRequiredNotSetError("Sfixed32")
|
||||
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Sfixed32")
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
@@ -1489,9 +1562,11 @@ var (
|
||||
ErrIntOverflowUnmarshalmerge = fmt.Errorf("proto: integer overflow")
|
||||
)
|
||||
|
||||
func init() { proto.RegisterFile("unmarshalmerge.proto", fileDescriptorUnmarshalmerge) }
|
||||
func init() {
|
||||
proto.RegisterFile("unmarshalmerge.proto", fileDescriptor_unmarshalmerge_5567ee50c42503cc)
|
||||
}
|
||||
|
||||
var fileDescriptorUnmarshalmerge = []byte{
|
||||
var fileDescriptor_unmarshalmerge_5567ee50c42503cc = []byte{
|
||||
// 386 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0xd0, 0xcd, 0x8a, 0x9b, 0x50,
|
||||
0x14, 0x07, 0xf0, 0x1c, 0x35, 0xc6, 0xdc, 0xd0, 0xaf, 0xdb, 0x52, 0x2e, 0x21, 0xdc, 0x5c, 0x02,
|
||||
|
||||
213
vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmergepb_test.go
generated
vendored
213
vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmergepb_test.go
generated
vendored
@@ -1,28 +1,17 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: unmarshalmerge.proto
|
||||
|
||||
/*
|
||||
Package unmarshalmerge is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
unmarshalmerge.proto
|
||||
|
||||
It has these top-level messages:
|
||||
Big
|
||||
BigUnsafe
|
||||
Sub
|
||||
IntMerge
|
||||
*/
|
||||
package unmarshalmerge
|
||||
|
||||
import testing "testing"
|
||||
import rand "math/rand"
|
||||
import math_rand "math/rand"
|
||||
import time "time"
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
import jsonpb "github.com/gogo/protobuf/jsonpb"
|
||||
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
|
||||
import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
|
||||
import unsafe "unsafe"
|
||||
import fmt "fmt"
|
||||
import parser "go/parser"
|
||||
import go_parser "go/parser"
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
import math "math"
|
||||
import _ "github.com/gogo/protobuf/gogoproto"
|
||||
|
||||
@@ -33,14 +22,14 @@ var _ = math.Inf
|
||||
|
||||
func TestBigProto(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedBig(popr, false)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &Big{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
littlefuzz := make([]byte, len(dAtA))
|
||||
@@ -61,12 +50,12 @@ func TestBigProto(t *testing.T) {
|
||||
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
|
||||
}
|
||||
// shouldn't panic
|
||||
_ = proto.Unmarshal(littlefuzz, msg)
|
||||
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkBigProtoMarshal(b *testing.B) {
|
||||
popr := rand.New(rand.NewSource(616))
|
||||
popr := math_rand.New(math_rand.NewSource(616))
|
||||
total := 0
|
||||
pops := make([]*Big, 10000)
|
||||
for i := 0; i < 10000; i++ {
|
||||
@@ -74,7 +63,7 @@ func BenchmarkBigProtoMarshal(b *testing.B) {
|
||||
}
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
dAtA, err := proto.Marshal(pops[i%10000])
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000])
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -84,11 +73,11 @@ func BenchmarkBigProtoMarshal(b *testing.B) {
|
||||
}
|
||||
|
||||
func BenchmarkBigProtoUnmarshal(b *testing.B) {
|
||||
popr := rand.New(rand.NewSource(616))
|
||||
popr := math_rand.New(math_rand.NewSource(616))
|
||||
total := 0
|
||||
datas := make([][]byte, 10000)
|
||||
for i := 0; i < 10000; i++ {
|
||||
dAtA, err := proto.Marshal(NewPopulatedBig(popr, false))
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedBig(popr, false))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -98,7 +87,7 @@ func BenchmarkBigProtoUnmarshal(b *testing.B) {
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
total += len(datas[i%10000])
|
||||
if err := proto.Unmarshal(datas[i%10000], msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
@@ -107,14 +96,14 @@ func BenchmarkBigProtoUnmarshal(b *testing.B) {
|
||||
|
||||
func TestBigUnsafeProto(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedBigUnsafe(popr, false)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &BigUnsafe{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
littlefuzz := make([]byte, len(dAtA))
|
||||
@@ -135,12 +124,12 @@ func TestBigUnsafeProto(t *testing.T) {
|
||||
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
|
||||
}
|
||||
// shouldn't panic
|
||||
_ = proto.Unmarshal(littlefuzz, msg)
|
||||
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkBigUnsafeProtoMarshal(b *testing.B) {
|
||||
popr := rand.New(rand.NewSource(616))
|
||||
popr := math_rand.New(math_rand.NewSource(616))
|
||||
total := 0
|
||||
pops := make([]*BigUnsafe, 10000)
|
||||
for i := 0; i < 10000; i++ {
|
||||
@@ -148,7 +137,7 @@ func BenchmarkBigUnsafeProtoMarshal(b *testing.B) {
|
||||
}
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
dAtA, err := proto.Marshal(pops[i%10000])
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000])
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -158,11 +147,11 @@ func BenchmarkBigUnsafeProtoMarshal(b *testing.B) {
|
||||
}
|
||||
|
||||
func BenchmarkBigUnsafeProtoUnmarshal(b *testing.B) {
|
||||
popr := rand.New(rand.NewSource(616))
|
||||
popr := math_rand.New(math_rand.NewSource(616))
|
||||
total := 0
|
||||
datas := make([][]byte, 10000)
|
||||
for i := 0; i < 10000; i++ {
|
||||
dAtA, err := proto.Marshal(NewPopulatedBigUnsafe(popr, false))
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedBigUnsafe(popr, false))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -172,7 +161,7 @@ func BenchmarkBigUnsafeProtoUnmarshal(b *testing.B) {
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
total += len(datas[i%10000])
|
||||
if err := proto.Unmarshal(datas[i%10000], msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
@@ -181,14 +170,14 @@ func BenchmarkBigUnsafeProtoUnmarshal(b *testing.B) {
|
||||
|
||||
func TestSubProto(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedSub(popr, false)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &Sub{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
littlefuzz := make([]byte, len(dAtA))
|
||||
@@ -209,12 +198,12 @@ func TestSubProto(t *testing.T) {
|
||||
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
|
||||
}
|
||||
// shouldn't panic
|
||||
_ = proto.Unmarshal(littlefuzz, msg)
|
||||
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkSubProtoMarshal(b *testing.B) {
|
||||
popr := rand.New(rand.NewSource(616))
|
||||
popr := math_rand.New(math_rand.NewSource(616))
|
||||
total := 0
|
||||
pops := make([]*Sub, 10000)
|
||||
for i := 0; i < 10000; i++ {
|
||||
@@ -222,7 +211,7 @@ func BenchmarkSubProtoMarshal(b *testing.B) {
|
||||
}
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
dAtA, err := proto.Marshal(pops[i%10000])
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000])
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -232,11 +221,11 @@ func BenchmarkSubProtoMarshal(b *testing.B) {
|
||||
}
|
||||
|
||||
func BenchmarkSubProtoUnmarshal(b *testing.B) {
|
||||
popr := rand.New(rand.NewSource(616))
|
||||
popr := math_rand.New(math_rand.NewSource(616))
|
||||
total := 0
|
||||
datas := make([][]byte, 10000)
|
||||
for i := 0; i < 10000; i++ {
|
||||
dAtA, err := proto.Marshal(NewPopulatedSub(popr, false))
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedSub(popr, false))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -246,7 +235,7 @@ func BenchmarkSubProtoUnmarshal(b *testing.B) {
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
total += len(datas[i%10000])
|
||||
if err := proto.Unmarshal(datas[i%10000], msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
@@ -255,14 +244,14 @@ func BenchmarkSubProtoUnmarshal(b *testing.B) {
|
||||
|
||||
func TestIntMergeProto(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedIntMerge(popr, false)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &IntMerge{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
littlefuzz := make([]byte, len(dAtA))
|
||||
@@ -283,12 +272,12 @@ func TestIntMergeProto(t *testing.T) {
|
||||
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
|
||||
}
|
||||
// shouldn't panic
|
||||
_ = proto.Unmarshal(littlefuzz, msg)
|
||||
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkIntMergeProtoMarshal(b *testing.B) {
|
||||
popr := rand.New(rand.NewSource(616))
|
||||
popr := math_rand.New(math_rand.NewSource(616))
|
||||
total := 0
|
||||
pops := make([]*IntMerge, 10000)
|
||||
for i := 0; i < 10000; i++ {
|
||||
@@ -296,7 +285,7 @@ func BenchmarkIntMergeProtoMarshal(b *testing.B) {
|
||||
}
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
dAtA, err := proto.Marshal(pops[i%10000])
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000])
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -306,11 +295,11 @@ func BenchmarkIntMergeProtoMarshal(b *testing.B) {
|
||||
}
|
||||
|
||||
func BenchmarkIntMergeProtoUnmarshal(b *testing.B) {
|
||||
popr := rand.New(rand.NewSource(616))
|
||||
popr := math_rand.New(math_rand.NewSource(616))
|
||||
total := 0
|
||||
datas := make([][]byte, 10000)
|
||||
for i := 0; i < 10000; i++ {
|
||||
dAtA, err := proto.Marshal(NewPopulatedIntMerge(popr, false))
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedIntMerge(popr, false))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -320,7 +309,7 @@ func BenchmarkIntMergeProtoUnmarshal(b *testing.B) {
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
total += len(datas[i%10000])
|
||||
if err := proto.Unmarshal(datas[i%10000], msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
@@ -329,15 +318,15 @@ func BenchmarkIntMergeProtoUnmarshal(b *testing.B) {
|
||||
|
||||
func TestBigJSON(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedBig(popr, true)
|
||||
marshaler := jsonpb.Marshaler{}
|
||||
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
jsondata, err := marshaler.MarshalToString(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &Big{}
|
||||
err = jsonpb.UnmarshalString(jsondata, msg)
|
||||
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
@@ -350,15 +339,15 @@ func TestBigJSON(t *testing.T) {
|
||||
}
|
||||
func TestBigUnsafeJSON(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedBigUnsafe(popr, true)
|
||||
marshaler := jsonpb.Marshaler{}
|
||||
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
jsondata, err := marshaler.MarshalToString(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &BigUnsafe{}
|
||||
err = jsonpb.UnmarshalString(jsondata, msg)
|
||||
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
@@ -371,15 +360,15 @@ func TestBigUnsafeJSON(t *testing.T) {
|
||||
}
|
||||
func TestSubJSON(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedSub(popr, true)
|
||||
marshaler := jsonpb.Marshaler{}
|
||||
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
jsondata, err := marshaler.MarshalToString(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &Sub{}
|
||||
err = jsonpb.UnmarshalString(jsondata, msg)
|
||||
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
@@ -392,15 +381,15 @@ func TestSubJSON(t *testing.T) {
|
||||
}
|
||||
func TestIntMergeJSON(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedIntMerge(popr, true)
|
||||
marshaler := jsonpb.Marshaler{}
|
||||
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
jsondata, err := marshaler.MarshalToString(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &IntMerge{}
|
||||
err = jsonpb.UnmarshalString(jsondata, msg)
|
||||
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
@@ -413,11 +402,11 @@ func TestIntMergeJSON(t *testing.T) {
|
||||
}
|
||||
func TestBigProtoText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedBig(popr, true)
|
||||
dAtA := proto.MarshalTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
|
||||
msg := &Big{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
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 {
|
||||
@@ -430,11 +419,11 @@ func TestBigProtoText(t *testing.T) {
|
||||
|
||||
func TestBigProtoCompactText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedBig(popr, true)
|
||||
dAtA := proto.CompactTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
|
||||
msg := &Big{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
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 {
|
||||
@@ -447,11 +436,11 @@ func TestBigProtoCompactText(t *testing.T) {
|
||||
|
||||
func TestBigUnsafeProtoText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedBigUnsafe(popr, true)
|
||||
dAtA := proto.MarshalTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
|
||||
msg := &BigUnsafe{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
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 {
|
||||
@@ -464,11 +453,11 @@ func TestBigUnsafeProtoText(t *testing.T) {
|
||||
|
||||
func TestBigUnsafeProtoCompactText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedBigUnsafe(popr, true)
|
||||
dAtA := proto.CompactTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
|
||||
msg := &BigUnsafe{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
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 {
|
||||
@@ -481,11 +470,11 @@ func TestBigUnsafeProtoCompactText(t *testing.T) {
|
||||
|
||||
func TestSubProtoText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedSub(popr, true)
|
||||
dAtA := proto.MarshalTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
|
||||
msg := &Sub{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
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 {
|
||||
@@ -498,11 +487,11 @@ func TestSubProtoText(t *testing.T) {
|
||||
|
||||
func TestSubProtoCompactText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedSub(popr, true)
|
||||
dAtA := proto.CompactTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
|
||||
msg := &Sub{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
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 {
|
||||
@@ -515,11 +504,11 @@ func TestSubProtoCompactText(t *testing.T) {
|
||||
|
||||
func TestIntMergeProtoText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedIntMerge(popr, true)
|
||||
dAtA := proto.MarshalTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
|
||||
msg := &IntMerge{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
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 {
|
||||
@@ -532,11 +521,11 @@ func TestIntMergeProtoText(t *testing.T) {
|
||||
|
||||
func TestIntMergeProtoCompactText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedIntMerge(popr, true)
|
||||
dAtA := proto.CompactTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
|
||||
msg := &IntMerge{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
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 {
|
||||
@@ -548,14 +537,14 @@ func TestIntMergeProtoCompactText(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestBigVerboseEqual(t *testing.T) {
|
||||
popr := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
|
||||
p := NewPopulatedBig(popr, false)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
msg := &Big{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err := p.VerboseEqual(msg); err != nil {
|
||||
@@ -567,14 +556,14 @@ func TestBigUnsafeVerboseEqual(t *testing.T) {
|
||||
if *(*byte)(unsafe.Pointer(&bigendian)) == 1 {
|
||||
t.Skip("unsafe does not work on big endian architectures")
|
||||
}
|
||||
popr := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
|
||||
p := NewPopulatedBigUnsafe(popr, false)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
msg := &BigUnsafe{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err := p.VerboseEqual(msg); err != nil {
|
||||
@@ -582,14 +571,14 @@ func TestBigUnsafeVerboseEqual(t *testing.T) {
|
||||
}
|
||||
}
|
||||
func TestSubVerboseEqual(t *testing.T) {
|
||||
popr := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
|
||||
p := NewPopulatedSub(popr, false)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
msg := &Sub{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err := p.VerboseEqual(msg); err != nil {
|
||||
@@ -597,14 +586,14 @@ func TestSubVerboseEqual(t *testing.T) {
|
||||
}
|
||||
}
|
||||
func TestIntMergeVerboseEqual(t *testing.T) {
|
||||
popr := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
|
||||
p := NewPopulatedIntMerge(popr, false)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
msg := &IntMerge{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err := p.VerboseEqual(msg); err != nil {
|
||||
@@ -612,59 +601,59 @@ func TestIntMergeVerboseEqual(t *testing.T) {
|
||||
}
|
||||
}
|
||||
func TestBigGoString(t *testing.T) {
|
||||
popr := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
|
||||
p := NewPopulatedBig(popr, false)
|
||||
s1 := p.GoString()
|
||||
s2 := fmt.Sprintf("%#v", p)
|
||||
if s1 != s2 {
|
||||
t.Fatalf("GoString want %v got %v", s1, s2)
|
||||
}
|
||||
_, err := parser.ParseExpr(s1)
|
||||
_, err := go_parser.ParseExpr(s1)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
func TestBigUnsafeGoString(t *testing.T) {
|
||||
popr := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
|
||||
p := NewPopulatedBigUnsafe(popr, false)
|
||||
s1 := p.GoString()
|
||||
s2 := fmt.Sprintf("%#v", p)
|
||||
if s1 != s2 {
|
||||
t.Fatalf("GoString want %v got %v", s1, s2)
|
||||
}
|
||||
_, err := parser.ParseExpr(s1)
|
||||
_, err := go_parser.ParseExpr(s1)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
func TestSubGoString(t *testing.T) {
|
||||
popr := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
|
||||
p := NewPopulatedSub(popr, false)
|
||||
s1 := p.GoString()
|
||||
s2 := fmt.Sprintf("%#v", p)
|
||||
if s1 != s2 {
|
||||
t.Fatalf("GoString want %v got %v", s1, s2)
|
||||
}
|
||||
_, err := parser.ParseExpr(s1)
|
||||
_, err := go_parser.ParseExpr(s1)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
func TestIntMergeGoString(t *testing.T) {
|
||||
popr := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
|
||||
p := NewPopulatedIntMerge(popr, false)
|
||||
s1 := p.GoString()
|
||||
s2 := fmt.Sprintf("%#v", p)
|
||||
if s1 != s2 {
|
||||
t.Fatalf("GoString want %v got %v", s1, s2)
|
||||
}
|
||||
_, err := parser.ParseExpr(s1)
|
||||
_, err := go_parser.ParseExpr(s1)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
func TestBigStringer(t *testing.T) {
|
||||
popr := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
|
||||
p := NewPopulatedBig(popr, false)
|
||||
s1 := p.String()
|
||||
s2 := fmt.Sprintf("%v", p)
|
||||
@@ -673,7 +662,7 @@ func TestBigStringer(t *testing.T) {
|
||||
}
|
||||
}
|
||||
func TestBigUnsafeStringer(t *testing.T) {
|
||||
popr := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
|
||||
p := NewPopulatedBigUnsafe(popr, false)
|
||||
s1 := p.String()
|
||||
s2 := fmt.Sprintf("%v", p)
|
||||
@@ -682,7 +671,7 @@ func TestBigUnsafeStringer(t *testing.T) {
|
||||
}
|
||||
}
|
||||
func TestSubStringer(t *testing.T) {
|
||||
popr := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
|
||||
p := NewPopulatedSub(popr, false)
|
||||
s1 := p.String()
|
||||
s2 := fmt.Sprintf("%v", p)
|
||||
@@ -691,7 +680,7 @@ func TestSubStringer(t *testing.T) {
|
||||
}
|
||||
}
|
||||
func TestIntMergeStringer(t *testing.T) {
|
||||
popr := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
|
||||
p := NewPopulatedIntMerge(popr, false)
|
||||
s1 := p.String()
|
||||
s2 := fmt.Sprintf("%v", p)
|
||||
|
||||
Reference in New Issue
Block a user