Does Reset() reset?
(t *testing.T)
| 400 | |
| 401 | // Does Reset() reset? |
| 402 | func TestReset(t *testing.T) { |
| 403 | pb := initGoTest(true) |
| 404 | // muck with some values |
| 405 | pb.F_BoolDefaulted = proto.Bool(false) |
| 406 | pb.F_Int32Defaulted = proto.Int32(237) |
| 407 | pb.F_Int64Defaulted = proto.Int64(12346) |
| 408 | pb.F_Fixed32Defaulted = proto.Uint32(32000) |
| 409 | pb.F_Fixed64Defaulted = proto.Uint64(666) |
| 410 | pb.F_Uint32Defaulted = proto.Uint32(323232) |
| 411 | pb.F_Uint64Defaulted = nil |
| 412 | pb.F_FloatDefaulted = nil |
| 413 | pb.F_DoubleDefaulted = proto.Float64(0) |
| 414 | pb.F_StringDefaulted = proto.String("gotcha") |
| 415 | pb.F_BytesDefaulted = []byte("asdfasdf") |
| 416 | pb.F_Sint32Defaulted = proto.Int32(123) |
| 417 | pb.F_Sint64Defaulted = proto.Int64(789) |
| 418 | pb.Reset() |
| 419 | checkInitialized(pb, t) |
| 420 | } |
| 421 | |
| 422 | // All required fields set, no defaults provided. |
| 423 | func TestEncodeDecode1(t *testing.T) { |
nothing calls this directly
no test coverage detected