(setdefaults bool)
| 56 | } |
| 57 | |
| 58 | func initGoTest(setdefaults bool) *pb2.GoTest { |
| 59 | pb := new(pb2.GoTest) |
| 60 | if setdefaults { |
| 61 | pb.F_BoolDefaulted = proto.Bool(pb2.Default_GoTest_F_BoolDefaulted) |
| 62 | pb.F_Int32Defaulted = proto.Int32(pb2.Default_GoTest_F_Int32Defaulted) |
| 63 | pb.F_Int64Defaulted = proto.Int64(pb2.Default_GoTest_F_Int64Defaulted) |
| 64 | pb.F_Fixed32Defaulted = proto.Uint32(pb2.Default_GoTest_F_Fixed32Defaulted) |
| 65 | pb.F_Fixed64Defaulted = proto.Uint64(pb2.Default_GoTest_F_Fixed64Defaulted) |
| 66 | pb.F_Uint32Defaulted = proto.Uint32(pb2.Default_GoTest_F_Uint32Defaulted) |
| 67 | pb.F_Uint64Defaulted = proto.Uint64(pb2.Default_GoTest_F_Uint64Defaulted) |
| 68 | pb.F_FloatDefaulted = proto.Float32(pb2.Default_GoTest_F_FloatDefaulted) |
| 69 | pb.F_DoubleDefaulted = proto.Float64(pb2.Default_GoTest_F_DoubleDefaulted) |
| 70 | pb.F_StringDefaulted = proto.String(pb2.Default_GoTest_F_StringDefaulted) |
| 71 | pb.F_BytesDefaulted = pb2.Default_GoTest_F_BytesDefaulted |
| 72 | pb.F_Sint32Defaulted = proto.Int32(pb2.Default_GoTest_F_Sint32Defaulted) |
| 73 | pb.F_Sint64Defaulted = proto.Int64(pb2.Default_GoTest_F_Sint64Defaulted) |
| 74 | pb.F_Sfixed32Defaulted = proto.Int32(pb2.Default_GoTest_F_Sfixed32Defaulted) |
| 75 | pb.F_Sfixed64Defaulted = proto.Int64(pb2.Default_GoTest_F_Sfixed64Defaulted) |
| 76 | } |
| 77 | |
| 78 | pb.Kind = pb2.GoTest_TIME.Enum() |
| 79 | pb.RequiredField = initGoTestField() |
| 80 | pb.F_BoolRequired = proto.Bool(true) |
| 81 | pb.F_Int32Required = proto.Int32(3) |
| 82 | pb.F_Int64Required = proto.Int64(6) |
| 83 | pb.F_Fixed32Required = proto.Uint32(32) |
| 84 | pb.F_Fixed64Required = proto.Uint64(64) |
| 85 | pb.F_Uint32Required = proto.Uint32(3232) |
| 86 | pb.F_Uint64Required = proto.Uint64(6464) |
| 87 | pb.F_FloatRequired = proto.Float32(3232) |
| 88 | pb.F_DoubleRequired = proto.Float64(6464) |
| 89 | pb.F_StringRequired = proto.String("string") |
| 90 | pb.F_BytesRequired = []byte("bytes") |
| 91 | pb.F_Sint32Required = proto.Int32(-32) |
| 92 | pb.F_Sint64Required = proto.Int64(-64) |
| 93 | pb.F_Sfixed32Required = proto.Int32(-32) |
| 94 | pb.F_Sfixed64Required = proto.Int64(-64) |
| 95 | pb.Requiredgroup = initGoTest_RequiredGroup() |
| 96 | |
| 97 | return pb |
| 98 | } |
| 99 | |
| 100 | func overify(t *testing.T, pb *pb2.GoTest, want []byte) { |
| 101 | bb := new(proto.Buffer) |
no test coverage detected