On Tue, May 29, 2018 at 11:30 AM Cyrus Katrak <ckat...@slack-corp.com> wrote:
> I am implementing a protobuf implementation for a new language and I am > failing the conformance test named: > > > Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.UINT64.ProtobufOutput > > The test input appears to be an optional (non-repeated) field that appears > multiple times on the wire, with the last occurrence having a value of zero > (the default value for the field). > > The expected test output appears to be the same field, appearing once on > the wire, with a value of zero. > > I am confused why this is the expected output given the Langauge Guide for > proto3 states: > > Also note that if a scalar message field is set to its default, the > value will not be serialized on the wire. > > Any clarification would be much appreciated! > The conformance test specifies output in text format, but it does not compare your output against the text format directly. Instead, it will parse the text data into proto, and serialize it again. In this case, your output will be compared to an empty byte array and your implementation has failed this test. > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to protobuf+unsubscr...@googlegroups.com. > To post to this group, send email to protobuf@googlegroups.com. > Visit this group at https://groups.google.com/group/protobuf. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.