3 Commits

Author SHA1 Message Date
Matthias Schiffer
b950877c86
fix: handling of map entries with omitted key or value (#1348)
According to [1], map encoding must be compatible with a repeated message
using indices 1 and 2 for key and value. In particular this implies that
both key and value may be omitted when they are equal to the default
value - which some protobuf implementations like protobuf-c actually do.

The comments in the added testcase are based on the output of
protobuf-inspector [2].

[1] https://developers.google.com/protocol-buffers/docs/proto3#backwards-compatibility
[2] https://github.com/jmendeth/protobuf-inspector

Based-on-patch-by: Shrimpz <Shrimpz@qq.com>

Co-authored-by: Alexander Fenster <fenster@google.com>
2020-07-10 15:52:56 -07:00
dcodeIO
5aa296c901 Other: Coverage progress 2017-01-18 17:47:43 +01:00
dcodeIO
32e0529387 Other: Cleaned and categorized tests, coverage progress 2017-01-17 05:08:15 +01:00