// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: group.proto /* Package group is a generated protocol buffer package. It is generated from these files: group.proto It has these top-level messages: Groups1 Groups2 */ package group import testing "testing" import math_rand "math/rand" import time "time" import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" import fmt "fmt" import go_parser "go/parser" import proto "github.com/gogo/protobuf/proto" import math "math" import _ "github.com/gogo/protobuf/gogoproto" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf func TestGroups1Proto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedGroups1(popr, false) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Groups1{} 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)) copy(littlefuzz, dAtA) for i := range dAtA { dAtA[i] = byte(popr.Intn(256)) } 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) } if len(littlefuzz) > 0 { fuzzamount := 100 for i := 0; i < fuzzamount; i++ { littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestGroups1_GProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedGroups1_G(popr, false) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Groups1_G{} 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)) copy(littlefuzz, dAtA) for i := range dAtA { dAtA[i] = byte(popr.Intn(256)) } 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) } if len(littlefuzz) > 0 { fuzzamount := 100 for i := 0; i < fuzzamount; i++ { littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestGroups2Proto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedGroups2(popr, false) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Groups2{} 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)) copy(littlefuzz, dAtA) for i := range dAtA { dAtA[i] = byte(popr.Intn(256)) } 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) } if len(littlefuzz) > 0 { fuzzamount := 100 for i := 0; i < fuzzamount; i++ { littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestGroups2_GProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedGroups2_G(popr, false) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Groups2_G{} 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)) copy(littlefuzz, dAtA) for i := range dAtA { dAtA[i] = byte(popr.Intn(256)) } 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) } if len(littlefuzz) > 0 { fuzzamount := 100 for i := 0; i < fuzzamount; i++ { littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestGroups1JSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedGroups1(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Groups1{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if 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 !Json Equal %#v", seed, msg, p) } } func TestGroups1_GJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedGroups1_G(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Groups1_G{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if 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 !Json Equal %#v", seed, msg, p) } } func TestGroups2JSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedGroups2(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Groups2{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if 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 !Json Equal %#v", seed, msg, p) } } func TestGroups2_GJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedGroups2_G(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Groups2_G{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if 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 !Json Equal %#v", seed, msg, p) } } func TestGroups1ProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedGroups1(popr, true) dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Groups1{} 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 TestGroups1ProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedGroups1(popr, true) dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Groups1{} 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 TestGroups1_GProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedGroups1_G(popr, true) dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Groups1_G{} 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 TestGroups1_GProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedGroups1_G(popr, true) dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Groups1_G{} 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 TestGroups2ProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedGroups2(popr, true) dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Groups2{} 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 TestGroups2ProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedGroups2(popr, true) dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Groups2{} 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 TestGroups2_GProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedGroups2_G(popr, true) dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Groups2_G{} 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 TestGroups2_GProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedGroups2_G(popr, true) dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Groups2_G{} 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 TestGroupDescription(t *testing.T) { GroupDescription() } func TestGroups1VerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedGroups1(popr, false) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } msg := &Groups1{} if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } func TestGroups1_GVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedGroups1_G(popr, false) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } msg := &Groups1_G{} if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } func TestGroups2VerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedGroups2(popr, false) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } msg := &Groups2{} if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } func TestGroups2_GVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedGroups2_G(popr, false) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } msg := &Groups2_G{} if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } func TestGroups1GoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedGroups1(popr, false) s1 := p.GoString() s2 := fmt.Sprintf("%#v", p) if s1 != s2 { t.Fatalf("GoString want %v got %v", s1, s2) } _, err := go_parser.ParseExpr(s1) if err != nil { panic(err) } } func TestGroups1_GGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedGroups1_G(popr, false) s1 := p.GoString() s2 := fmt.Sprintf("%#v", p) if s1 != s2 { t.Fatalf("GoString want %v got %v", s1, s2) } _, err := go_parser.ParseExpr(s1) if err != nil { panic(err) } } func TestGroups2GoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedGroups2(popr, false) s1 := p.GoString() s2 := fmt.Sprintf("%#v", p) if s1 != s2 { t.Fatalf("GoString want %v got %v", s1, s2) } _, err := go_parser.ParseExpr(s1) if err != nil { panic(err) } } func TestGroups2_GGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedGroups2_G(popr, false) s1 := p.GoString() s2 := fmt.Sprintf("%#v", p) if s1 != s2 { t.Fatalf("GoString want %v got %v", s1, s2) } _, err := go_parser.ParseExpr(s1) if err != nil { panic(err) } } func TestGroups1Stringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedGroups1(popr, false) s1 := p.String() s2 := fmt.Sprintf("%v", p) if s1 != s2 { t.Fatalf("String want %v got %v", s1, s2) } } func TestGroups1_GStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedGroups1_G(popr, false) s1 := p.String() s2 := fmt.Sprintf("%v", p) if s1 != s2 { t.Fatalf("String want %v got %v", s1, s2) } } func TestGroups2Stringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedGroups2(popr, false) s1 := p.String() s2 := fmt.Sprintf("%v", p) if s1 != s2 { t.Fatalf("String want %v got %v", s1, s2) } } func TestGroups2_GStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedGroups2_G(popr, false) s1 := p.String() s2 := fmt.Sprintf("%v", p) if s1 != s2 { t.Fatalf("String want %v got %v", s1, s2) } } //These tests are generated by github.com/gogo/protobuf/plugin/testgen