All required fields set, no defaults provided.
(t *testing.T)
| 421 | |
| 422 | // All required fields set, no defaults provided. |
| 423 | func TestEncodeDecode1(t *testing.T) { |
| 424 | pb := initGoTest(false) |
| 425 | overify(t, pb, |
| 426 | protopack.Message{ |
| 427 | protopack.Tag{1, protopack.VarintType}, protopack.Uvarint(7), |
| 428 | protopack.Tag{4, protopack.BytesType}, protopack.LengthPrefix(protopack.Message{ |
| 429 | protopack.Tag{1, protopack.BytesType}, protopack.String("label"), |
| 430 | protopack.Tag{2, protopack.BytesType}, protopack.String("type"), |
| 431 | }), |
| 432 | protopack.Tag{10, protopack.VarintType}, protopack.Bool(true), |
| 433 | protopack.Tag{11, protopack.VarintType}, protopack.Varint(3), |
| 434 | protopack.Tag{12, protopack.VarintType}, protopack.Varint(6), |
| 435 | protopack.Tag{13, protopack.Fixed32Type}, protopack.Uint32(32), |
| 436 | protopack.Tag{14, protopack.Fixed64Type}, protopack.Uint64(64), |
| 437 | protopack.Tag{15, protopack.VarintType}, protopack.Uvarint(3232), |
| 438 | protopack.Tag{16, protopack.VarintType}, protopack.Uvarint(6464), |
| 439 | protopack.Tag{17, protopack.Fixed32Type}, protopack.Float32(3232), |
| 440 | protopack.Tag{18, protopack.Fixed64Type}, protopack.Float64(6464), |
| 441 | protopack.Tag{19, protopack.BytesType}, protopack.String("string"), |
| 442 | protopack.Tag{70, protopack.StartGroupType}, |
| 443 | protopack.Message{ |
| 444 | protopack.Tag{71, protopack.BytesType}, protopack.String("required"), |
| 445 | }, |
| 446 | protopack.Tag{70, protopack.EndGroupType}, |
| 447 | protopack.Tag{101, protopack.BytesType}, protopack.Bytes("bytes"), |
| 448 | protopack.Tag{102, protopack.VarintType}, protopack.Svarint(-32), |
| 449 | protopack.Tag{103, protopack.VarintType}, protopack.Svarint(-64), |
| 450 | protopack.Tag{104, protopack.Fixed32Type}, protopack.Int32(-32), |
| 451 | protopack.Tag{105, protopack.Fixed64Type}, protopack.Int64(-64), |
| 452 | }.Marshal()) |
| 453 | } |
| 454 | |
| 455 | // All required fields set, defaults provided. |
| 456 | func TestEncodeDecode2(t *testing.T) { |
nothing calls this directly
no test coverage detected