|
|
@@ -113,10 +113,12 @@ var SizeTests = []struct {
|
|
|
{"proto3 bytes", &proto3pb.Message{Data: []byte("wowsa")}},
|
|
|
{"proto3 bytes, empty", &proto3pb.Message{Data: []byte{}}},
|
|
|
{"proto3 enum", &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}},
|
|
|
+ {"proto3 map field with empty bytes", &proto3pb.MessageWithMap{ByteMapping: map[bool][]byte{false: []byte{}}}},
|
|
|
|
|
|
{"map field", &pb.MessageWithMap{NameMapping: map[int32]string{1: "Rob", 7: "Andrew"}}},
|
|
|
{"map field with message", &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{0x7001: &pb.FloatingPoint{F: Float64(2.0)}}}},
|
|
|
{"map field with bytes", &pb.MessageWithMap{ByteMapping: map[bool][]byte{true: []byte("this time for sure")}}},
|
|
|
+ {"map field with empty bytes", &pb.MessageWithMap{ByteMapping: map[bool][]byte{true: []byte{}}}},
|
|
|
}
|
|
|
|
|
|
func TestSize(t *testing.T) {
|