From 58a3c74df04af9ed7d531e3f247677a4661a98b6 Mon Sep 17 00:00:00 2001 From: Yilun Chong Date: Fri, 23 Jun 2017 11:14:22 -0700 Subject: add test_proto2_message.proto and change conformnace/makefile.am --- conformance/Makefile.am | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'conformance') diff --git a/conformance/Makefile.am b/conformance/Makefile.am index 1a8b5748..268fc7e6 100644 --- a/conformance/Makefile.am +++ b/conformance/Makefile.am @@ -2,7 +2,11 @@ conformance_protoc_inputs = \ conformance.proto \ - $(top_srcdir)/src/google/protobuf/test_messages_proto3.proto + $(top_srcdir)/src/google/protobuf/test_messages_proto3.proto + +conformance_proto2_protoc_inputs = \ + conformance.proto \ + $(top_srcdir)/src/google/protobuf/test_messages_proto2.proto well_known_type_protoc_inputs = \ $(top_srcdir)/src/google/protobuf/any.proto \ @@ -64,6 +68,7 @@ other_language_protoc_outputs = \ com/google/protobuf/ValueOrBuilder.java \ com/google/protobuf/WrappersProto.java \ com/google/protobuf_test_messages/proto3/TestMessagesProto3.java \ + com/google/protobuf_test_messages/proto2/TestMessagesProto2.java \ google/protobuf/any.pb.cc \ google/protobuf/any.pb.h \ google/protobuf/any.rb \ @@ -84,8 +89,11 @@ other_language_protoc_outputs = \ google/protobuf/TestMessagesProto3.pbobjc.m \ google/protobuf/test_messages_proto3.pb.cc \ google/protobuf/test_messages_proto3.pb.h \ + google/protobuf/test_messages_proto2.pb.cc \ + google/protobuf/test_messages_proto2.pb.h \ google/protobuf/test_messages_proto3_pb.rb \ google/protobuf/test_messages_proto3_pb2.py \ + google/protobuf/test_messages_proto2_pb2.py \ google/protobuf/timestamp.pb.cc \ google/protobuf/timestamp.pb.h \ google/protobuf/timestamp.rb \ @@ -198,7 +206,7 @@ conformance_test_runner_SOURCES = conformance_test.h conformance_test.cc \ conformance_test_runner.cc \ third_party/jsoncpp/json.h \ third_party/jsoncpp/jsoncpp.cpp -nodist_conformance_test_runner_SOURCES = conformance.pb.cc google/protobuf/test_messages_proto3.pb.cc +nodist_conformance_test_runner_SOURCES = conformance.pb.cc google/protobuf/test_messages_proto3.pb.cc google/protobuf/test_messages_proto2.pb.cc conformance_test_runner_CPPFLAGS = -I$(top_srcdir)/src -I$(srcdir) conformance_test_runner_CXXFLAGS = -std=c++11 # Explicit deps beacuse BUILT_SOURCES are only done before a "make all/check" @@ -208,7 +216,7 @@ conformance_test_runner-conformance_test_runner.$(OBJEXT): conformance.pb.h conformance_cpp_LDADD = $(top_srcdir)/src/libprotobuf.la conformance_cpp_SOURCES = conformance_cpp.cc -nodist_conformance_cpp_SOURCES = conformance.pb.cc google/protobuf/test_messages_proto3.pb.cc +nodist_conformance_cpp_SOURCES = conformance.pb.cc google/protobuf/test_messages_proto3.pb.cc google/protobuf/test_messages_proto2.pb.cc conformance_cpp_CPPFLAGS = -I$(top_srcdir)/src # Explicit dep beacuse BUILT_SOURCES are only done before a "make all/check" # so a direct "make test_cpp" could fail if parallel enough. @@ -242,8 +250,9 @@ google-protobuf: if USE_EXTERNAL_PROTOC # Some implementations include pre-generated versions of well-known types. -protoc_middleman: $(conformance_protoc_inputs) $(well_known_type_protoc_inputs) google-protobuf +protoc_middleman: $(conformance_protoc_inputs) $(conformance_proto2_protoc_inputs) $(well_known_type_protoc_inputs) google-protobuf $(PROTOC) -I$(srcdir) -I$(top_srcdir) --cpp_out=. --java_out=. --ruby_out=. --objc_out=. --python_out=. --php_out=. --js_out=import_style=commonjs,binary:. $(conformance_protoc_inputs) + $(PROTOC) -I$(srcdir) -I$(top_srcdir) --cpp_out=. --java_out=. --python_out=. $(conformance_proto2_protoc_inputs) $(PROTOC) -I$(srcdir) -I$(top_srcdir) --cpp_out=. --java_out=. --ruby_out=. --python_out=. --php_out=. --js_out=import_style=commonjs,binary:google-protobuf $(well_known_type_protoc_inputs) ## $(PROTOC) -I$(srcdir) -I$(top_srcdir) --java_out=lite:lite $(conformance_protoc_inputs) $(well_known_type_protoc_inputs) touch protoc_middleman @@ -253,8 +262,9 @@ else # We have to cd to $(srcdir) before executing protoc because $(protoc_inputs) is # relative to srcdir, which may not be the same as the current directory when # building out-of-tree. -protoc_middleman: $(top_srcdir)/src/protoc$(EXEEXT) $(conformance_protoc_inputs) $(well_known_type_protoc_inputs) google-protobuf +protoc_middleman: $(top_srcdir)/src/protoc$(EXEEXT) $(conformance_protoc_inputs) $(conformance_proto2_protoc_inputs) $(well_known_type_protoc_inputs) google-protobuf oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/../src/protoc$(EXEEXT) -I. -I$(top_srcdir)/src --cpp_out=$$oldpwd --java_out=$$oldpwd --ruby_out=$$oldpwd --objc_out=$$oldpwd --python_out=$$oldpwd --php_out=$$oldpwd --js_out=import_style=commonjs,binary:$$oldpwd $(conformance_protoc_inputs) ) + oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/../src/protoc$(EXEEXT) -I. -I$(top_srcdir)/src --cpp_out=$$oldpwd --java_out=$$oldpwd --python_out=$$oldpwd $(conformance_proto2_protoc_inputs) ) oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/../src/protoc$(EXEEXT) -I. -I$(top_srcdir)/src --cpp_out=$$oldpwd --java_out=$$oldpwd --ruby_out=$$oldpwd --python_out=$$oldpwd --php_out=$$oldpwd --js_out=import_style=commonjs,binary:$$oldpwd/google-protobuf $(well_known_type_protoc_inputs) ) ## @mkdir -p lite ## oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/../src/protoc$(EXEEXT) -I. -I$(top_srcdir)/src --java_out=lite:$$oldpwd/lite $(conformance_protoc_inputs) $(well_known_type_protoc_inputs) ) @@ -274,7 +284,7 @@ MAINTAINERCLEANFILES = \ Makefile.in javac_middleman: ConformanceJava.java protoc_middleman $(other_language_protoc_outputs) - jar=`ls ../java/util/target/*jar-with-dependencies.jar` && javac -classpath ../java/target/classes:$$jar ConformanceJava.java com/google/protobuf/conformance/Conformance.java com/google/protobuf_test_messages/proto3/TestMessagesProto3.java + jar=`ls ../java/util/target/*jar-with-dependencies.jar` && javac -classpath ../java/target/classes:$$jar ConformanceJava.java com/google/protobuf/conformance/Conformance.java com/google/protobuf_test_messages/proto3/TestMessagesProto3.java com/google/protobuf_test_messages/proto2/TestMessagesProto2.java @touch javac_middleman conformance-java: javac_middleman -- cgit v1.2.3 From 2ad74e1606728564cc777aa4917d7e2299317eda Mon Sep 17 00:00:00 2001 From: Yilun Chong Date: Mon, 26 Jun 2017 17:46:34 -0700 Subject: add support for proto2 --- conformance/conformance.proto | 2 + conformance/conformance_ruby.rb | 19 ++- conformance/conformance_test.cc | 179 +++++++++++++++---------- conformance/conformance_test.h | 21 ++- src/google/protobuf/test_messages_proto2.proto | 8 +- 5 files changed, 142 insertions(+), 87 deletions(-) (limited to 'conformance') diff --git a/conformance/conformance.proto b/conformance/conformance.proto index 18e4b7bc..a1c42663 100644 --- a/conformance/conformance.proto +++ b/conformance/conformance.proto @@ -77,6 +77,8 @@ message ConformanceRequest { // Which format should the testee serialize its message to? WireFormat requested_output_format = 3; + + string message_type = 4; } // Represents a single test case's output. diff --git a/conformance/conformance_ruby.rb b/conformance/conformance_ruby.rb index b7b7cf1c..a1170e4c 100755 --- a/conformance/conformance_ruby.rb +++ b/conformance/conformance_ruby.rb @@ -43,12 +43,19 @@ def do_test(request) begin case request.payload when :protobuf_payload - begin - test_message = ProtobufTestMessages::Proto3::TestAllTypes.decode( - request.protobuf_payload) - rescue Google::Protobuf::ParseError => err - response.parse_error = err.message.encode('utf-8') - return response + if request.message_type.eql?('proto3') + begin + test_message = ProtobufTestMessages::Proto3::TestAllTypes.decode( + request.protobuf_payload) + rescue Google::Protobuf::ParseError => err + response.parse_error = err.message.encode('utf-8') + return response + end + elsif request.message_type.eql?('proto2') + response.skipped = "Ruby doesn't support proto2" + return respons + else + fail "Protobuf request doesn't have specific type" end when :json_payload diff --git a/conformance/conformance_test.cc b/conformance/conformance_test.cc index 67c90397..9b153fdb 100644 --- a/conformance/conformance_test.cc +++ b/conformance/conformance_test.cc @@ -35,6 +35,7 @@ #include "conformance.pb.h" #include "conformance_test.h" #include +#include #include #include @@ -60,6 +61,7 @@ using google::protobuf::util::MessageDifferencer; using google::protobuf::util::NewTypeResolverForDescriptorPool; using google::protobuf::util::Status; using protobuf_test_messages::proto3::TestAllTypes; +using protobuf_test_messages::proto2::TestAllTypesProto2; using std::string; namespace { @@ -163,8 +165,10 @@ string submsg(uint32_t fn, const string& buf) { #define UNKNOWN_FIELD 666 const FieldDescriptor* GetFieldForType(FieldDescriptor::Type type, - bool repeated) { - const Descriptor* d = TestAllTypes().GetDescriptor(); + bool repeated, bool isProto3) { + + const Descriptor* d = isProto3 ? + TestAllTypes().GetDescriptor() : TestAllTypesProto2().GetDescriptor(); for (int i = 0; i < d->field_count(); i++) { const FieldDescriptor* f = d->field(i); if (f->type() == type && f->is_repeated() == repeated) { @@ -271,7 +275,7 @@ void ConformanceTestSuite::RunTest(const string& test_name, void ConformanceTestSuite::RunValidInputTest( const string& test_name, ConformanceLevel level, const string& input, WireFormat input_format, const string& equivalent_text_format, - WireFormat requested_output) { + WireFormat requested_output, bool isProto3) { TestAllTypes reference_message; GOOGLE_CHECK( TextFormat::ParseFromString(equivalent_text_format, &reference_message)) @@ -282,9 +286,15 @@ void ConformanceTestSuite::RunValidInputTest( ConformanceResponse response; switch (input_format) { - case conformance::PROTOBUF: + case conformance::PROTOBUF: { request.set_protobuf_payload(input); + if (isProto3) { + request.set_message_type("proto3"); + } else { + request.set_message_type("proto2"); + } break; + } case conformance::JSON: request.set_json_payload(input); @@ -299,6 +309,7 @@ void ConformanceTestSuite::RunValidInputTest( RunTest(test_name, request, &response); TestAllTypes test_message; + TestAllTypesProto2 test_message_proto2; switch (response.result_case()) { case ConformanceResponse::RESULT_NOT_SET: @@ -334,11 +345,20 @@ void ConformanceTestSuite::RunValidInputTest( return; } - if (!test_message.ParseFromString(binary_protobuf)) { - ReportFailure(test_name, level, request, response, + if (isProto3) { + if (!test_message.ParseFromString(binary_protobuf)) { + ReportFailure(test_name, level, request, response, "INTERNAL ERROR: internal JSON->protobuf transcode " "yielded unparseable proto."); - return; + return; + } + } else { + if (!test_message_proto2.ParseFromString(binary_protobuf)) { + ReportFailure(test_name, level, request, response, + "INTERNAL ERROR: internal JSON->protobuf transcode " + "yielded unparseable proto."); + return; + } } break; @@ -352,10 +372,18 @@ void ConformanceTestSuite::RunValidInputTest( return; } - if (!test_message.ParseFromString(response.protobuf_payload())) { - ReportFailure(test_name, level, request, response, - "Protobuf output we received from test was unparseable."); - return; + if (isProto3) { + if (!test_message.ParseFromString(response.protobuf_payload())) { + ReportFailure(test_name, level, request, response, + "Protobuf output we received from test was unparseable."); + return; + } + } else { + if (!test_message_proto2.ParseFromString(response.protobuf_payload())) { + ReportFailure(test_name, level, request, response, + "Protobuf output we received from test was unparseable."); + return; + } } break; @@ -384,10 +412,16 @@ void ConformanceTestSuite::RunValidInputTest( // Expect that this precise protobuf will cause a parse error. void ConformanceTestSuite::ExpectParseFailureForProto( - const string& proto, const string& test_name, ConformanceLevel level) { + const string& proto, const string& test_name, ConformanceLevel level, + bool isProto3) { ConformanceRequest request; ConformanceResponse response; request.set_protobuf_payload(proto); + if (isProto3) { + request.set_message_type("proto3"); + } else { + request.set_message_type("proto2"); + } string effective_test_name = ConformanceLevelToString(level) + ".ProtobufInput." + test_name; @@ -412,8 +446,9 @@ void ConformanceTestSuite::ExpectParseFailureForProto( // // TODO(haberman): implement the second of these. void ConformanceTestSuite::ExpectHardParseFailureForProto( - const string& proto, const string& test_name, ConformanceLevel level) { - return ExpectParseFailureForProto(proto, test_name, level); + const string& proto, const string& test_name, ConformanceLevel level, + bool isProto3) { + return ExpectParseFailureForProto(proto, test_name, level, isProto3); } void ConformanceTestSuite::RunValidJsonTest( @@ -422,39 +457,40 @@ void ConformanceTestSuite::RunValidJsonTest( RunValidInputTest( ConformanceLevelToString(level) + ".JsonInput." + test_name + ".ProtobufOutput", level, input_json, conformance::JSON, - equivalent_text_format, conformance::PROTOBUF); + equivalent_text_format, conformance::PROTOBUF, true); RunValidInputTest( ConformanceLevelToString(level) + ".JsonInput." + test_name + ".JsonOutput", level, input_json, conformance::JSON, - equivalent_text_format, conformance::JSON); + equivalent_text_format, conformance::JSON, true); } void ConformanceTestSuite::RunValidJsonTestWithProtobufInput( const string& test_name, ConformanceLevel level, const TestAllTypes& input, - const string& equivalent_text_format) { + const string& equivalent_text_format, bool isProto3) { RunValidInputTest( ConformanceLevelToString(level) + ".ProtobufInput." + test_name + ".JsonOutput", level, input.SerializeAsString(), conformance::PROTOBUF, - equivalent_text_format, conformance::JSON); + equivalent_text_format, conformance::JSON, isProto3); } void ConformanceTestSuite::RunValidProtobufTest( const string& test_name, ConformanceLevel level, - const string& input_protobuf, const string& equivalent_text_format) { + const string& input_protobuf, const string& equivalent_text_format, + bool isProto3) { RunValidInputTest( ConformanceLevelToString(level) + ".ProtobufInput." + test_name + ".ProtobufOutput", level, input_protobuf, conformance::PROTOBUF, - equivalent_text_format, conformance::PROTOBUF); + equivalent_text_format, conformance::PROTOBUF, isProto3); RunValidInputTest( ConformanceLevelToString(level) + ".ProtobufInput." + test_name + ".JsonOutput", level, input_protobuf, conformance::PROTOBUF, - equivalent_text_format, conformance::JSON); + equivalent_text_format, conformance::JSON, isProto3); } void ConformanceTestSuite::RunValidProtobufTestWithMessage( const string& test_name, ConformanceLevel level, const TestAllTypes& input, - const string& equivalent_text_format) { - RunValidProtobufTest(test_name, level, input.SerializeAsString(), equivalent_text_format); + const string& equivalent_text_format, bool isProto3) { + RunValidProtobufTest(test_name, level, input.SerializeAsString(), equivalent_text_format, isProto3); } // According to proto3 JSON specification, JSON serializers follow more strict @@ -535,6 +571,7 @@ void ConformanceTestSuite::ExpectSerializeFailureForJson( ConformanceRequest request; ConformanceResponse response; request.set_protobuf_payload(payload_message.SerializeAsString()); + request.set_message_type("proto3"); string effective_test_name = ConformanceLevelToString(level) + "." + test_name + ".JsonOutput"; request.set_requested_output_format(conformance::JSON); @@ -550,6 +587,7 @@ void ConformanceTestSuite::ExpectSerializeFailureForJson( } } +//TODO: proto2? void ConformanceTestSuite::TestPrematureEOFForType(FieldDescriptor::Type type) { // Incomplete values for each wire type. static const string incompletes[6] = { @@ -561,8 +599,8 @@ void ConformanceTestSuite::TestPrematureEOFForType(FieldDescriptor::Type type) { string("abc") // 32BIT }; - const FieldDescriptor* field = GetFieldForType(type, false); - const FieldDescriptor* rep_field = GetFieldForType(type, true); + const FieldDescriptor* field = GetFieldForType(type, false, true); + const FieldDescriptor* rep_field = GetFieldForType(type, true, true); WireFormatLite::WireType wire_type = WireFormatLite::WireTypeForFieldType( static_cast(type)); const string& incomplete = incompletes[wire_type]; @@ -571,43 +609,43 @@ void ConformanceTestSuite::TestPrematureEOFForType(FieldDescriptor::Type type) { ExpectParseFailureForProto( tag(field->number(), wire_type), - "PrematureEofBeforeKnownNonRepeatedValue" + type_name, REQUIRED); + "PrematureEofBeforeKnownNonRepeatedValue" + type_name, REQUIRED, true); ExpectParseFailureForProto( tag(rep_field->number(), wire_type), - "PrematureEofBeforeKnownRepeatedValue" + type_name, REQUIRED); + "PrematureEofBeforeKnownRepeatedValue" + type_name, REQUIRED, true); ExpectParseFailureForProto( tag(UNKNOWN_FIELD, wire_type), - "PrematureEofBeforeUnknownValue" + type_name, REQUIRED); + "PrematureEofBeforeUnknownValue" + type_name, REQUIRED, true); ExpectParseFailureForProto( cat( tag(field->number(), wire_type), incomplete ), - "PrematureEofInsideKnownNonRepeatedValue" + type_name, REQUIRED); + "PrematureEofInsideKnownNonRepeatedValue" + type_name, REQUIRED, true); ExpectParseFailureForProto( cat( tag(rep_field->number(), wire_type), incomplete ), - "PrematureEofInsideKnownRepeatedValue" + type_name, REQUIRED); + "PrematureEofInsideKnownRepeatedValue" + type_name, REQUIRED, true); ExpectParseFailureForProto( cat( tag(UNKNOWN_FIELD, wire_type), incomplete ), - "PrematureEofInsideUnknownValue" + type_name, REQUIRED); + "PrematureEofInsideUnknownValue" + type_name, REQUIRED, true); if (wire_type == WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { ExpectParseFailureForProto( cat( tag(field->number(), wire_type), varint(1) ), "PrematureEofInDelimitedDataForKnownNonRepeatedValue" + type_name, - REQUIRED); + REQUIRED, true); ExpectParseFailureForProto( cat( tag(rep_field->number(), wire_type), varint(1) ), "PrematureEofInDelimitedDataForKnownRepeatedValue" + type_name, - REQUIRED); + REQUIRED, true); // EOF in the middle of delimited data for unknown value. ExpectParseFailureForProto( cat( tag(UNKNOWN_FIELD, wire_type), varint(1) ), - "PrematureEofInDelimitedDataForUnknownValue" + type_name, REQUIRED); + "PrematureEofInDelimitedDataForUnknownValue" + type_name, REQUIRED, true); if (type == FieldDescriptor::TYPE_MESSAGE) { // Submessage ends in the middle of a value. @@ -618,7 +656,7 @@ void ConformanceTestSuite::TestPrematureEOFForType(FieldDescriptor::Type type) { cat( tag(field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), varint(incomplete_submsg.size()), incomplete_submsg ), - "PrematureEofInSubmessageValue" + type_name, REQUIRED); + "PrematureEofInSubmessageValue" + type_name, REQUIRED, true); } } else if (type != FieldDescriptor::TYPE_GROUP) { // Non-delimited, non-group: eligible for packing. @@ -627,29 +665,29 @@ void ConformanceTestSuite::TestPrematureEOFForType(FieldDescriptor::Type type) { ExpectHardParseFailureForProto( cat(tag(rep_field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), varint(incomplete.size()), incomplete), - "PrematureEofInPackedFieldValue" + type_name, REQUIRED); + "PrematureEofInPackedFieldValue" + type_name, REQUIRED, true); // EOF in the middle of packed region. ExpectParseFailureForProto( cat(tag(rep_field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), varint(1)), - "PrematureEofInPackedField" + type_name, REQUIRED); + "PrematureEofInPackedField" + type_name, REQUIRED, true); } } void ConformanceTestSuite::TestValidDataForType( FieldDescriptor::Type type, - std::vector> values) { + std::vector> values, bool isProto3) { const string type_name = UpperCase(string(".") + FieldDescriptor::TypeName(type)); WireFormatLite::WireType wire_type = WireFormatLite::WireTypeForFieldType( static_cast(type)); - const FieldDescriptor* field = GetFieldForType(type, false); - const FieldDescriptor* rep_field = GetFieldForType(type, true); + const FieldDescriptor* field = GetFieldForType(type, false, isProto3); + const FieldDescriptor* rep_field = GetFieldForType(type, true, isProto3); RunValidProtobufTest("ValidDataScalar" + type_name, REQUIRED, cat(tag(field->number(), wire_type), values[0].first), - field->name() + ": " + values[0].second); + field->name() + ": " + values[0].second, isProto3); string proto; string text = field->name() + ": " + values.back().second; @@ -657,7 +695,7 @@ void ConformanceTestSuite::TestValidDataForType( proto += cat(tag(field->number(), wire_type), values[i].first); } RunValidProtobufTest("RepeatedScalarSelectsLast" + type_name, REQUIRED, - proto, text); + proto, text, isProto3); proto.clear(); text.clear(); @@ -666,7 +704,7 @@ void ConformanceTestSuite::TestValidDataForType( proto += cat(tag(rep_field->number(), wire_type), values[i].first); text += rep_field->name() + ": " + values[i].second + " "; } - RunValidProtobufTest("ValidDataRepeated" + type_name, REQUIRED, proto, text); + RunValidProtobufTest("ValidDataRepeated" + type_name, REQUIRED, proto, text, true); } void ConformanceTestSuite::SetFailureList(const string& filename, @@ -708,6 +746,7 @@ bool ConformanceTestSuite::CheckSetEmpty(const set& set_to_check, } } +// TODO: proto2? void ConformanceTestSuite::TestIllegalTags() { // field num 0 is illegal string nullfield[] = { @@ -719,7 +758,7 @@ void ConformanceTestSuite::TestIllegalTags() { for (int i = 0; i < 4; i++) { string name = "IllegalZeroFieldNum_Case_0"; name.back() += i; - ExpectParseFailureForProto(nullfield[i], name, REQUIRED); + ExpectParseFailureForProto(nullfield[i], name, REQUIRED, true); } } @@ -756,23 +795,23 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, {dbl(0.1), "0.1"}, {dbl(1.7976931348623157e+308), "1.7976931348623157e+308"}, {dbl(2.22507385850720138309e-308), "2.22507385850720138309e-308"} - }); + }, true); TestValidDataForType(FieldDescriptor::TYPE_FLOAT, { {flt(0.1), "0.1"}, {flt(1.00000075e-36), "1.00000075e-36"}, {flt(3.402823e+38), "3.402823e+38"}, // 3.40282347e+38 {flt(1.17549435e-38f), "1.17549435e-38"} - }); + }, true); TestValidDataForType(FieldDescriptor::TYPE_INT64, { {varint(12345), "12345"}, {varint(kInt64Max), std::to_string(kInt64Max)}, {varint(kInt64Min), std::to_string(kInt64Min)} - }); + }, true); TestValidDataForType(FieldDescriptor::TYPE_UINT64, { {varint(12345), "12345"}, {varint(kUint64Max), std::to_string(kUint64Max)}, {varint(0), "0"} - }); + }, true); TestValidDataForType(FieldDescriptor::TYPE_INT32, { {varint(12345), "12345"}, {longvarint(12345, 2), "12345"}, @@ -782,7 +821,7 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, {varint(1LL << 33), std::to_string(static_cast(1LL << 33))}, {varint((1LL << 33) - 1), std::to_string(static_cast((1LL << 33) - 1))}, - }); + }, true); TestValidDataForType(FieldDescriptor::TYPE_UINT32, { {varint(12345), "12345"}, {longvarint(12345, 2), "12345"}, @@ -792,42 +831,42 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, {varint(1LL << 33), std::to_string(static_cast(1LL << 33))}, {varint((1LL << 33) - 1), std::to_string(static_cast((1LL << 33) - 1))}, - }); + }, true); TestValidDataForType(FieldDescriptor::TYPE_FIXED64, { {u64(12345), "12345"}, {u64(kUint64Max), std::to_string(kUint64Max)}, {u64(0), "0"} - }); + }, true); TestValidDataForType(FieldDescriptor::TYPE_FIXED32, { {u32(12345), "12345"}, {u32(kUint32Max), std::to_string(kUint32Max)}, // UINT32_MAX {u32(0), "0"} - }); + }, true); TestValidDataForType(FieldDescriptor::TYPE_SFIXED64, { {u64(12345), "12345"}, {u64(kInt64Max), std::to_string(kInt64Max)}, {u64(kInt64Min), std::to_string(kInt64Min)} - }); + }, true); TestValidDataForType(FieldDescriptor::TYPE_SFIXED32, { {u32(12345), "12345"}, {u32(kInt32Max), std::to_string(kInt32Max)}, {u32(kInt32Min), std::to_string(kInt32Min)} - }); + }, true); TestValidDataForType(FieldDescriptor::TYPE_BOOL, { {varint(1), "true"}, {varint(0), "false"}, {varint(12345678), "true"} - }); + }, true); TestValidDataForType(FieldDescriptor::TYPE_SINT32, { {zz32(12345), "12345"}, {zz32(kInt32Max), std::to_string(kInt32Max)}, {zz32(kInt32Min), std::to_string(kInt32Min)} - }); + }, true); TestValidDataForType(FieldDescriptor::TYPE_SINT64, { {zz64(12345), "12345"}, {zz64(kInt64Max), std::to_string(kInt64Max)}, {zz64(kInt64Min), std::to_string(kInt64Min)} - }); + }, true); // TODO(haberman): // TestValidDataForType(FieldDescriptor::TYPE_STRING @@ -1337,14 +1376,14 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, WireFormatLite::DecodeFloat(0x7FA12345)); RunValidJsonTestWithProtobufInput( "FloatFieldNormalizeQuietNan", REQUIRED, message, - "optional_float: nan"); + "optional_float: nan", true); // IEEE floating-point standard 64-bit signaling NaN: // 1111 1111 1xxx xxxx xxxx xxxx xxxx xxxx message.set_optional_float( WireFormatLite::DecodeFloat(0xFFB54321)); RunValidJsonTestWithProtobufInput( "FloatFieldNormalizeSignalingNan", REQUIRED, message, - "optional_float: nan"); + "optional_float: nan", true); } // Special values must be quoted. @@ -1407,12 +1446,12 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, WireFormatLite::DecodeDouble(0x7FFA123456789ABCLL)); RunValidJsonTestWithProtobufInput( "DoubleFieldNormalizeQuietNan", REQUIRED, message, - "optional_double: nan"); + "optional_double: nan", true); message.set_optional_double( WireFormatLite::DecodeDouble(0xFFFBCBA987654321LL)); RunValidJsonTestWithProtobufInput( "DoubleFieldNormalizeSignalingNan", REQUIRED, message, - "optional_double: nan"); + "optional_double: nan", true); } // Special values must be quoted. @@ -1536,31 +1575,31 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, TestAllTypes message; message.set_oneof_uint32(0); RunValidProtobufTestWithMessage( - "OneofZeroUint32", RECOMMENDED, message, "oneof_uint32: 0"); + "OneofZeroUint32", RECOMMENDED, message, "oneof_uint32: 0", true); message.mutable_oneof_nested_message()->set_a(0); RunValidProtobufTestWithMessage( - "OneofZeroMessage", RECOMMENDED, message, "oneof_nested_message: {}"); + "OneofZeroMessage", RECOMMENDED, message, "oneof_nested_message: {}", true); message.set_oneof_string(""); RunValidProtobufTestWithMessage( - "OneofZeroString", RECOMMENDED, message, "oneof_string: \"\""); + "OneofZeroString", RECOMMENDED, message, "oneof_string: \"\"", true); message.set_oneof_bytes(""); RunValidProtobufTestWithMessage( - "OneofZeroBytes", RECOMMENDED, message, "oneof_bytes: \"\""); + "OneofZeroBytes", RECOMMENDED, message, "oneof_bytes: \"\"", true); message.set_oneof_bool(false); RunValidProtobufTestWithMessage( - "OneofZeroBool", RECOMMENDED, message, "oneof_bool: false"); + "OneofZeroBool", RECOMMENDED, message, "oneof_bool: false", true); message.set_oneof_uint64(0); RunValidProtobufTestWithMessage( - "OneofZeroUint64", RECOMMENDED, message, "oneof_uint64: 0"); + "OneofZeroUint64", RECOMMENDED, message, "oneof_uint64: 0", true); message.set_oneof_float(0.0f); RunValidProtobufTestWithMessage( - "OneofZeroFloat", RECOMMENDED, message, "oneof_float: 0"); + "OneofZeroFloat", RECOMMENDED, message, "oneof_float: 0", true); message.set_oneof_double(0.0); RunValidProtobufTestWithMessage( - "OneofZeroDouble", RECOMMENDED, message, "oneof_double: 0"); + "OneofZeroDouble", RECOMMENDED, message, "oneof_double: 0", true); message.set_oneof_enum(TestAllTypes::FOO); RunValidProtobufTestWithMessage( - "OneofZeroEnum", RECOMMENDED, message, "oneof_enum: FOO"); + "OneofZeroEnum", RECOMMENDED, message, "oneof_enum: FOO", true); } RunValidJsonTest( "OneofZeroUint32", RECOMMENDED, diff --git a/conformance/conformance_test.h b/conformance/conformance_test.h index 4e40a6ac..6bfcd72f 100644 --- a/conformance/conformance_test.h +++ b/conformance/conformance_test.h @@ -165,7 +165,8 @@ class ConformanceTestSuite { const string& input, conformance::WireFormat input_format, const string& equivalent_text_format, - conformance::WireFormat requested_output); + conformance::WireFormat requested_output, + bool isProto3); void RunValidJsonTest(const string& test_name, ConformanceLevel level, const string& input_json, @@ -174,14 +175,17 @@ class ConformanceTestSuite { const string& test_name, ConformanceLevel level, const protobuf_test_messages::proto3::TestAllTypes& input, - const string& equivalent_text_format); + const string& equivalent_text_format, + bool isProto3); void RunValidProtobufTest(const string& test_name, ConformanceLevel level, const string& input_protobuf, - const string& equivalent_text_format); + const string& equivalent_text_format, + bool isProto3); void RunValidProtobufTestWithMessage( const string& test_name, ConformanceLevel level, const protobuf_test_messages::proto3::TestAllTypes& input, - const string& equivalent_text_format); + const string& equivalent_text_format, + bool isProto3); typedef std::function Validator; void RunValidJsonTestWithValidator(const string& test_name, @@ -196,15 +200,18 @@ class ConformanceTestSuite { const string& text_format); void ExpectParseFailureForProto(const std::string& proto, const std::string& test_name, - ConformanceLevel level); + ConformanceLevel level, + bool isProto3); void ExpectHardParseFailureForProto(const std::string& proto, const std::string& test_name, - ConformanceLevel level); + ConformanceLevel level, + bool isProto3); void TestPrematureEOFForType(google::protobuf::FieldDescriptor::Type type); void TestIllegalTags(); void TestValidDataForType( google::protobuf::FieldDescriptor::Type, - std::vector> values); + std::vector> values, + bool isProto3); bool CheckSetEmpty(const set& set_to_check, const std::string& write_to_file, const std::string& msg); ConformanceTestRunner* runner_; diff --git a/src/google/protobuf/test_messages_proto2.proto b/src/google/protobuf/test_messages_proto2.proto index 0708cbe7..85aa1374 100644 --- a/src/google/protobuf/test_messages_proto2.proto +++ b/src/google/protobuf/test_messages_proto2.proto @@ -50,10 +50,10 @@ option cc_enable_arenas = true; // submessages of this message. So for example, a fuzz test of TestAllTypes // could trigger bugs that occur in any message type in this file. We verify // this stays true in a unit test. -message TestAllTypes { +message TestAllTypesProto2 { message NestedMessage { optional int32 a = 1; - optional TestAllTypes corecursive = 2; + optional TestAllTypesProto2 corecursive = 2; } enum NestedEnum { @@ -89,7 +89,7 @@ message TestAllTypes { optional string optional_string_piece = 24 [ctype=STRING_PIECE]; optional string optional_cord = 25 [ctype=CORD]; - optional TestAllTypes recursive_message = 27; + optional TestAllTypesProto2 recursive_message = 27; // Repeated repeated int32 repeated_int32 = 31; @@ -191,6 +191,6 @@ enum ForeignEnum { FOREIGN_BAZ = 2; } -extend TestAllTypes { +extend TestAllTypesProto2 { optional int32 extension_int32 = 120; } \ No newline at end of file -- cgit v1.2.3 From 18a0c2c4d2894e820f96494f33d8ca3ea33dec3a Mon Sep 17 00:00:00 2001 From: Yilun Chong Date: Tue, 27 Jun 2017 18:24:15 -0700 Subject: add proto2 supported for cpp,python,nodejs,ruby,php --- conformance/ConformanceJava$1.class | Bin 0 -> 1535 bytes conformance/ConformanceJava$BinaryDecoder$1.class | Bin 0 -> 863 bytes conformance/ConformanceJava$BinaryDecoder$2.class | Bin 0 -> 1014 bytes conformance/ConformanceJava$BinaryDecoder$3.class | Bin 0 -> 1644 bytes conformance/ConformanceJava$BinaryDecoder$4.class | Bin 0 -> 1479 bytes conformance/ConformanceJava$BinaryDecoder$5.class | Bin 0 -> 1650 bytes conformance/ConformanceJava$BinaryDecoder$6.class | Bin 0 -> 1716 bytes conformance/ConformanceJava$BinaryDecoder$7.class | Bin 0 -> 1310 bytes conformance/ConformanceJava$BinaryDecoder.class | Bin 0 -> 2220 bytes conformance/ConformanceJava.class | Bin 0 -> 7832 bytes conformance/conformance_cpp.cc | 43 +++++-- conformance/conformance_nodejs.js | 20 +++- conformance/conformance_php.php | 11 +- conformance/conformance_php.php~ | 119 +++++++++++++++++++ conformance/conformance_python.py | 33 ++++-- conformance/conformance_ruby.rb | 4 +- conformance/conformance_ruby.rb~ | 131 +++++++++++++++++++++ conformance/conformance_test.cc | 32 ++++- conformance/failure_list_ruby.txt~ | 135 ++++++++++++++++++++++ python/setup.py | 1 + ruby/lib/google/protobuf/any_pb.rb | 17 +++ ruby/lib/google/protobuf/api_pb.rb | 39 +++++++ ruby/lib/google/protobuf/duration_pb.rb | 17 +++ ruby/lib/google/protobuf/empty_pb.rb | 15 +++ ruby/lib/google/protobuf/field_mask_pb.rb | 16 +++ ruby/lib/google/protobuf/source_context_pb.rb | 16 +++ ruby/lib/google/protobuf/struct_pb.rb | 35 ++++++ ruby/lib/google/protobuf/timestamp_pb.rb | 17 +++ ruby/lib/google/protobuf/type_pb.rb | 89 ++++++++++++++ ruby/lib/google/protobuf/wrappers_pb.rb | 48 ++++++++ ruby/tests/generated_code_pb.rb | 74 ++++++++++++ ruby/tests/test_import_pb.rb | 13 +++ 32 files changed, 893 insertions(+), 32 deletions(-) create mode 100644 conformance/ConformanceJava$1.class create mode 100644 conformance/ConformanceJava$BinaryDecoder$1.class create mode 100644 conformance/ConformanceJava$BinaryDecoder$2.class create mode 100644 conformance/ConformanceJava$BinaryDecoder$3.class create mode 100644 conformance/ConformanceJava$BinaryDecoder$4.class create mode 100644 conformance/ConformanceJava$BinaryDecoder$5.class create mode 100644 conformance/ConformanceJava$BinaryDecoder$6.class create mode 100644 conformance/ConformanceJava$BinaryDecoder$7.class create mode 100644 conformance/ConformanceJava$BinaryDecoder.class create mode 100644 conformance/ConformanceJava.class create mode 100755 conformance/conformance_php.php~ create mode 100755 conformance/conformance_ruby.rb~ create mode 100644 conformance/failure_list_ruby.txt~ create mode 100644 ruby/lib/google/protobuf/any_pb.rb create mode 100644 ruby/lib/google/protobuf/api_pb.rb create mode 100644 ruby/lib/google/protobuf/duration_pb.rb create mode 100644 ruby/lib/google/protobuf/empty_pb.rb create mode 100644 ruby/lib/google/protobuf/field_mask_pb.rb create mode 100644 ruby/lib/google/protobuf/source_context_pb.rb create mode 100644 ruby/lib/google/protobuf/struct_pb.rb create mode 100644 ruby/lib/google/protobuf/timestamp_pb.rb create mode 100644 ruby/lib/google/protobuf/type_pb.rb create mode 100644 ruby/lib/google/protobuf/wrappers_pb.rb create mode 100644 ruby/tests/generated_code_pb.rb create mode 100644 ruby/tests/test_import_pb.rb (limited to 'conformance') diff --git a/conformance/ConformanceJava$1.class b/conformance/ConformanceJava$1.class new file mode 100644 index 00000000..823d4374 Binary files /dev/null and b/conformance/ConformanceJava$1.class differ diff --git a/conformance/ConformanceJava$BinaryDecoder$1.class b/conformance/ConformanceJava$BinaryDecoder$1.class new file mode 100644 index 00000000..940e39f0 Binary files /dev/null and b/conformance/ConformanceJava$BinaryDecoder$1.class differ diff --git a/conformance/ConformanceJava$BinaryDecoder$2.class b/conformance/ConformanceJava$BinaryDecoder$2.class new file mode 100644 index 00000000..64553b6f Binary files /dev/null and b/conformance/ConformanceJava$BinaryDecoder$2.class differ diff --git a/conformance/ConformanceJava$BinaryDecoder$3.class b/conformance/ConformanceJava$BinaryDecoder$3.class new file mode 100644 index 00000000..104336d5 Binary files /dev/null and b/conformance/ConformanceJava$BinaryDecoder$3.class differ diff --git a/conformance/ConformanceJava$BinaryDecoder$4.class b/conformance/ConformanceJava$BinaryDecoder$4.class new file mode 100644 index 00000000..2bfeda92 Binary files /dev/null and b/conformance/ConformanceJava$BinaryDecoder$4.class differ diff --git a/conformance/ConformanceJava$BinaryDecoder$5.class b/conformance/ConformanceJava$BinaryDecoder$5.class new file mode 100644 index 00000000..c5dea858 Binary files /dev/null and b/conformance/ConformanceJava$BinaryDecoder$5.class differ diff --git a/conformance/ConformanceJava$BinaryDecoder$6.class b/conformance/ConformanceJava$BinaryDecoder$6.class new file mode 100644 index 00000000..d617cce5 Binary files /dev/null and b/conformance/ConformanceJava$BinaryDecoder$6.class differ diff --git a/conformance/ConformanceJava$BinaryDecoder$7.class b/conformance/ConformanceJava$BinaryDecoder$7.class new file mode 100644 index 00000000..6522a5e6 Binary files /dev/null and b/conformance/ConformanceJava$BinaryDecoder$7.class differ diff --git a/conformance/ConformanceJava$BinaryDecoder.class b/conformance/ConformanceJava$BinaryDecoder.class new file mode 100644 index 00000000..3dd7ba07 Binary files /dev/null and b/conformance/ConformanceJava$BinaryDecoder.class differ diff --git a/conformance/ConformanceJava.class b/conformance/ConformanceJava.class new file mode 100644 index 00000000..74fc5e84 Binary files /dev/null and b/conformance/ConformanceJava.class differ diff --git a/conformance/conformance_cpp.cc b/conformance/conformance_cpp.cc index b865cd93..9c590702 100644 --- a/conformance/conformance_cpp.cc +++ b/conformance/conformance_cpp.cc @@ -34,6 +34,7 @@ #include "conformance.pb.h" #include +#include #include #include @@ -48,6 +49,7 @@ using google::protobuf::util::NewTypeResolverForDescriptorPool; using google::protobuf::util::Status; using google::protobuf::util::TypeResolver; using protobuf_test_messages::proto3::TestAllTypes; +using protobuf_test_messages::proto2::TestAllTypesProto2; using std::string; static const char kTypeUrlPrefix[] = "type.googleapis.com"; @@ -88,16 +90,29 @@ void CheckedWrite(int fd, const void *buf, size_t len) { void DoTest(const ConformanceRequest& request, ConformanceResponse* response) { TestAllTypes test_message; + TestAllTypesProto2 test_message_proto2; + bool isProto3 = request.message_type() == "proto3"; + bool isJson = request.payload_case() == ConformanceRequest::kJsonPayload; switch (request.payload_case()) { - case ConformanceRequest::kProtobufPayload: - if (!test_message.ParseFromString(request.protobuf_payload())) { - // Getting parse details would involve something like: - // http://stackoverflow.com/questions/22121922/how-can-i-get-more-details-about-errors-generated-during-protobuf-parsing-c - response->set_parse_error("Parse error (no more details available)."); - return; + case ConformanceRequest::kProtobufPayload: { + if (isProto3) { + if (!test_message.ParseFromString(request.protobuf_payload())) { + // Getting parse details would involve something like: + // http://stackoverflow.com/questions/22121922/how-can-i-get-more-details-about-errors-generated-during-protobuf-parsing-c + response->set_parse_error("Parse error (no more details available)."); + return; + } + } else if (request.message_type() == "proto2") { + if (!test_message_proto2.ParseFromString(request.protobuf_payload())) { + response->set_parse_error("Parse error (no more details available)."); + return; + } + } else { + GOOGLE_LOG(FATAL) << "Protobuf request doesn't have specific payload type"; } break; + } case ConformanceRequest::kJsonPayload: { string proto_binary; @@ -127,14 +142,22 @@ void DoTest(const ConformanceRequest& request, ConformanceResponse* response) { GOOGLE_LOG(FATAL) << "Unspecified output format"; break; - case conformance::PROTOBUF: - GOOGLE_CHECK( - test_message.SerializeToString(response->mutable_protobuf_payload())); + case conformance::PROTOBUF: { + (isProto3 || isJson) ? + GOOGLE_CHECK( + test_message.SerializeToString(response->mutable_protobuf_payload())) + : + GOOGLE_CHECK( + test_message_proto2.SerializeToString(response->mutable_protobuf_payload())); break; + } case conformance::JSON: { string proto_binary; - GOOGLE_CHECK(test_message.SerializeToString(&proto_binary)); + (isProto3 || isJson) ? + GOOGLE_CHECK(test_message.SerializeToString(&proto_binary)) + : + GOOGLE_CHECK(test_message_proto2.SerializeToString(&proto_binary)); Status status = BinaryToJsonString(type_resolver, *type_url, proto_binary, response->mutable_json_payload()); if (!status.ok()) { diff --git a/conformance/conformance_nodejs.js b/conformance/conformance_nodejs.js index 5ee37269..30294bf6 100755 --- a/conformance/conformance_nodejs.js +++ b/conformance/conformance_nodejs.js @@ -49,14 +49,22 @@ function doTest(request) { } switch (request.getPayloadCase()) { - case conformance.ConformanceRequest.PayloadCase.PROTOBUF_PAYLOAD: - try { - testMessage = test_messages_proto3.TestAllTypes.deserializeBinary( - request.getProtobufPayload()); - } catch (err) { - response.setParseError(err.toString()); + case conformance.ConformanceRequest.PayloadCase.PROTOBUF_PAYLOAD: { + if (request.getMessageType() == "proto3") { + try { + testMessage = test_messages_proto3.TestAllTypes.deserializeBinary( + request.getProtobufPayload()); + } catch (err) { + response.setParseError(err.toString()); + return response; + } + } else if (request.getMessageType() == "proto2"){ + response.setSkipped("NodeJS doesn\'t support proto2"); return response; + } else { + throw "Protobuf request doesn\'t have specific payload type"; } + } case conformance.ConformanceRequest.PayloadCase.JSON_PAYLOAD: response.setSkipped("JSON not supported."); diff --git a/conformance/conformance_php.php b/conformance/conformance_php.php index 20fb5082..848cb4c7 100755 --- a/conformance/conformance_php.php +++ b/conformance/conformance_php.php @@ -45,11 +45,18 @@ function doTest($request) $test_message = new \Protobuf_test_messages\Proto3\TestAllTypes(); $response = new \Conformance\ConformanceResponse(); if ($request->getPayload() == "protobuf_payload") { - try { + if ($request->getMessageType() == "proto3") { + try { $test_message->mergeFromString($request->getProtobufPayload()); - } catch (Exception $e) { + } catch (Exception $e) { $response->setParseError($e->getMessage()); return $response; + } + } elseif ($request->getMessageType() == "proto2") { + $response->setSkipped("PHP doesn't support proto2"); + return $response; + } else { + trigger_error("Protobuf request doesn't have specific payload type", E_USER_ERROR); } } elseif ($request->getPayload() == "json_payload") { try { diff --git a/conformance/conformance_php.php~ b/conformance/conformance_php.php~ new file mode 100755 index 00000000..848cb4c7 --- /dev/null +++ b/conformance/conformance_php.php~ @@ -0,0 +1,119 @@ +getPayload() == "protobuf_payload") { + if ($request->getMessageType() == "proto3") { + try { + $test_message->mergeFromString($request->getProtobufPayload()); + } catch (Exception $e) { + $response->setParseError($e->getMessage()); + return $response; + } + } elseif ($request->getMessageType() == "proto2") { + $response->setSkipped("PHP doesn't support proto2"); + return $response; + } else { + trigger_error("Protobuf request doesn't have specific payload type", E_USER_ERROR); + } + } elseif ($request->getPayload() == "json_payload") { + try { + $test_message->jsonDecode($request->getJsonPayload()); + } catch (Exception $e) { + $response->setParseError($e->getMessage()); + return $response; + } + } else { + trigger_error("Request didn't have payload.", E_USER_ERROR); + } + + if ($request->getRequestedOutputFormat() == WireFormat::UNSPECIFIED) { + trigger_error("Unspecified output format.", E_USER_ERROR); + } elseif ($request->getRequestedOutputFormat() == WireFormat::PROTOBUF) { + $response->setProtobufPayload($test_message->serializeToString()); + } elseif ($request->getRequestedOutputFormat() == WireFormat::JSON) { + $response->setJsonPayload($test_message->jsonEncode()); + } + + return $response; +} + +function doTestIO() +{ + $length_bytes = fread(STDIN, 4); + if (strlen($length_bytes) == 0) { + return false; # EOF + } elseif (strlen($length_bytes) != 4) { + trigger_error("I/O error", E_USER_ERROR); + } + + $length = unpack("V", $length_bytes)[1]; + $serialized_request = fread(STDIN, $length); + if (strlen($serialized_request) != $length) { + trigger_error("I/O error", E_USER_ERROR); + } + + $request = new \Conformance\ConformanceRequest(); + $request->mergeFromString($serialized_request); + + $response = doTest($request); + + $serialized_response = $response->serializeToString(); + fwrite(STDOUT, pack("V", strlen($serialized_response))); + fwrite(STDOUT, $serialized_response); + + $GLOBALS['test_count'] += 1; + + return true; +} + +while(true){ + if (!doTestIO()) { + fprintf(STDERR, + "conformance_php: received EOF from test runner " + + "after %d tests, exiting\n", $test_count); + exit; + } +} diff --git a/conformance/conformance_python.py b/conformance/conformance_python.py index 7ace9b16..846ccbc6 100755 --- a/conformance/conformance_python.py +++ b/conformance/conformance_python.py @@ -41,6 +41,7 @@ import os from google.protobuf import json_format from google.protobuf import message from google.protobuf import test_messages_proto3_pb2 +from google.protobuf import test_messages_proto2_pb2 import conformance_pb2 sys.stdout = os.fdopen(sys.stdout.fileno(), 'wb', 0) @@ -56,14 +57,26 @@ def do_test(request): test_message = test_messages_proto3_pb2.TestAllTypes() response = conformance_pb2.ConformanceResponse() test_message = test_messages_proto3_pb2.TestAllTypes() + test_message_proto2 = test_messages_proto2_pb2.TestAllTypesProto2() + isProto3 = (request.message_type == "proto3") + isJson = (request.WhichOneof('payload') == 'json_payload') try: if request.WhichOneof('payload') == 'protobuf_payload': - try: - test_message.ParseFromString(request.protobuf_payload) - except message.DecodeError as e: - response.parse_error = str(e) - return response + if isProto3: + try: + test_message.ParseFromString(request.protobuf_payload) + except message.DecodeError as e: + response.parse_error = str(e) + return response + elif request.message_type == "proto2": + try: + test_message_proto2.ParseFromString(request.protobuf_payload) + except message.DecodeError as e: + response.parse_error = str(e) + return response + else: + raise ProtocolError("Protobuf request doesn't have specific payload type") elif request.WhichOneof('payload') == 'json_payload': try: @@ -79,11 +92,17 @@ def do_test(request): raise ProtocolError("Unspecified output format") elif request.requested_output_format == conformance_pb2.PROTOBUF: - response.protobuf_payload = test_message.SerializeToString() + if isProto3 or isJson: + response.protobuf_payload = test_message.SerializeToString() + else: + response.protobuf_payload = test_message_proto2.SerializeToString() elif request.requested_output_format == conformance_pb2.JSON: try: - response.json_payload = json_format.MessageToJson(test_message) + if isProto3 or isJson: + response.json_payload = json_format.MessageToJson(test_message) + else: + response.json_payload = json_format.MessageToJson(test_message_proto2) except Exception as e: response.serialize_error = str(e) return response diff --git a/conformance/conformance_ruby.rb b/conformance/conformance_ruby.rb index a1170e4c..552344b4 100755 --- a/conformance/conformance_ruby.rb +++ b/conformance/conformance_ruby.rb @@ -53,9 +53,9 @@ def do_test(request) end elsif request.message_type.eql?('proto2') response.skipped = "Ruby doesn't support proto2" - return respons + return response else - fail "Protobuf request doesn't have specific type" + fail "Protobuf request doesn't have specific payload type" end when :json_payload diff --git a/conformance/conformance_ruby.rb~ b/conformance/conformance_ruby.rb~ new file mode 100755 index 00000000..7e756d18 --- /dev/null +++ b/conformance/conformance_ruby.rb~ @@ -0,0 +1,131 @@ +#!/usr/bin/env ruby +# +# Protocol Buffers - Google's data interchange format +# Copyright 2008 Google Inc. All rights reserved. +# https://developers.google.com/protocol-buffers/ +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +require 'conformance_pb' +require 'google/protobuf/test_messages_proto3_pb' + +$test_count = 0 +$verbose = false + +def do_test(request) + test_message = ProtobufTestMessages::Proto3::TestAllTypes.new + response = Conformance::ConformanceResponse.new + + begin + case request.payload + when :protobuf_payload + if request.message_type.eql?('proto3') + begin + test_message = ProtobufTestMessages::Proto3::TestAllTypes.decode( + request.protobuf_payload) + rescue Google::Protobuf::ParseError => err + response.parse_error = err.message.encode('utf-8') + return response + end + elsif request.message_type.eql?('proto2') + response.skipped = "Ruby doesn't support proto2" + return response + else + fail "Protobuf request doesn't have specific type" + end + + when :json_payload + begin + test_message = ProtobufTestMessages::Proto3::TestAllTypes.decode_json( + request.json_payload) + rescue Google::Protobuf::ParseError => err + response.parse_error = err.message.encode('utf-8') + return response + end + + when nil + fail "Request didn't have payload" + end + + case request.requested_output_format + when :UNSPECIFIED + fail 'Unspecified output format' + + when :PROTOBUF + response.protobuf_payload = test_message.to_proto + + when :JSON + response.json_payload = test_message.to_json + + when nil + fail "Request didn't have requested output format" + end + rescue StandardError => err + response.runtime_error = err.message.encode('utf-8') + end + + response +end + +# Returns true if the test ran successfully, false on legitimate EOF. +# If EOF is encountered in an unexpected place, raises IOError. +def do_test_io + length_bytes = STDIN.read(4) + return false if length_bytes.nil? + + length = length_bytes.unpack('V').first + serialized_request = STDIN.read(length) + if serialized_request.nil? || serialized_request.length != length + fail IOError + end + + request = Conformance::ConformanceRequest.decode(serialized_request) + + response = do_test(request) + + serialized_response = Conformance::ConformanceResponse.encode(response) + STDOUT.write([serialized_response.length].pack('V')) + STDOUT.write(serialized_response) + STDOUT.flush + + if $verbose + STDERR.puts("conformance_ruby: request=#{request.to_json}, " \ + "response=#{response.to_json}\n") + end + + $test_count += 1 + + true +end + +loop do + unless do_test_io + STDERR.puts('conformance_ruby: received EOF from test runner ' \ + "after #{$test_count} tests, exiting") + break + end +end diff --git a/conformance/conformance_test.cc b/conformance/conformance_test.cc index 9b153fdb..f44fe8a1 100644 --- a/conformance/conformance_test.cc +++ b/conformance/conformance_test.cc @@ -277,8 +277,13 @@ void ConformanceTestSuite::RunValidInputTest( WireFormat input_format, const string& equivalent_text_format, WireFormat requested_output, bool isProto3) { TestAllTypes reference_message; + TestAllTypesProto2 reference_message_proto2; GOOGLE_CHECK( - TextFormat::ParseFromString(equivalent_text_format, &reference_message)) + isProto3 ? + TextFormat::ParseFromString(equivalent_text_format, &reference_message) + : + TextFormat::ParseFromString(equivalent_text_format, &reference_message_proto2) + ) << "Failed to parse data for test case: " << test_name << ", data: " << equivalent_text_format; @@ -401,7 +406,13 @@ void ConformanceTestSuite::RunValidInputTest( string differences; differencer.ReportDifferencesToString(&differences); - if (differencer.Compare(reference_message, test_message)) { + bool check; + if (isProto3) { + check = differencer.Compare(reference_message, test_message); + } else { + check = differencer.Compare(reference_message_proto2, test_message_proto2); + } + if (check) { ReportSuccess(test_name); } else { ReportFailure(test_name, level, request, response, @@ -477,12 +488,16 @@ void ConformanceTestSuite::RunValidProtobufTest( const string& test_name, ConformanceLevel level, const string& input_protobuf, const string& equivalent_text_format, bool isProto3) { + string rname = ".ProtobufInput."; + if (!isProto3) { + rname = ".Protobuf2Input."; + } RunValidInputTest( - ConformanceLevelToString(level) + ".ProtobufInput." + test_name + + ConformanceLevelToString(level) + rname + test_name + ".ProtobufOutput", level, input_protobuf, conformance::PROTOBUF, equivalent_text_format, conformance::PROTOBUF, isProto3); RunValidInputTest( - ConformanceLevelToString(level) + ".ProtobufInput." + test_name + + ConformanceLevelToString(level) + rname + test_name + ".JsonOutput", level, input_protobuf, conformance::PROTOBUF, equivalent_text_format, conformance::JSON, isProto3); } @@ -704,7 +719,8 @@ void ConformanceTestSuite::TestValidDataForType( proto += cat(tag(rep_field->number(), wire_type), values[i].first); text += rep_field->name() + ": " + values[i].second + " "; } - RunValidProtobufTest("ValidDataRepeated" + type_name, REQUIRED, proto, text, true); + RunValidProtobufTest("ValidDataRepeated" + type_name, REQUIRED, + proto, text, isProto3); } void ConformanceTestSuite::SetFailureList(const string& filename, @@ -796,6 +812,12 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, {dbl(1.7976931348623157e+308), "1.7976931348623157e+308"}, {dbl(2.22507385850720138309e-308), "2.22507385850720138309e-308"} }, true); + TestValidDataForType(FieldDescriptor::TYPE_DOUBLE, { + {dbl(0.1), "0.1"}, + {dbl(1.7976931348623157e+308), "1.7976931348623157e+308"}, + {dbl(2.22507385850720138309e-308), "2.22507385850720138309e-308"} + }, false); + TestValidDataForType(FieldDescriptor::TYPE_FLOAT, { {flt(0.1), "0.1"}, {flt(1.00000075e-36), "1.00000075e-36"}, diff --git a/conformance/failure_list_ruby.txt~ b/conformance/failure_list_ruby.txt~ new file mode 100644 index 00000000..b0d2fe58 --- /dev/null +++ b/conformance/failure_list_ruby.txt~ @@ -0,0 +1,135 @@ +Recommended.FieldMaskNumbersDontRoundTrip.JsonOutput +Recommended.FieldMaskPathsDontRoundTrip.JsonOutput +Recommended.FieldMaskTooManyUnderscore.JsonOutput +Recommended.JsonInput.DurationHas3FractionalDigits.Validator +Recommended.JsonInput.DurationHas6FractionalDigits.Validator +Recommended.JsonInput.DurationHas9FractionalDigits.Validator +Recommended.JsonInput.DurationHasZeroFractionalDigit.Validator +Recommended.JsonInput.Int64FieldBeString.Validator +Recommended.JsonInput.MapFieldValueIsNull +Recommended.JsonInput.RepeatedFieldMessageElementIsNull +Recommended.JsonInput.RepeatedFieldPrimitiveElementIsNull +Recommended.JsonInput.StringEndsWithEscapeChar +Recommended.JsonInput.StringFieldSurrogateInWrongOrder +Recommended.JsonInput.StringFieldUnpairedHighSurrogate +Recommended.JsonInput.StringFieldUnpairedLowSurrogate +Recommended.JsonInput.TimestampHas3FractionalDigits.Validator +Recommended.JsonInput.TimestampHas6FractionalDigits.Validator +Recommended.JsonInput.TimestampHas9FractionalDigits.Validator +Recommended.JsonInput.TimestampHasZeroFractionalDigit.Validator +Recommended.JsonInput.TimestampZeroNormalized.Validator +Recommended.JsonInput.Uint64FieldBeString.Validator +Required.DurationProtoInputTooLarge.JsonOutput +Required.DurationProtoInputTooSmall.JsonOutput +Required.JsonInput.Any.JsonOutput +Required.JsonInput.Any.ProtobufOutput +Required.JsonInput.AnyNested.JsonOutput +Required.JsonInput.AnyNested.ProtobufOutput +Required.JsonInput.AnyUnorderedTypeTag.JsonOutput +Required.JsonInput.AnyUnorderedTypeTag.ProtobufOutput +Required.JsonInput.AnyWithDuration.JsonOutput +Required.JsonInput.AnyWithDuration.ProtobufOutput +Required.JsonInput.AnyWithFieldMask.JsonOutput +Required.JsonInput.AnyWithFieldMask.ProtobufOutput +Required.JsonInput.AnyWithInt32ValueWrapper.JsonOutput +Required.JsonInput.AnyWithInt32ValueWrapper.ProtobufOutput +Required.JsonInput.AnyWithStruct.JsonOutput +Required.JsonInput.AnyWithStruct.ProtobufOutput +Required.JsonInput.AnyWithTimestamp.JsonOutput +Required.JsonInput.AnyWithTimestamp.ProtobufOutput +Required.JsonInput.AnyWithValueForInteger.JsonOutput +Required.JsonInput.AnyWithValueForInteger.ProtobufOutput +Required.JsonInput.AnyWithValueForJsonObject.JsonOutput +Required.JsonInput.AnyWithValueForJsonObject.ProtobufOutput +Required.JsonInput.DoubleFieldMaxNegativeValue.JsonOutput +Required.JsonInput.DoubleFieldMaxNegativeValue.ProtobufOutput +Required.JsonInput.DoubleFieldMinPositiveValue.JsonOutput +Required.JsonInput.DoubleFieldMinPositiveValue.ProtobufOutput +Required.JsonInput.DoubleFieldNan.JsonOutput +Required.JsonInput.DurationMaxValue.JsonOutput +Required.JsonInput.DurationMaxValue.ProtobufOutput +Required.JsonInput.DurationMinValue.JsonOutput +Required.JsonInput.DurationMinValue.ProtobufOutput +Required.JsonInput.DurationRepeatedValue.JsonOutput +Required.JsonInput.DurationRepeatedValue.ProtobufOutput +Required.JsonInput.FieldMask.JsonOutput +Required.JsonInput.FieldMask.ProtobufOutput +Required.JsonInput.FloatFieldInfinity.JsonOutput +Required.JsonInput.FloatFieldNan.JsonOutput +Required.JsonInput.FloatFieldNegativeInfinity.JsonOutput +Required.JsonInput.FloatFieldTooLarge +Required.JsonInput.FloatFieldTooSmall +Required.JsonInput.OneofFieldDuplicate +Required.JsonInput.OptionalBoolWrapper.JsonOutput +Required.JsonInput.OptionalBoolWrapper.ProtobufOutput +Required.JsonInput.OptionalBytesWrapper.JsonOutput +Required.JsonInput.OptionalBytesWrapper.ProtobufOutput +Required.JsonInput.OptionalDoubleWrapper.JsonOutput +Required.JsonInput.OptionalDoubleWrapper.ProtobufOutput +Required.JsonInput.OptionalFloatWrapper.JsonOutput +Required.JsonInput.OptionalFloatWrapper.ProtobufOutput +Required.JsonInput.OptionalInt32Wrapper.JsonOutput +Required.JsonInput.OptionalInt32Wrapper.ProtobufOutput +Required.JsonInput.OptionalInt64Wrapper.JsonOutput +Required.JsonInput.OptionalInt64Wrapper.ProtobufOutput +Required.JsonInput.OptionalStringWrapper.JsonOutput +Required.JsonInput.OptionalStringWrapper.ProtobufOutput +Required.JsonInput.OptionalUint32Wrapper.JsonOutput +Required.JsonInput.OptionalUint32Wrapper.ProtobufOutput +Required.JsonInput.OptionalUint64Wrapper.JsonOutput +Required.JsonInput.OptionalUint64Wrapper.ProtobufOutput +Required.JsonInput.OptionalWrapperTypesWithNonDefaultValue.JsonOutput +Required.JsonInput.OptionalWrapperTypesWithNonDefaultValue.ProtobufOutput +Required.JsonInput.RepeatedBoolWrapper.JsonOutput +Required.JsonInput.RepeatedBoolWrapper.ProtobufOutput +Required.JsonInput.RepeatedBytesWrapper.JsonOutput +Required.JsonInput.RepeatedBytesWrapper.ProtobufOutput +Required.JsonInput.RepeatedDoubleWrapper.JsonOutput +Required.JsonInput.RepeatedDoubleWrapper.ProtobufOutput +Required.JsonInput.RepeatedFloatWrapper.JsonOutput +Required.JsonInput.RepeatedFloatWrapper.ProtobufOutput +Required.JsonInput.RepeatedInt32Wrapper.JsonOutput +Required.JsonInput.RepeatedInt32Wrapper.ProtobufOutput +Required.JsonInput.RepeatedInt64Wrapper.JsonOutput +Required.JsonInput.RepeatedInt64Wrapper.ProtobufOutput +Required.JsonInput.RepeatedStringWrapper.JsonOutput +Required.JsonInput.RepeatedStringWrapper.ProtobufOutput +Required.JsonInput.RepeatedUint32Wrapper.JsonOutput +Required.JsonInput.RepeatedUint32Wrapper.ProtobufOutput +Required.JsonInput.RepeatedUint64Wrapper.JsonOutput +Required.JsonInput.RepeatedUint64Wrapper.ProtobufOutput +Required.JsonInput.StringFieldSurrogatePair.JsonOutput +Required.JsonInput.StringFieldSurrogatePair.ProtobufOutput +Required.JsonInput.Struct.JsonOutput +Required.JsonInput.Struct.ProtobufOutput +Required.JsonInput.TimestampMaxValue.JsonOutput +Required.JsonInput.TimestampMaxValue.ProtobufOutput +Required.JsonInput.TimestampMinValue.JsonOutput +Required.JsonInput.TimestampMinValue.ProtobufOutput +Required.JsonInput.TimestampRepeatedValue.JsonOutput +Required.JsonInput.TimestampRepeatedValue.ProtobufOutput +Required.JsonInput.TimestampWithNegativeOffset.JsonOutput +Required.JsonInput.TimestampWithNegativeOffset.ProtobufOutput +Required.JsonInput.TimestampWithPositiveOffset.JsonOutput +Required.JsonInput.TimestampWithPositiveOffset.ProtobufOutput +Required.JsonInput.ValueAcceptBool.JsonOutput +Required.JsonInput.ValueAcceptBool.ProtobufOutput +Required.JsonInput.ValueAcceptFloat.JsonOutput +Required.JsonInput.ValueAcceptFloat.ProtobufOutput +Required.JsonInput.ValueAcceptInteger.JsonOutput +Required.JsonInput.ValueAcceptInteger.ProtobufOutput +Required.JsonInput.ValueAcceptList.JsonOutput +Required.JsonInput.ValueAcceptList.ProtobufOutput +Required.JsonInput.ValueAcceptNull.JsonOutput +Required.JsonInput.ValueAcceptNull.ProtobufOutput +Required.JsonInput.ValueAcceptObject.JsonOutput +Required.JsonInput.ValueAcceptObject.ProtobufOutput +Required.JsonInput.ValueAcceptString.JsonOutput +Required.JsonInput.ValueAcceptString.ProtobufOutput +Required.Protobuf3Input.DoubleFieldNormalizeQuietNan.JsonOutput +Required.Protobuf3Input.DoubleFieldNormalizeSignalingNan.JsonOutput +Required.Protobuf3Input.FloatFieldNormalizeQuietNan.JsonOutput +Required.Protobuf3Input.FloatFieldNormalizeSignalingNan.JsonOutput +Required.Protobuf3Input.ValidDataRepeated.FLOAT.JsonOutput +Required.TimestampProtoInputTooLarge.JsonOutput +Required.TimestampProtoInputTooSmall.JsonOutput diff --git a/python/setup.py b/python/setup.py index a2026706..70b7de5c 100755 --- a/python/setup.py +++ b/python/setup.py @@ -80,6 +80,7 @@ def GenerateUnittestProtos(): generate_proto("../src/google/protobuf/any_test.proto", False) generate_proto("../src/google/protobuf/map_unittest.proto", False) generate_proto("../src/google/protobuf/test_messages_proto3.proto", False) + generate_proto("../src/google/protobuf/test_messages_proto2.proto", False) generate_proto("../src/google/protobuf/unittest_arena.proto", False) generate_proto("../src/google/protobuf/unittest_no_arena.proto", False) generate_proto("../src/google/protobuf/unittest_no_arena_import.proto", False) diff --git a/ruby/lib/google/protobuf/any_pb.rb b/ruby/lib/google/protobuf/any_pb.rb new file mode 100644 index 00000000..88d2c12b --- /dev/null +++ b/ruby/lib/google/protobuf/any_pb.rb @@ -0,0 +1,17 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/protobuf/any.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.protobuf.Any" do + optional :type_url, :string, 1 + optional :value, :bytes, 2 + end +end + +module Google + module Protobuf + Any = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Any").msgclass + end +end diff --git a/ruby/lib/google/protobuf/api_pb.rb b/ruby/lib/google/protobuf/api_pb.rb new file mode 100644 index 00000000..1676b587 --- /dev/null +++ b/ruby/lib/google/protobuf/api_pb.rb @@ -0,0 +1,39 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/protobuf/api.proto + +require 'google/protobuf' + +require 'google/protobuf/source_context_pb' +require 'google/protobuf/type_pb' +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.protobuf.Api" do + optional :name, :string, 1 + repeated :methods, :message, 2, "google.protobuf.Method" + repeated :options, :message, 3, "google.protobuf.Option" + optional :version, :string, 4 + optional :source_context, :message, 5, "google.protobuf.SourceContext" + repeated :mixins, :message, 6, "google.protobuf.Mixin" + optional :syntax, :enum, 7, "google.protobuf.Syntax" + end + add_message "google.protobuf.Method" do + optional :name, :string, 1 + optional :request_type_url, :string, 2 + optional :request_streaming, :bool, 3 + optional :response_type_url, :string, 4 + optional :response_streaming, :bool, 5 + repeated :options, :message, 6, "google.protobuf.Option" + optional :syntax, :enum, 7, "google.protobuf.Syntax" + end + add_message "google.protobuf.Mixin" do + optional :name, :string, 1 + optional :root, :string, 2 + end +end + +module Google + module Protobuf + Api = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Api").msgclass + Method = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Method").msgclass + Mixin = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Mixin").msgclass + end +end diff --git a/ruby/lib/google/protobuf/duration_pb.rb b/ruby/lib/google/protobuf/duration_pb.rb new file mode 100644 index 00000000..c93f5987 --- /dev/null +++ b/ruby/lib/google/protobuf/duration_pb.rb @@ -0,0 +1,17 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/protobuf/duration.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.protobuf.Duration" do + optional :seconds, :int64, 1 + optional :nanos, :int32, 2 + end +end + +module Google + module Protobuf + Duration = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Duration").msgclass + end +end diff --git a/ruby/lib/google/protobuf/empty_pb.rb b/ruby/lib/google/protobuf/empty_pb.rb new file mode 100644 index 00000000..580db6dd --- /dev/null +++ b/ruby/lib/google/protobuf/empty_pb.rb @@ -0,0 +1,15 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/protobuf/empty.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.protobuf.Empty" do + end +end + +module Google + module Protobuf + Empty = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Empty").msgclass + end +end diff --git a/ruby/lib/google/protobuf/field_mask_pb.rb b/ruby/lib/google/protobuf/field_mask_pb.rb new file mode 100644 index 00000000..ea2811ab --- /dev/null +++ b/ruby/lib/google/protobuf/field_mask_pb.rb @@ -0,0 +1,16 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/protobuf/field_mask.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.protobuf.FieldMask" do + repeated :paths, :string, 1 + end +end + +module Google + module Protobuf + FieldMask = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldMask").msgclass + end +end diff --git a/ruby/lib/google/protobuf/source_context_pb.rb b/ruby/lib/google/protobuf/source_context_pb.rb new file mode 100644 index 00000000..d099d0ea --- /dev/null +++ b/ruby/lib/google/protobuf/source_context_pb.rb @@ -0,0 +1,16 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/protobuf/source_context.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.protobuf.SourceContext" do + optional :file_name, :string, 1 + end +end + +module Google + module Protobuf + SourceContext = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.SourceContext").msgclass + end +end diff --git a/ruby/lib/google/protobuf/struct_pb.rb b/ruby/lib/google/protobuf/struct_pb.rb new file mode 100644 index 00000000..af53c6e1 --- /dev/null +++ b/ruby/lib/google/protobuf/struct_pb.rb @@ -0,0 +1,35 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/protobuf/struct.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.protobuf.Struct" do + map :fields, :string, :message, 1, "google.protobuf.Value" + end + add_message "google.protobuf.Value" do + oneof :kind do + optional :null_value, :enum, 1, "google.protobuf.NullValue" + optional :number_value, :double, 2 + optional :string_value, :string, 3 + optional :bool_value, :bool, 4 + optional :struct_value, :message, 5, "google.protobuf.Struct" + optional :list_value, :message, 6, "google.protobuf.ListValue" + end + end + add_message "google.protobuf.ListValue" do + repeated :values, :message, 1, "google.protobuf.Value" + end + add_enum "google.protobuf.NullValue" do + value :NULL_VALUE, 0 + end +end + +module Google + module Protobuf + Struct = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Struct").msgclass + Value = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Value").msgclass + ListValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.ListValue").msgclass + NullValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.NullValue").enummodule + end +end diff --git a/ruby/lib/google/protobuf/timestamp_pb.rb b/ruby/lib/google/protobuf/timestamp_pb.rb new file mode 100644 index 00000000..7af33339 --- /dev/null +++ b/ruby/lib/google/protobuf/timestamp_pb.rb @@ -0,0 +1,17 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/protobuf/timestamp.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.protobuf.Timestamp" do + optional :seconds, :int64, 1 + optional :nanos, :int32, 2 + end +end + +module Google + module Protobuf + Timestamp = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Timestamp").msgclass + end +end diff --git a/ruby/lib/google/protobuf/type_pb.rb b/ruby/lib/google/protobuf/type_pb.rb new file mode 100644 index 00000000..ffcbb9de --- /dev/null +++ b/ruby/lib/google/protobuf/type_pb.rb @@ -0,0 +1,89 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/protobuf/type.proto + +require 'google/protobuf' + +require 'google/protobuf/any_pb' +require 'google/protobuf/source_context_pb' +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.protobuf.Type" do + optional :name, :string, 1 + repeated :fields, :message, 2, "google.protobuf.Field" + repeated :oneofs, :string, 3 + repeated :options, :message, 4, "google.protobuf.Option" + optional :source_context, :message, 5, "google.protobuf.SourceContext" + optional :syntax, :enum, 6, "google.protobuf.Syntax" + end + add_message "google.protobuf.Field" do + optional :kind, :enum, 1, "google.protobuf.Field.Kind" + optional :cardinality, :enum, 2, "google.protobuf.Field.Cardinality" + optional :number, :int32, 3 + optional :name, :string, 4 + optional :type_url, :string, 6 + optional :oneof_index, :int32, 7 + optional :packed, :bool, 8 + repeated :options, :message, 9, "google.protobuf.Option" + optional :json_name, :string, 10 + optional :default_value, :string, 11 + end + add_enum "google.protobuf.Field.Kind" do + value :TYPE_UNKNOWN, 0 + value :TYPE_DOUBLE, 1 + value :TYPE_FLOAT, 2 + value :TYPE_INT64, 3 + value :TYPE_UINT64, 4 + value :TYPE_INT32, 5 + value :TYPE_FIXED64, 6 + value :TYPE_FIXED32, 7 + value :TYPE_BOOL, 8 + value :TYPE_STRING, 9 + value :TYPE_GROUP, 10 + value :TYPE_MESSAGE, 11 + value :TYPE_BYTES, 12 + value :TYPE_UINT32, 13 + value :TYPE_ENUM, 14 + value :TYPE_SFIXED32, 15 + value :TYPE_SFIXED64, 16 + value :TYPE_SINT32, 17 + value :TYPE_SINT64, 18 + end + add_enum "google.protobuf.Field.Cardinality" do + value :CARDINALITY_UNKNOWN, 0 + value :CARDINALITY_OPTIONAL, 1 + value :CARDINALITY_REQUIRED, 2 + value :CARDINALITY_REPEATED, 3 + end + add_message "google.protobuf.Enum" do + optional :name, :string, 1 + repeated :enumvalue, :message, 2, "google.protobuf.EnumValue" + repeated :options, :message, 3, "google.protobuf.Option" + optional :source_context, :message, 4, "google.protobuf.SourceContext" + optional :syntax, :enum, 5, "google.protobuf.Syntax" + end + add_message "google.protobuf.EnumValue" do + optional :name, :string, 1 + optional :number, :int32, 2 + repeated :options, :message, 3, "google.protobuf.Option" + end + add_message "google.protobuf.Option" do + optional :name, :string, 1 + optional :value, :message, 2, "google.protobuf.Any" + end + add_enum "google.protobuf.Syntax" do + value :SYNTAX_PROTO2, 0 + value :SYNTAX_PROTO3, 1 + end +end + +module Google + module Protobuf + Type = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Type").msgclass + Field = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Field").msgclass + Field::Kind = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Field.Kind").enummodule + Field::Cardinality = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Field.Cardinality").enummodule + Enum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Enum").msgclass + EnumValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumValue").msgclass + Option = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Option").msgclass + Syntax = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Syntax").enummodule + end +end diff --git a/ruby/lib/google/protobuf/wrappers_pb.rb b/ruby/lib/google/protobuf/wrappers_pb.rb new file mode 100644 index 00000000..e26a4d23 --- /dev/null +++ b/ruby/lib/google/protobuf/wrappers_pb.rb @@ -0,0 +1,48 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/protobuf/wrappers.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.protobuf.DoubleValue" do + optional :value, :double, 1 + end + add_message "google.protobuf.FloatValue" do + optional :value, :float, 1 + end + add_message "google.protobuf.Int64Value" do + optional :value, :int64, 1 + end + add_message "google.protobuf.UInt64Value" do + optional :value, :uint64, 1 + end + add_message "google.protobuf.Int32Value" do + optional :value, :int32, 1 + end + add_message "google.protobuf.UInt32Value" do + optional :value, :uint32, 1 + end + add_message "google.protobuf.BoolValue" do + optional :value, :bool, 1 + end + add_message "google.protobuf.StringValue" do + optional :value, :string, 1 + end + add_message "google.protobuf.BytesValue" do + optional :value, :bytes, 1 + end +end + +module Google + module Protobuf + DoubleValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.DoubleValue").msgclass + FloatValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FloatValue").msgclass + Int64Value = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Int64Value").msgclass + UInt64Value = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.UInt64Value").msgclass + Int32Value = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Int32Value").msgclass + UInt32Value = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.UInt32Value").msgclass + BoolValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.BoolValue").msgclass + StringValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.StringValue").msgclass + BytesValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.BytesValue").msgclass + end +end diff --git a/ruby/tests/generated_code_pb.rb b/ruby/tests/generated_code_pb.rb new file mode 100644 index 00000000..0358ada7 --- /dev/null +++ b/ruby/tests/generated_code_pb.rb @@ -0,0 +1,74 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: tests/generated_code.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "a.b.c.TestMessage" do + optional :optional_int32, :int32, 1 + optional :optional_int64, :int64, 2 + optional :optional_uint32, :uint32, 3 + optional :optional_uint64, :uint64, 4 + optional :optional_bool, :bool, 5 + optional :optional_double, :double, 6 + optional :optional_float, :float, 7 + optional :optional_string, :string, 8 + optional :optional_bytes, :bytes, 9 + optional :optional_enum, :enum, 10, "a.b.c.TestEnum" + optional :optional_msg, :message, 11, "a.b.c.TestMessage" + repeated :repeated_int32, :int32, 21 + repeated :repeated_int64, :int64, 22 + repeated :repeated_uint32, :uint32, 23 + repeated :repeated_uint64, :uint64, 24 + repeated :repeated_bool, :bool, 25 + repeated :repeated_double, :double, 26 + repeated :repeated_float, :float, 27 + repeated :repeated_string, :string, 28 + repeated :repeated_bytes, :bytes, 29 + repeated :repeated_enum, :enum, 30, "a.b.c.TestEnum" + repeated :repeated_msg, :message, 31, "a.b.c.TestMessage" + map :map_int32_string, :int32, :string, 61 + map :map_int64_string, :int64, :string, 62 + map :map_uint32_string, :uint32, :string, 63 + map :map_uint64_string, :uint64, :string, 64 + map :map_bool_string, :bool, :string, 65 + map :map_string_string, :string, :string, 66 + map :map_string_msg, :string, :message, 67, "a.b.c.TestMessage" + map :map_string_enum, :string, :enum, 68, "a.b.c.TestEnum" + map :map_string_int32, :string, :int32, 69 + map :map_string_bool, :string, :bool, 70 + optional :nested_message, :message, 80, "a.b.c.TestMessage.NestedMessage" + oneof :my_oneof do + optional :oneof_int32, :int32, 41 + optional :oneof_int64, :int64, 42 + optional :oneof_uint32, :uint32, 43 + optional :oneof_uint64, :uint64, 44 + optional :oneof_bool, :bool, 45 + optional :oneof_double, :double, 46 + optional :oneof_float, :float, 47 + optional :oneof_string, :string, 48 + optional :oneof_bytes, :bytes, 49 + optional :oneof_enum, :enum, 50, "a.b.c.TestEnum" + optional :oneof_msg, :message, 51, "a.b.c.TestMessage" + end + end + add_message "a.b.c.TestMessage.NestedMessage" do + optional :foo, :int32, 1 + end + add_enum "a.b.c.TestEnum" do + value :Default, 0 + value :A, 1 + value :B, 2 + value :C, 3 + end +end + +module A + module B + module C + TestMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("a.b.c.TestMessage").msgclass + TestMessage::NestedMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("a.b.c.TestMessage.NestedMessage").msgclass + TestEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("a.b.c.TestEnum").enummodule + end + end +end diff --git a/ruby/tests/test_import_pb.rb b/ruby/tests/test_import_pb.rb new file mode 100644 index 00000000..83f04d60 --- /dev/null +++ b/ruby/tests/test_import_pb.rb @@ -0,0 +1,13 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: tests/test_import.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "foo_bar.TestImportedMessage" do + end +end + +module FooBar + TestImportedMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("foo_bar.TestImportedMessage").msgclass +end -- cgit v1.2.3 From 696cf779d457c89184ea1d4aa18702f7cca63fd1 Mon Sep 17 00:00:00 2001 From: Yilun Chong Date: Wed, 28 Jun 2017 11:32:01 -0700 Subject: add java supported --- conformance/ConformanceJava$1.class | Bin 1535 -> 1535 bytes conformance/ConformanceJava$BinaryDecoder$1.class | Bin 863 -> 1241 bytes conformance/ConformanceJava$BinaryDecoder$2.class | Bin 1014 -> 1482 bytes conformance/ConformanceJava$BinaryDecoder$3.class | Bin 1644 -> 2256 bytes conformance/ConformanceJava$BinaryDecoder$4.class | Bin 1479 -> 2057 bytes conformance/ConformanceJava$BinaryDecoder$5.class | Bin 1650 -> 2270 bytes conformance/ConformanceJava$BinaryDecoder$6.class | Bin 1716 -> 2339 bytes conformance/ConformanceJava$BinaryDecoder$7.class | Bin 1310 -> 1860 bytes conformance/ConformanceJava$BinaryDecoder.class | Bin 2220 -> 2553 bytes conformance/ConformanceJava.class | Bin 7832 -> 9250 bytes conformance/ConformanceJava.java | 201 ++++++++++++++++++++-- 11 files changed, 184 insertions(+), 17 deletions(-) (limited to 'conformance') diff --git a/conformance/ConformanceJava$1.class b/conformance/ConformanceJava$1.class index 823d4374..ab225e57 100644 Binary files a/conformance/ConformanceJava$1.class and b/conformance/ConformanceJava$1.class differ diff --git a/conformance/ConformanceJava$BinaryDecoder$1.class b/conformance/ConformanceJava$BinaryDecoder$1.class index 940e39f0..b54414b4 100644 Binary files a/conformance/ConformanceJava$BinaryDecoder$1.class and b/conformance/ConformanceJava$BinaryDecoder$1.class differ diff --git a/conformance/ConformanceJava$BinaryDecoder$2.class b/conformance/ConformanceJava$BinaryDecoder$2.class index 64553b6f..1d3c0862 100644 Binary files a/conformance/ConformanceJava$BinaryDecoder$2.class and b/conformance/ConformanceJava$BinaryDecoder$2.class differ diff --git a/conformance/ConformanceJava$BinaryDecoder$3.class b/conformance/ConformanceJava$BinaryDecoder$3.class index 104336d5..ad8bf31d 100644 Binary files a/conformance/ConformanceJava$BinaryDecoder$3.class and b/conformance/ConformanceJava$BinaryDecoder$3.class differ diff --git a/conformance/ConformanceJava$BinaryDecoder$4.class b/conformance/ConformanceJava$BinaryDecoder$4.class index 2bfeda92..16a4ce4e 100644 Binary files a/conformance/ConformanceJava$BinaryDecoder$4.class and b/conformance/ConformanceJava$BinaryDecoder$4.class differ diff --git a/conformance/ConformanceJava$BinaryDecoder$5.class b/conformance/ConformanceJava$BinaryDecoder$5.class index c5dea858..e6d0f7bb 100644 Binary files a/conformance/ConformanceJava$BinaryDecoder$5.class and b/conformance/ConformanceJava$BinaryDecoder$5.class differ diff --git a/conformance/ConformanceJava$BinaryDecoder$6.class b/conformance/ConformanceJava$BinaryDecoder$6.class index d617cce5..2b03a125 100644 Binary files a/conformance/ConformanceJava$BinaryDecoder$6.class and b/conformance/ConformanceJava$BinaryDecoder$6.class differ diff --git a/conformance/ConformanceJava$BinaryDecoder$7.class b/conformance/ConformanceJava$BinaryDecoder$7.class index 6522a5e6..ba0aaebb 100644 Binary files a/conformance/ConformanceJava$BinaryDecoder$7.class and b/conformance/ConformanceJava$BinaryDecoder$7.class differ diff --git a/conformance/ConformanceJava$BinaryDecoder.class b/conformance/ConformanceJava$BinaryDecoder.class index 3dd7ba07..ac98465d 100644 Binary files a/conformance/ConformanceJava$BinaryDecoder.class and b/conformance/ConformanceJava$BinaryDecoder.class differ diff --git a/conformance/ConformanceJava.class b/conformance/ConformanceJava.class index 74fc5e84..9c1f08c6 100644 Binary files a/conformance/ConformanceJava.class and b/conformance/ConformanceJava.class differ diff --git a/conformance/ConformanceJava.java b/conformance/ConformanceJava.java index 7badf2a5..3a944b51 100644 --- a/conformance/ConformanceJava.java +++ b/conformance/ConformanceJava.java @@ -3,6 +3,7 @@ import com.google.protobuf.CodedInputStream; import com.google.protobuf.conformance.Conformance; import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf_test_messages.proto3.TestMessagesProto3; +import com.google.protobuf_test_messages.proto2.TestMessagesProto2; import com.google.protobuf.util.JsonFormat; import com.google.protobuf.util.JsonFormat.TypeRegistry; import java.io.IOException; @@ -54,21 +55,31 @@ class ConformanceJava { private enum BinaryDecoder { BYTE_STRING_DECODER() { @Override - public TestMessagesProto3.TestAllTypes parse(ByteString bytes) + public TestMessagesProto3.TestAllTypes parseProto3(ByteString bytes) throws InvalidProtocolBufferException { return TestMessagesProto3.TestAllTypes.parseFrom(bytes); } + @Override + public TestMessagesProto2.TestAllTypesProto2 parseProto2(ByteString bytes) + throws InvalidProtocolBufferException { + return TestMessagesProto2.TestAllTypesProto2.parseFrom(bytes); + } }, BYTE_ARRAY_DECODER() { @Override - public TestMessagesProto3.TestAllTypes parse(ByteString bytes) + public TestMessagesProto3.TestAllTypes parseProto3(ByteString bytes) throws InvalidProtocolBufferException { return TestMessagesProto3.TestAllTypes.parseFrom(bytes.toByteArray()); } + @Override + public TestMessagesProto2.TestAllTypesProto2 parseProto2(ByteString bytes) + throws InvalidProtocolBufferException { + return TestMessagesProto2.TestAllTypesProto2.parseFrom(bytes.toByteArray()); + } }, ARRAY_BYTE_BUFFER_DECODER() { @Override - public TestMessagesProto3.TestAllTypes parse(ByteString bytes) + public TestMessagesProto3.TestAllTypes parseProto3(ByteString bytes) throws InvalidProtocolBufferException { ByteBuffer buffer = ByteBuffer.allocate(bytes.size()); bytes.copyTo(buffer); @@ -82,10 +93,25 @@ class ConformanceJava { "ByteString based ByteBuffer should not throw IOException.", e); } } + @Override + public TestMessagesProto2.TestAllTypesProto2 parseProto2(ByteString bytes) + throws InvalidProtocolBufferException { + ByteBuffer buffer = ByteBuffer.allocate(bytes.size()); + bytes.copyTo(buffer); + buffer.flip(); + try { + return TestMessagesProto2.TestAllTypesProto2.parseFrom(CodedInputStream.newInstance(buffer)); + } catch (InvalidProtocolBufferException e) { + throw e; + } catch (IOException e) { + throw new RuntimeException( + "ByteString based ByteBuffer should not throw IOException.", e); + } + } }, READONLY_ARRAY_BYTE_BUFFER_DECODER() { @Override - public TestMessagesProto3.TestAllTypes parse(ByteString bytes) + public TestMessagesProto3.TestAllTypes parseProto3(ByteString bytes) throws InvalidProtocolBufferException { try { return TestMessagesProto3.TestAllTypes.parseFrom( @@ -97,10 +123,23 @@ class ConformanceJava { "ByteString based ByteBuffer should not throw IOException.", e); } } + @Override + public TestMessagesProto2.TestAllTypesProto2 parseProto2(ByteString bytes) + throws InvalidProtocolBufferException { + try { + return TestMessagesProto2.TestAllTypesProto2.parseFrom( + CodedInputStream.newInstance(bytes.asReadOnlyByteBuffer())); + } catch (InvalidProtocolBufferException e) { + throw e; + } catch (IOException e) { + throw new RuntimeException( + "ByteString based ByteBuffer should not throw IOException.", e); + } + } }, DIRECT_BYTE_BUFFER_DECODER() { @Override - public TestMessagesProto3.TestAllTypes parse(ByteString bytes) + public TestMessagesProto3.TestAllTypes parseProto3(ByteString bytes) throws InvalidProtocolBufferException { ByteBuffer buffer = ByteBuffer.allocateDirect(bytes.size()); bytes.copyTo(buffer); @@ -114,10 +153,26 @@ class ConformanceJava { "ByteString based ByteBuffer should not throw IOException.", e); } } + @Override + public TestMessagesProto2.TestAllTypesProto2 parseProto2(ByteString bytes) + throws InvalidProtocolBufferException { + ByteBuffer buffer = ByteBuffer.allocateDirect(bytes.size()); + bytes.copyTo(buffer); + buffer.flip(); + try { + return TestMessagesProto2.TestAllTypesProto2 + .parseFrom(CodedInputStream.newInstance(buffer)); + } catch (InvalidProtocolBufferException e) { + throw e; + } catch (IOException e) { + throw new RuntimeException( + "ByteString based ByteBuffer should not throw IOException.", e); + } + } }, READONLY_DIRECT_BYTE_BUFFER_DECODER() { @Override - public TestMessagesProto3.TestAllTypes parse(ByteString bytes) + public TestMessagesProto3.TestAllTypes parseProto3(ByteString bytes) throws InvalidProtocolBufferException { ByteBuffer buffer = ByteBuffer.allocateDirect(bytes.size()); bytes.copyTo(buffer); @@ -132,10 +187,26 @@ class ConformanceJava { "ByteString based ByteBuffer should not throw IOException.", e); } } + @Override + public TestMessagesProto2.TestAllTypesProto2 parseProto2(ByteString bytes) + throws InvalidProtocolBufferException { + ByteBuffer buffer = ByteBuffer.allocateDirect(bytes.size()); + bytes.copyTo(buffer); + buffer.flip(); + try { + return TestMessagesProto2.TestAllTypesProto2.parseFrom( + CodedInputStream.newInstance(buffer.asReadOnlyBuffer())); + } catch (InvalidProtocolBufferException e) { + throw e; + } catch (IOException e) { + throw new RuntimeException( + "ByteString based ByteBuffer should not throw IOException.", e); + } + } }, INPUT_STREAM_DECODER() { @Override - public TestMessagesProto3.TestAllTypes parse(ByteString bytes) + public TestMessagesProto3.TestAllTypes parseProto3(ByteString bytes) throws InvalidProtocolBufferException { try { return TestMessagesProto3.TestAllTypes.parseFrom(bytes.newInput()); @@ -146,13 +217,27 @@ class ConformanceJava { "ByteString based InputStream should not throw IOException.", e); } } + @Override + public TestMessagesProto2.TestAllTypesProto2 parseProto2(ByteString bytes) + throws InvalidProtocolBufferException { + try { + return TestMessagesProto2.TestAllTypesProto2.parseFrom(bytes.newInput()); + } catch (InvalidProtocolBufferException e) { + throw e; + } catch (IOException e) { + throw new RuntimeException( + "ByteString based InputStream should not throw IOException.", e); + } + } }; - public abstract TestMessagesProto3.TestAllTypes parse(ByteString bytes) + public abstract TestMessagesProto3.TestAllTypes parseProto3(ByteString bytes) + throws InvalidProtocolBufferException; + public abstract TestMessagesProto2.TestAllTypesProto2 parseProto2(ByteString bytes) throws InvalidProtocolBufferException; } - private TestMessagesProto3.TestAllTypes parseBinary(ByteString bytes) + private TestMessagesProto3.TestAllTypes parseBinaryToProto3(ByteString bytes) throws InvalidProtocolBufferException { TestMessagesProto3.TestAllTypes[] messages = new TestMessagesProto3.TestAllTypes[BinaryDecoder.values().length]; @@ -163,7 +248,7 @@ class ConformanceJava { boolean hasException = false; for (int i = 0; i < BinaryDecoder.values().length; ++i) { try { - messages[i] = BinaryDecoder.values()[i].parse(bytes); + messages[i] = BinaryDecoder.values()[i].parseProto3(bytes); hasMessage = true; } catch (InvalidProtocolBufferException e) { exceptions[i] = e; @@ -219,16 +304,96 @@ class ConformanceJava { return messages[0]; } + + private TestMessagesProto2.TestAllTypesProto2 parseBinaryToProto2(ByteString bytes) + throws InvalidProtocolBufferException { + TestMessagesProto2.TestAllTypesProto2[] messages = + new TestMessagesProto2.TestAllTypesProto2[BinaryDecoder.values().length]; + InvalidProtocolBufferException[] exceptions = + new InvalidProtocolBufferException[BinaryDecoder.values().length]; + + boolean hasMessage = false; + boolean hasException = false; + for (int i = 0; i < BinaryDecoder.values().length; ++i) { + try { + messages[i] = BinaryDecoder.values()[i].parseProto2(bytes); + hasMessage = true; + } catch (InvalidProtocolBufferException e) { + exceptions[i] = e; + hasException = true; + } + } + + if (hasMessage && hasException) { + StringBuilder sb = + new StringBuilder("Binary decoders disagreed on whether the payload was valid.\n"); + for (int i = 0; i < BinaryDecoder.values().length; ++i) { + sb.append(BinaryDecoder.values()[i].name()); + if (messages[i] != null) { + sb.append(" accepted the payload.\n"); + } else { + sb.append(" rejected the payload.\n"); + } + } + throw new RuntimeException(sb.toString()); + } + + if (hasException) { + // We do not check if exceptions are equal. Different implementations may return different + // exception messages. Throw an arbitrary one out instead. + throw exceptions[0]; + } + + // Fast path comparing all the messages with the first message, assuming equality being + // symmetric and transitive. + boolean allEqual = true; + for (int i = 1; i < messages.length; ++i) { + if (!messages[0].equals(messages[i])) { + allEqual = false; + break; + } + } + + // Slow path: compare and find out all unequal pairs. + if (!allEqual) { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < messages.length - 1; ++i) { + for (int j = i + 1; j < messages.length; ++j) { + if (!messages[i].equals(messages[j])) { + sb.append(BinaryDecoder.values()[i].name()) + .append(" and ") + .append(BinaryDecoder.values()[j].name()) + .append(" parsed the payload differently.\n"); + } + } + } + throw new RuntimeException(sb.toString()); + } + + return messages[0]; + } + private Conformance.ConformanceResponse doTest(Conformance.ConformanceRequest request) { - TestMessagesProto3.TestAllTypes testMessage; + com.google.protobuf.AbstractMessage testMessage; + boolean isProto3 = request.getMessageType().equals("proto3"); switch (request.getPayloadCase()) { case PROTOBUF_PAYLOAD: { - try { - testMessage = parseBinary(request.getProtobufPayload()); - } catch (InvalidProtocolBufferException e) { - return Conformance.ConformanceResponse.newBuilder().setParseError(e.getMessage()).build(); + if (isProto3) { + try { + testMessage = parseBinaryToProto3(request.getProtobufPayload()); + } catch (InvalidProtocolBufferException e) { + return Conformance.ConformanceResponse.newBuilder().setParseError(e.getMessage()).build(); + } + } else if (request.getMessageType().equals("proto2")) { + try { + testMessage = parseBinaryToProto2(request.getProtobufPayload()); + } catch (InvalidProtocolBufferException e) { + return Conformance.ConformanceResponse.newBuilder().setParseError(e.getMessage()).build(); + } + } else { + throw new RuntimeException("Protobuf request doesn't have specific payload type."); } break; } @@ -256,8 +421,10 @@ class ConformanceJava { case UNSPECIFIED: throw new RuntimeException("Unspecified output format."); - case PROTOBUF: - return Conformance.ConformanceResponse.newBuilder().setProtobufPayload(testMessage.toByteString()).build(); + case PROTOBUF: { + ByteString MessageString = testMessage.toByteString(); + return Conformance.ConformanceResponse.newBuilder().setProtobufPayload(MessageString).build(); + } case JSON: try { -- cgit v1.2.3 From 6c59c257351060b49096140df3571f07a0ffd814 Mon Sep 17 00:00:00 2001 From: Yilun Chong Date: Wed, 28 Jun 2017 11:41:43 -0700 Subject: delete binary --- conformance/ConformanceJava$1.class | Bin 1535 -> 0 bytes conformance/ConformanceJava$BinaryDecoder$1.class | Bin 1241 -> 0 bytes conformance/ConformanceJava$BinaryDecoder$2.class | Bin 1482 -> 0 bytes conformance/ConformanceJava$BinaryDecoder$3.class | Bin 2256 -> 0 bytes conformance/ConformanceJava$BinaryDecoder$4.class | Bin 2057 -> 0 bytes conformance/ConformanceJava$BinaryDecoder$5.class | Bin 2270 -> 0 bytes conformance/ConformanceJava$BinaryDecoder$6.class | Bin 2339 -> 0 bytes conformance/ConformanceJava$BinaryDecoder$7.class | Bin 1860 -> 0 bytes conformance/ConformanceJava$BinaryDecoder.class | Bin 2553 -> 0 bytes conformance/ConformanceJava.class | Bin 9250 -> 0 bytes 10 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 conformance/ConformanceJava$1.class delete mode 100644 conformance/ConformanceJava$BinaryDecoder$1.class delete mode 100644 conformance/ConformanceJava$BinaryDecoder$2.class delete mode 100644 conformance/ConformanceJava$BinaryDecoder$3.class delete mode 100644 conformance/ConformanceJava$BinaryDecoder$4.class delete mode 100644 conformance/ConformanceJava$BinaryDecoder$5.class delete mode 100644 conformance/ConformanceJava$BinaryDecoder$6.class delete mode 100644 conformance/ConformanceJava$BinaryDecoder$7.class delete mode 100644 conformance/ConformanceJava$BinaryDecoder.class delete mode 100644 conformance/ConformanceJava.class (limited to 'conformance') diff --git a/conformance/ConformanceJava$1.class b/conformance/ConformanceJava$1.class deleted file mode 100644 index ab225e57..00000000 Binary files a/conformance/ConformanceJava$1.class and /dev/null differ diff --git a/conformance/ConformanceJava$BinaryDecoder$1.class b/conformance/ConformanceJava$BinaryDecoder$1.class deleted file mode 100644 index b54414b4..00000000 Binary files a/conformance/ConformanceJava$BinaryDecoder$1.class and /dev/null differ diff --git a/conformance/ConformanceJava$BinaryDecoder$2.class b/conformance/ConformanceJava$BinaryDecoder$2.class deleted file mode 100644 index 1d3c0862..00000000 Binary files a/conformance/ConformanceJava$BinaryDecoder$2.class and /dev/null differ diff --git a/conformance/ConformanceJava$BinaryDecoder$3.class b/conformance/ConformanceJava$BinaryDecoder$3.class deleted file mode 100644 index ad8bf31d..00000000 Binary files a/conformance/ConformanceJava$BinaryDecoder$3.class and /dev/null differ diff --git a/conformance/ConformanceJava$BinaryDecoder$4.class b/conformance/ConformanceJava$BinaryDecoder$4.class deleted file mode 100644 index 16a4ce4e..00000000 Binary files a/conformance/ConformanceJava$BinaryDecoder$4.class and /dev/null differ diff --git a/conformance/ConformanceJava$BinaryDecoder$5.class b/conformance/ConformanceJava$BinaryDecoder$5.class deleted file mode 100644 index e6d0f7bb..00000000 Binary files a/conformance/ConformanceJava$BinaryDecoder$5.class and /dev/null differ diff --git a/conformance/ConformanceJava$BinaryDecoder$6.class b/conformance/ConformanceJava$BinaryDecoder$6.class deleted file mode 100644 index 2b03a125..00000000 Binary files a/conformance/ConformanceJava$BinaryDecoder$6.class and /dev/null differ diff --git a/conformance/ConformanceJava$BinaryDecoder$7.class b/conformance/ConformanceJava$BinaryDecoder$7.class deleted file mode 100644 index ba0aaebb..00000000 Binary files a/conformance/ConformanceJava$BinaryDecoder$7.class and /dev/null differ diff --git a/conformance/ConformanceJava$BinaryDecoder.class b/conformance/ConformanceJava$BinaryDecoder.class deleted file mode 100644 index ac98465d..00000000 Binary files a/conformance/ConformanceJava$BinaryDecoder.class and /dev/null differ diff --git a/conformance/ConformanceJava.class b/conformance/ConformanceJava.class deleted file mode 100644 index 9c1f08c6..00000000 Binary files a/conformance/ConformanceJava.class and /dev/null differ -- cgit v1.2.3 From cf7b6a46b25048e9d3e193c7809f9e881dc36bc4 Mon Sep 17 00:00:00 2001 From: Yilun Chong Date: Wed, 28 Jun 2017 11:44:41 -0700 Subject: delete backup files --- conformance/conformance_php.php~ | 119 -------------------------------- conformance/conformance_ruby.rb~ | 131 ----------------------------------- conformance/failure_list_ruby.txt~ | 135 ------------------------------------- 3 files changed, 385 deletions(-) delete mode 100755 conformance/conformance_php.php~ delete mode 100755 conformance/conformance_ruby.rb~ delete mode 100644 conformance/failure_list_ruby.txt~ (limited to 'conformance') diff --git a/conformance/conformance_php.php~ b/conformance/conformance_php.php~ deleted file mode 100755 index 848cb4c7..00000000 --- a/conformance/conformance_php.php~ +++ /dev/null @@ -1,119 +0,0 @@ -getPayload() == "protobuf_payload") { - if ($request->getMessageType() == "proto3") { - try { - $test_message->mergeFromString($request->getProtobufPayload()); - } catch (Exception $e) { - $response->setParseError($e->getMessage()); - return $response; - } - } elseif ($request->getMessageType() == "proto2") { - $response->setSkipped("PHP doesn't support proto2"); - return $response; - } else { - trigger_error("Protobuf request doesn't have specific payload type", E_USER_ERROR); - } - } elseif ($request->getPayload() == "json_payload") { - try { - $test_message->jsonDecode($request->getJsonPayload()); - } catch (Exception $e) { - $response->setParseError($e->getMessage()); - return $response; - } - } else { - trigger_error("Request didn't have payload.", E_USER_ERROR); - } - - if ($request->getRequestedOutputFormat() == WireFormat::UNSPECIFIED) { - trigger_error("Unspecified output format.", E_USER_ERROR); - } elseif ($request->getRequestedOutputFormat() == WireFormat::PROTOBUF) { - $response->setProtobufPayload($test_message->serializeToString()); - } elseif ($request->getRequestedOutputFormat() == WireFormat::JSON) { - $response->setJsonPayload($test_message->jsonEncode()); - } - - return $response; -} - -function doTestIO() -{ - $length_bytes = fread(STDIN, 4); - if (strlen($length_bytes) == 0) { - return false; # EOF - } elseif (strlen($length_bytes) != 4) { - trigger_error("I/O error", E_USER_ERROR); - } - - $length = unpack("V", $length_bytes)[1]; - $serialized_request = fread(STDIN, $length); - if (strlen($serialized_request) != $length) { - trigger_error("I/O error", E_USER_ERROR); - } - - $request = new \Conformance\ConformanceRequest(); - $request->mergeFromString($serialized_request); - - $response = doTest($request); - - $serialized_response = $response->serializeToString(); - fwrite(STDOUT, pack("V", strlen($serialized_response))); - fwrite(STDOUT, $serialized_response); - - $GLOBALS['test_count'] += 1; - - return true; -} - -while(true){ - if (!doTestIO()) { - fprintf(STDERR, - "conformance_php: received EOF from test runner " + - "after %d tests, exiting\n", $test_count); - exit; - } -} diff --git a/conformance/conformance_ruby.rb~ b/conformance/conformance_ruby.rb~ deleted file mode 100755 index 7e756d18..00000000 --- a/conformance/conformance_ruby.rb~ +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/env ruby -# -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# https://developers.google.com/protocol-buffers/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -require 'conformance_pb' -require 'google/protobuf/test_messages_proto3_pb' - -$test_count = 0 -$verbose = false - -def do_test(request) - test_message = ProtobufTestMessages::Proto3::TestAllTypes.new - response = Conformance::ConformanceResponse.new - - begin - case request.payload - when :protobuf_payload - if request.message_type.eql?('proto3') - begin - test_message = ProtobufTestMessages::Proto3::TestAllTypes.decode( - request.protobuf_payload) - rescue Google::Protobuf::ParseError => err - response.parse_error = err.message.encode('utf-8') - return response - end - elsif request.message_type.eql?('proto2') - response.skipped = "Ruby doesn't support proto2" - return response - else - fail "Protobuf request doesn't have specific type" - end - - when :json_payload - begin - test_message = ProtobufTestMessages::Proto3::TestAllTypes.decode_json( - request.json_payload) - rescue Google::Protobuf::ParseError => err - response.parse_error = err.message.encode('utf-8') - return response - end - - when nil - fail "Request didn't have payload" - end - - case request.requested_output_format - when :UNSPECIFIED - fail 'Unspecified output format' - - when :PROTOBUF - response.protobuf_payload = test_message.to_proto - - when :JSON - response.json_payload = test_message.to_json - - when nil - fail "Request didn't have requested output format" - end - rescue StandardError => err - response.runtime_error = err.message.encode('utf-8') - end - - response -end - -# Returns true if the test ran successfully, false on legitimate EOF. -# If EOF is encountered in an unexpected place, raises IOError. -def do_test_io - length_bytes = STDIN.read(4) - return false if length_bytes.nil? - - length = length_bytes.unpack('V').first - serialized_request = STDIN.read(length) - if serialized_request.nil? || serialized_request.length != length - fail IOError - end - - request = Conformance::ConformanceRequest.decode(serialized_request) - - response = do_test(request) - - serialized_response = Conformance::ConformanceResponse.encode(response) - STDOUT.write([serialized_response.length].pack('V')) - STDOUT.write(serialized_response) - STDOUT.flush - - if $verbose - STDERR.puts("conformance_ruby: request=#{request.to_json}, " \ - "response=#{response.to_json}\n") - end - - $test_count += 1 - - true -end - -loop do - unless do_test_io - STDERR.puts('conformance_ruby: received EOF from test runner ' \ - "after #{$test_count} tests, exiting") - break - end -end diff --git a/conformance/failure_list_ruby.txt~ b/conformance/failure_list_ruby.txt~ deleted file mode 100644 index b0d2fe58..00000000 --- a/conformance/failure_list_ruby.txt~ +++ /dev/null @@ -1,135 +0,0 @@ -Recommended.FieldMaskNumbersDontRoundTrip.JsonOutput -Recommended.FieldMaskPathsDontRoundTrip.JsonOutput -Recommended.FieldMaskTooManyUnderscore.JsonOutput -Recommended.JsonInput.DurationHas3FractionalDigits.Validator -Recommended.JsonInput.DurationHas6FractionalDigits.Validator -Recommended.JsonInput.DurationHas9FractionalDigits.Validator -Recommended.JsonInput.DurationHasZeroFractionalDigit.Validator -Recommended.JsonInput.Int64FieldBeString.Validator -Recommended.JsonInput.MapFieldValueIsNull -Recommended.JsonInput.RepeatedFieldMessageElementIsNull -Recommended.JsonInput.RepeatedFieldPrimitiveElementIsNull -Recommended.JsonInput.StringEndsWithEscapeChar -Recommended.JsonInput.StringFieldSurrogateInWrongOrder -Recommended.JsonInput.StringFieldUnpairedHighSurrogate -Recommended.JsonInput.StringFieldUnpairedLowSurrogate -Recommended.JsonInput.TimestampHas3FractionalDigits.Validator -Recommended.JsonInput.TimestampHas6FractionalDigits.Validator -Recommended.JsonInput.TimestampHas9FractionalDigits.Validator -Recommended.JsonInput.TimestampHasZeroFractionalDigit.Validator -Recommended.JsonInput.TimestampZeroNormalized.Validator -Recommended.JsonInput.Uint64FieldBeString.Validator -Required.DurationProtoInputTooLarge.JsonOutput -Required.DurationProtoInputTooSmall.JsonOutput -Required.JsonInput.Any.JsonOutput -Required.JsonInput.Any.ProtobufOutput -Required.JsonInput.AnyNested.JsonOutput -Required.JsonInput.AnyNested.ProtobufOutput -Required.JsonInput.AnyUnorderedTypeTag.JsonOutput -Required.JsonInput.AnyUnorderedTypeTag.ProtobufOutput -Required.JsonInput.AnyWithDuration.JsonOutput -Required.JsonInput.AnyWithDuration.ProtobufOutput -Required.JsonInput.AnyWithFieldMask.JsonOutput -Required.JsonInput.AnyWithFieldMask.ProtobufOutput -Required.JsonInput.AnyWithInt32ValueWrapper.JsonOutput -Required.JsonInput.AnyWithInt32ValueWrapper.ProtobufOutput -Required.JsonInput.AnyWithStruct.JsonOutput -Required.JsonInput.AnyWithStruct.ProtobufOutput -Required.JsonInput.AnyWithTimestamp.JsonOutput -Required.JsonInput.AnyWithTimestamp.ProtobufOutput -Required.JsonInput.AnyWithValueForInteger.JsonOutput -Required.JsonInput.AnyWithValueForInteger.ProtobufOutput -Required.JsonInput.AnyWithValueForJsonObject.JsonOutput -Required.JsonInput.AnyWithValueForJsonObject.ProtobufOutput -Required.JsonInput.DoubleFieldMaxNegativeValue.JsonOutput -Required.JsonInput.DoubleFieldMaxNegativeValue.ProtobufOutput -Required.JsonInput.DoubleFieldMinPositiveValue.JsonOutput -Required.JsonInput.DoubleFieldMinPositiveValue.ProtobufOutput -Required.JsonInput.DoubleFieldNan.JsonOutput -Required.JsonInput.DurationMaxValue.JsonOutput -Required.JsonInput.DurationMaxValue.ProtobufOutput -Required.JsonInput.DurationMinValue.JsonOutput -Required.JsonInput.DurationMinValue.ProtobufOutput -Required.JsonInput.DurationRepeatedValue.JsonOutput -Required.JsonInput.DurationRepeatedValue.ProtobufOutput -Required.JsonInput.FieldMask.JsonOutput -Required.JsonInput.FieldMask.ProtobufOutput -Required.JsonInput.FloatFieldInfinity.JsonOutput -Required.JsonInput.FloatFieldNan.JsonOutput -Required.JsonInput.FloatFieldNegativeInfinity.JsonOutput -Required.JsonInput.FloatFieldTooLarge -Required.JsonInput.FloatFieldTooSmall -Required.JsonInput.OneofFieldDuplicate -Required.JsonInput.OptionalBoolWrapper.JsonOutput -Required.JsonInput.OptionalBoolWrapper.ProtobufOutput -Required.JsonInput.OptionalBytesWrapper.JsonOutput -Required.JsonInput.OptionalBytesWrapper.ProtobufOutput -Required.JsonInput.OptionalDoubleWrapper.JsonOutput -Required.JsonInput.OptionalDoubleWrapper.ProtobufOutput -Required.JsonInput.OptionalFloatWrapper.JsonOutput -Required.JsonInput.OptionalFloatWrapper.ProtobufOutput -Required.JsonInput.OptionalInt32Wrapper.JsonOutput -Required.JsonInput.OptionalInt32Wrapper.ProtobufOutput -Required.JsonInput.OptionalInt64Wrapper.JsonOutput -Required.JsonInput.OptionalInt64Wrapper.ProtobufOutput -Required.JsonInput.OptionalStringWrapper.JsonOutput -Required.JsonInput.OptionalStringWrapper.ProtobufOutput -Required.JsonInput.OptionalUint32Wrapper.JsonOutput -Required.JsonInput.OptionalUint32Wrapper.ProtobufOutput -Required.JsonInput.OptionalUint64Wrapper.JsonOutput -Required.JsonInput.OptionalUint64Wrapper.ProtobufOutput -Required.JsonInput.OptionalWrapperTypesWithNonDefaultValue.JsonOutput -Required.JsonInput.OptionalWrapperTypesWithNonDefaultValue.ProtobufOutput -Required.JsonInput.RepeatedBoolWrapper.JsonOutput -Required.JsonInput.RepeatedBoolWrapper.ProtobufOutput -Required.JsonInput.RepeatedBytesWrapper.JsonOutput -Required.JsonInput.RepeatedBytesWrapper.ProtobufOutput -Required.JsonInput.RepeatedDoubleWrapper.JsonOutput -Required.JsonInput.RepeatedDoubleWrapper.ProtobufOutput -Required.JsonInput.RepeatedFloatWrapper.JsonOutput -Required.JsonInput.RepeatedFloatWrapper.ProtobufOutput -Required.JsonInput.RepeatedInt32Wrapper.JsonOutput -Required.JsonInput.RepeatedInt32Wrapper.ProtobufOutput -Required.JsonInput.RepeatedInt64Wrapper.JsonOutput -Required.JsonInput.RepeatedInt64Wrapper.ProtobufOutput -Required.JsonInput.RepeatedStringWrapper.JsonOutput -Required.JsonInput.RepeatedStringWrapper.ProtobufOutput -Required.JsonInput.RepeatedUint32Wrapper.JsonOutput -Required.JsonInput.RepeatedUint32Wrapper.ProtobufOutput -Required.JsonInput.RepeatedUint64Wrapper.JsonOutput -Required.JsonInput.RepeatedUint64Wrapper.ProtobufOutput -Required.JsonInput.StringFieldSurrogatePair.JsonOutput -Required.JsonInput.StringFieldSurrogatePair.ProtobufOutput -Required.JsonInput.Struct.JsonOutput -Required.JsonInput.Struct.ProtobufOutput -Required.JsonInput.TimestampMaxValue.JsonOutput -Required.JsonInput.TimestampMaxValue.ProtobufOutput -Required.JsonInput.TimestampMinValue.JsonOutput -Required.JsonInput.TimestampMinValue.ProtobufOutput -Required.JsonInput.TimestampRepeatedValue.JsonOutput -Required.JsonInput.TimestampRepeatedValue.ProtobufOutput -Required.JsonInput.TimestampWithNegativeOffset.JsonOutput -Required.JsonInput.TimestampWithNegativeOffset.ProtobufOutput -Required.JsonInput.TimestampWithPositiveOffset.JsonOutput -Required.JsonInput.TimestampWithPositiveOffset.ProtobufOutput -Required.JsonInput.ValueAcceptBool.JsonOutput -Required.JsonInput.ValueAcceptBool.ProtobufOutput -Required.JsonInput.ValueAcceptFloat.JsonOutput -Required.JsonInput.ValueAcceptFloat.ProtobufOutput -Required.JsonInput.ValueAcceptInteger.JsonOutput -Required.JsonInput.ValueAcceptInteger.ProtobufOutput -Required.JsonInput.ValueAcceptList.JsonOutput -Required.JsonInput.ValueAcceptList.ProtobufOutput -Required.JsonInput.ValueAcceptNull.JsonOutput -Required.JsonInput.ValueAcceptNull.ProtobufOutput -Required.JsonInput.ValueAcceptObject.JsonOutput -Required.JsonInput.ValueAcceptObject.ProtobufOutput -Required.JsonInput.ValueAcceptString.JsonOutput -Required.JsonInput.ValueAcceptString.ProtobufOutput -Required.Protobuf3Input.DoubleFieldNormalizeQuietNan.JsonOutput -Required.Protobuf3Input.DoubleFieldNormalizeSignalingNan.JsonOutput -Required.Protobuf3Input.FloatFieldNormalizeQuietNan.JsonOutput -Required.Protobuf3Input.FloatFieldNormalizeSignalingNan.JsonOutput -Required.Protobuf3Input.ValidDataRepeated.FLOAT.JsonOutput -Required.TimestampProtoInputTooLarge.JsonOutput -Required.TimestampProtoInputTooSmall.JsonOutput -- cgit v1.2.3 From 06c9057cc32f0155f277dd0842f83b5ac362c386 Mon Sep 17 00:00:00 2001 From: Yilun Chong Date: Wed, 28 Jun 2017 12:17:24 -0700 Subject: add objec support --- conformance/conformance_objc.m | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'conformance') diff --git a/conformance/conformance_objc.m b/conformance/conformance_objc.m index ef037f84..db3cc3e7 100644 --- a/conformance/conformance_objc.m +++ b/conformance/conformance_objc.m @@ -71,12 +71,20 @@ static ConformanceResponse *DoTest(ConformanceRequest *request) { break; case ConformanceRequest_Payload_OneOfCase_ProtobufPayload: { - NSError *error = nil; - testMessage = [TestAllTypes parseFromData:request.protobufPayload - error:&error]; - if (!testMessage) { - response.parseError = - [NSString stringWithFormat:@"Parse error: %@", error]; + if ([request.messageType isEqualToString:@"proto3"]) { + NSError *error = nil; + testMessage = [TestAllTypes parseFromData:request.protobufPayload + error:&error]; + if (!testMessage) { + response.parseError = + [NSString stringWithFormat:@"Parse error: %@", error]; + } + } else if ([request.messageType isEqualToString:@"proto2"]) { + response.skipped = @"ObjC doesn't support proto2"; + break; + } else { + Die(@"Protobuf request doesn't have specific payload type"); + break; } break; } -- cgit v1.2.3 From 364502102afe62bc0a9068032a177d1827aa4774 Mon Sep 17 00:00:00 2001 From: Yilun Chong Date: Wed, 28 Jun 2017 12:41:11 -0700 Subject: add message set test case --- conformance/conformance.proto | 1 + src/google/protobuf/test_messages_proto2.proto | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) (limited to 'conformance') diff --git a/conformance/conformance.proto b/conformance/conformance.proto index a1c42663..10e5d34e 100644 --- a/conformance/conformance.proto +++ b/conformance/conformance.proto @@ -78,6 +78,7 @@ message ConformanceRequest { // Which format should the testee serialize its message to? WireFormat requested_output_format = 3; + // should be set to either "proto2" or "proto3" string message_type = 4; } diff --git a/src/google/protobuf/test_messages_proto2.proto b/src/google/protobuf/test_messages_proto2.proto index 85aa1374..0c072b0c 100644 --- a/src/google/protobuf/test_messages_proto2.proto +++ b/src/google/protobuf/test_messages_proto2.proto @@ -179,6 +179,26 @@ message TestAllTypesProto2 { optional int32 field__Name16 = 416; optional int32 field_name17__ = 417; optional int32 Field_name18__ = 418; + + // message_set test case. + message mset_correct { + option message_set_wire_format = true; + extensions 4 to max; + } + + message mset_correct_extension1 { + extend mset_correct { + optional mset_correct_extension1 message_set_extension = 1547769; + } + optional string str = 25; + } + + message mset_correct_extension2 { + extend mset_correct { + optional mset_correct_extension1 message_set_extension = 4135312; + } + optional int32 i = 9; + } } message ForeignMessage { -- cgit v1.2.3 From 020a24dfdc2de06678f3f7f3547ba748fb5e5d42 Mon Sep 17 00:00:00 2001 From: Yilun Chong Date: Thu, 29 Jun 2017 11:33:22 -0700 Subject: change cpp and python to uniform message --- conformance/conformance_cpp.cc | 50 ++++++++++++--------------- conformance/conformance_python.py | 47 ++++++++++--------------- conformance/conformance_test.cc | 72 +++++++++++++++------------------------ 3 files changed, 67 insertions(+), 102 deletions(-) (limited to 'conformance') diff --git a/conformance/conformance_cpp.cc b/conformance/conformance_cpp.cc index 9c590702..8d204dd2 100644 --- a/conformance/conformance_cpp.cc +++ b/conformance/conformance_cpp.cc @@ -35,6 +35,7 @@ #include "conformance.pb.h" #include #include +#include #include #include @@ -42,6 +43,7 @@ using conformance::ConformanceRequest; using conformance::ConformanceResponse; using google::protobuf::Descriptor; using google::protobuf::DescriptorPool; +using google::protobuf::Message; using google::protobuf::internal::scoped_ptr; using google::protobuf::util::BinaryToJsonString; using google::protobuf::util::JsonToBinaryString; @@ -89,27 +91,27 @@ void CheckedWrite(int fd, const void *buf, size_t len) { } void DoTest(const ConformanceRequest& request, ConformanceResponse* response) { - TestAllTypes test_message; - TestAllTypesProto2 test_message_proto2; - bool isProto3 = request.message_type() == "proto3"; + Message *test_message; + bool isProto3 = + request.message_type() == "protobuf_test_messages.proto3.TestAllTypes"; bool isJson = request.payload_case() == ConformanceRequest::kJsonPayload; + bool isProto2 = + request.message_type() == "protobuf_test_messages.proto2.TestAllTypesProto2"; + if (isJson || isProto3) { + test_message = new TestAllTypes; + } else if (isProto2) { + test_message = new TestAllTypesProto2; + } else { + GOOGLE_LOG(FATAL) << "Protobuf request doesn't have specific payload type"; + } switch (request.payload_case()) { case ConformanceRequest::kProtobufPayload: { - if (isProto3) { - if (!test_message.ParseFromString(request.protobuf_payload())) { - // Getting parse details would involve something like: - // http://stackoverflow.com/questions/22121922/how-can-i-get-more-details-about-errors-generated-during-protobuf-parsing-c - response->set_parse_error("Parse error (no more details available)."); - return; - } - } else if (request.message_type() == "proto2") { - if (!test_message_proto2.ParseFromString(request.protobuf_payload())) { - response->set_parse_error("Parse error (no more details available)."); - return; - } - } else { - GOOGLE_LOG(FATAL) << "Protobuf request doesn't have specific payload type"; + if (!test_message->ParseFromString(request.protobuf_payload())) { + // Getting parse details would involve something like: + // http://stackoverflow.com/questions/22121922/how-can-i-get-more-details-about-errors-generated-during-protobuf-parsing-c + response->set_parse_error("Parse error (no more details available)."); + return; } break; } @@ -124,7 +126,7 @@ void DoTest(const ConformanceRequest& request, ConformanceResponse* response) { return; } - if (!test_message.ParseFromString(proto_binary)) { + if (!test_message->ParseFromString(proto_binary)) { response->set_runtime_error( "Parsing JSON generates invalid proto output."); return; @@ -143,21 +145,13 @@ void DoTest(const ConformanceRequest& request, ConformanceResponse* response) { break; case conformance::PROTOBUF: { - (isProto3 || isJson) ? - GOOGLE_CHECK( - test_message.SerializeToString(response->mutable_protobuf_payload())) - : - GOOGLE_CHECK( - test_message_proto2.SerializeToString(response->mutable_protobuf_payload())); + GOOGLE_CHECK(test_message->SerializeToString(response->mutable_protobuf_payload())); break; } case conformance::JSON: { string proto_binary; - (isProto3 || isJson) ? - GOOGLE_CHECK(test_message.SerializeToString(&proto_binary)) - : - GOOGLE_CHECK(test_message_proto2.SerializeToString(&proto_binary)); + GOOGLE_CHECK(test_message->SerializeToString(&proto_binary)); Status status = BinaryToJsonString(type_resolver, *type_url, proto_binary, response->mutable_json_payload()); if (!status.ok()) { diff --git a/conformance/conformance_python.py b/conformance/conformance_python.py index 846ccbc6..62cfce87 100755 --- a/conformance/conformance_python.py +++ b/conformance/conformance_python.py @@ -54,30 +54,25 @@ class ProtocolError(Exception): pass def do_test(request): - test_message = test_messages_proto3_pb2.TestAllTypes() - response = conformance_pb2.ConformanceResponse() - test_message = test_messages_proto3_pb2.TestAllTypes() - test_message_proto2 = test_messages_proto2_pb2.TestAllTypesProto2() - isProto3 = (request.message_type == "proto3") + isProto3 = (request.message_type == "protobuf_test_messages.proto3.TestAllTypes") isJson = (request.WhichOneof('payload') == 'json_payload') + isProto2 = (request.message_type == "protobuf_test_messages.proto2.TestAllTypesProto2") + + if (not isProto3) and (not isJson) and (not isProto2): + raise ProtocolError("Protobuf request doesn't have specific payload type") + + test_message = test_messages_proto2_pb2.TestAllTypesProto2() if isProto2 else \ + test_messages_proto3_pb2.TestAllTypes() + response = conformance_pb2.ConformanceResponse() try: if request.WhichOneof('payload') == 'protobuf_payload': - if isProto3: - try: - test_message.ParseFromString(request.protobuf_payload) - except message.DecodeError as e: - response.parse_error = str(e) - return response - elif request.message_type == "proto2": - try: - test_message_proto2.ParseFromString(request.protobuf_payload) - except message.DecodeError as e: - response.parse_error = str(e) - return response - else: - raise ProtocolError("Protobuf request doesn't have specific payload type") - + try: + test_message.ParseFromString(request.protobuf_payload) + except message.DecodeError as e: + response.parse_error = str(e) + return response + elif request.WhichOneof('payload') == 'json_payload': try: json_format.Parse(request.json_payload, test_message) @@ -92,17 +87,11 @@ def do_test(request): raise ProtocolError("Unspecified output format") elif request.requested_output_format == conformance_pb2.PROTOBUF: - if isProto3 or isJson: - response.protobuf_payload = test_message.SerializeToString() - else: - response.protobuf_payload = test_message_proto2.SerializeToString() + response.protobuf_payload = test_message.SerializeToString() elif request.requested_output_format == conformance_pb2.JSON: - try: - if isProto3 or isJson: - response.json_payload = json_format.MessageToJson(test_message) - else: - response.json_payload = json_format.MessageToJson(test_message_proto2) + try: + response.json_payload = json_format.MessageToJson(test_message) except Exception as e: response.serialize_error = str(e) return response diff --git a/conformance/conformance_test.cc b/conformance/conformance_test.cc index f44fe8a1..7583c88d 100644 --- a/conformance/conformance_test.cc +++ b/conformance/conformance_test.cc @@ -276,14 +276,18 @@ void ConformanceTestSuite::RunValidInputTest( const string& test_name, ConformanceLevel level, const string& input, WireFormat input_format, const string& equivalent_text_format, WireFormat requested_output, bool isProto3) { - TestAllTypes reference_message; - TestAllTypesProto2 reference_message_proto2; + auto newTestMessage = [&isProto3]() { + Message* newMessage; + if (isProto3) { + newMessage = new TestAllTypes; + } else { + newMessage = new TestAllTypesProto2; + } + return newMessage; + }; + Message* reference_message = newTestMessage(); GOOGLE_CHECK( - isProto3 ? - TextFormat::ParseFromString(equivalent_text_format, &reference_message) - : - TextFormat::ParseFromString(equivalent_text_format, &reference_message_proto2) - ) + TextFormat::ParseFromString(equivalent_text_format, reference_message)) << "Failed to parse data for test case: " << test_name << ", data: " << equivalent_text_format; @@ -294,9 +298,9 @@ void ConformanceTestSuite::RunValidInputTest( case conformance::PROTOBUF: { request.set_protobuf_payload(input); if (isProto3) { - request.set_message_type("proto3"); + request.set_message_type("protobuf_test_messages.proto3.TestAllTypes"); } else { - request.set_message_type("proto2"); + request.set_message_type("protobuf_test_messages.proto2.TestAllTypesProto2"); } break; } @@ -313,8 +317,7 @@ void ConformanceTestSuite::RunValidInputTest( RunTest(test_name, request, &response); - TestAllTypes test_message; - TestAllTypesProto2 test_message_proto2; + Message *test_message = newTestMessage(); switch (response.result_case()) { case ConformanceResponse::RESULT_NOT_SET: @@ -350,20 +353,11 @@ void ConformanceTestSuite::RunValidInputTest( return; } - if (isProto3) { - if (!test_message.ParseFromString(binary_protobuf)) { - ReportFailure(test_name, level, request, response, - "INTERNAL ERROR: internal JSON->protobuf transcode " - "yielded unparseable proto."); - return; - } - } else { - if (!test_message_proto2.ParseFromString(binary_protobuf)) { - ReportFailure(test_name, level, request, response, - "INTERNAL ERROR: internal JSON->protobuf transcode " - "yielded unparseable proto."); - return; - } + if (!test_message->ParseFromString(binary_protobuf)) { + ReportFailure(test_name, level, request, response, + "INTERNAL ERROR: internal JSON->protobuf transcode " + "yielded unparseable proto."); + return; } break; @@ -377,18 +371,10 @@ void ConformanceTestSuite::RunValidInputTest( return; } - if (isProto3) { - if (!test_message.ParseFromString(response.protobuf_payload())) { - ReportFailure(test_name, level, request, response, - "Protobuf output we received from test was unparseable."); - return; - } - } else { - if (!test_message_proto2.ParseFromString(response.protobuf_payload())) { - ReportFailure(test_name, level, request, response, - "Protobuf output we received from test was unparseable."); - return; - } + if (!test_message->ParseFromString(response.protobuf_payload())) { + ReportFailure(test_name, level, request, response, + "Protobuf output we received from test was unparseable."); + return; } break; @@ -407,11 +393,7 @@ void ConformanceTestSuite::RunValidInputTest( differencer.ReportDifferencesToString(&differences); bool check; - if (isProto3) { - check = differencer.Compare(reference_message, test_message); - } else { - check = differencer.Compare(reference_message_proto2, test_message_proto2); - } + check = differencer.Compare(*reference_message, *test_message); if (check) { ReportSuccess(test_name); } else { @@ -429,9 +411,9 @@ void ConformanceTestSuite::ExpectParseFailureForProto( ConformanceResponse response; request.set_protobuf_payload(proto); if (isProto3) { - request.set_message_type("proto3"); + request.set_message_type("protobuf_test_messages.proto3.TestAllTypes"); } else { - request.set_message_type("proto2"); + request.set_message_type("protobuf_test_messages.proto2.TestAllTypesProto2"); } string effective_test_name = ConformanceLevelToString(level) + ".ProtobufInput." + test_name; @@ -586,7 +568,7 @@ void ConformanceTestSuite::ExpectSerializeFailureForJson( ConformanceRequest request; ConformanceResponse response; request.set_protobuf_payload(payload_message.SerializeAsString()); - request.set_message_type("proto3"); + request.set_message_type("protobuf_test_messages.proto3.TestAllTypes"); string effective_test_name = ConformanceLevelToString(level) + "." + test_name + ".JsonOutput"; request.set_requested_output_format(conformance::JSON); -- cgit v1.2.3 From fcb926825537c214ef7ce40f742aca905345f958 Mon Sep 17 00:00:00 2001 From: Yilun Chong Date: Thu, 29 Jun 2017 14:40:47 -0700 Subject: change java to uniform message, revert TestValidDataForType's parameters --- conformance/ConformanceJava.java | 376 +++++++++++---------------------------- conformance/conformance_test.cc | 86 +++++---- conformance/conformance_test.h | 3 +- 3 files changed, 147 insertions(+), 318 deletions(-) (limited to 'conformance') diff --git a/conformance/ConformanceJava.java b/conformance/ConformanceJava.java index 3a944b51..15aaed96 100644 --- a/conformance/ConformanceJava.java +++ b/conformance/ConformanceJava.java @@ -1,13 +1,18 @@ import com.google.protobuf.ByteString; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Parser; import com.google.protobuf.CodedInputStream; import com.google.protobuf.conformance.Conformance; import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf_test_messages.proto3.TestMessagesProto3; +import com.google.protobuf_test_messages.proto3.TestMessagesProto3.TestAllTypes; import com.google.protobuf_test_messages.proto2.TestMessagesProto2; +import com.google.protobuf_test_messages.proto2.TestMessagesProto2.TestAllTypesProto2; +import com.google.protobuf.ExtensionRegistry; import com.google.protobuf.util.JsonFormat; import com.google.protobuf.util.JsonFormat.TypeRegistry; -import java.io.IOException; import java.nio.ByteBuffer; +import java.util.ArrayList; class ConformanceJava { private int testCount = 0; @@ -51,275 +56,100 @@ class ConformanceJava { buf[3] = (byte)(val >> 24); writeToStdout(buf); } - - private enum BinaryDecoder { - BYTE_STRING_DECODER() { - @Override - public TestMessagesProto3.TestAllTypes parseProto3(ByteString bytes) - throws InvalidProtocolBufferException { - return TestMessagesProto3.TestAllTypes.parseFrom(bytes); - } - @Override - public TestMessagesProto2.TestAllTypesProto2 parseProto2(ByteString bytes) - throws InvalidProtocolBufferException { - return TestMessagesProto2.TestAllTypesProto2.parseFrom(bytes); - } - }, - BYTE_ARRAY_DECODER() { - @Override - public TestMessagesProto3.TestAllTypes parseProto3(ByteString bytes) - throws InvalidProtocolBufferException { - return TestMessagesProto3.TestAllTypes.parseFrom(bytes.toByteArray()); - } - @Override - public TestMessagesProto2.TestAllTypesProto2 parseProto2(ByteString bytes) - throws InvalidProtocolBufferException { - return TestMessagesProto2.TestAllTypesProto2.parseFrom(bytes.toByteArray()); - } - }, - ARRAY_BYTE_BUFFER_DECODER() { - @Override - public TestMessagesProto3.TestAllTypes parseProto3(ByteString bytes) - throws InvalidProtocolBufferException { - ByteBuffer buffer = ByteBuffer.allocate(bytes.size()); - bytes.copyTo(buffer); - buffer.flip(); - try { - return TestMessagesProto3.TestAllTypes.parseFrom(CodedInputStream.newInstance(buffer)); - } catch (InvalidProtocolBufferException e) { - throw e; - } catch (IOException e) { - throw new RuntimeException( - "ByteString based ByteBuffer should not throw IOException.", e); - } - } - @Override - public TestMessagesProto2.TestAllTypesProto2 parseProto2(ByteString bytes) - throws InvalidProtocolBufferException { - ByteBuffer buffer = ByteBuffer.allocate(bytes.size()); - bytes.copyTo(buffer); - buffer.flip(); - try { - return TestMessagesProto2.TestAllTypesProto2.parseFrom(CodedInputStream.newInstance(buffer)); - } catch (InvalidProtocolBufferException e) { - throw e; - } catch (IOException e) { - throw new RuntimeException( - "ByteString based ByteBuffer should not throw IOException.", e); - } - } - }, - READONLY_ARRAY_BYTE_BUFFER_DECODER() { - @Override - public TestMessagesProto3.TestAllTypes parseProto3(ByteString bytes) - throws InvalidProtocolBufferException { - try { - return TestMessagesProto3.TestAllTypes.parseFrom( - CodedInputStream.newInstance(bytes.asReadOnlyByteBuffer())); - } catch (InvalidProtocolBufferException e) { - throw e; - } catch (IOException e) { - throw new RuntimeException( - "ByteString based ByteBuffer should not throw IOException.", e); - } - } - @Override - public TestMessagesProto2.TestAllTypesProto2 parseProto2(ByteString bytes) - throws InvalidProtocolBufferException { - try { - return TestMessagesProto2.TestAllTypesProto2.parseFrom( - CodedInputStream.newInstance(bytes.asReadOnlyByteBuffer())); - } catch (InvalidProtocolBufferException e) { - throw e; - } catch (IOException e) { - throw new RuntimeException( - "ByteString based ByteBuffer should not throw IOException.", e); - } - } - }, - DIRECT_BYTE_BUFFER_DECODER() { - @Override - public TestMessagesProto3.TestAllTypes parseProto3(ByteString bytes) - throws InvalidProtocolBufferException { - ByteBuffer buffer = ByteBuffer.allocateDirect(bytes.size()); - bytes.copyTo(buffer); - buffer.flip(); - try { - return TestMessagesProto3.TestAllTypes.parseFrom(CodedInputStream.newInstance(buffer)); - } catch (InvalidProtocolBufferException e) { - throw e; - } catch (IOException e) { - throw new RuntimeException( - "ByteString based ByteBuffer should not throw IOException.", e); - } - } - @Override - public TestMessagesProto2.TestAllTypesProto2 parseProto2(ByteString bytes) - throws InvalidProtocolBufferException { - ByteBuffer buffer = ByteBuffer.allocateDirect(bytes.size()); - bytes.copyTo(buffer); - buffer.flip(); - try { - return TestMessagesProto2.TestAllTypesProto2 - .parseFrom(CodedInputStream.newInstance(buffer)); - } catch (InvalidProtocolBufferException e) { - throw e; - } catch (IOException e) { - throw new RuntimeException( - "ByteString based ByteBuffer should not throw IOException.", e); - } - } - }, - READONLY_DIRECT_BYTE_BUFFER_DECODER() { - @Override - public TestMessagesProto3.TestAllTypes parseProto3(ByteString bytes) - throws InvalidProtocolBufferException { - ByteBuffer buffer = ByteBuffer.allocateDirect(bytes.size()); - bytes.copyTo(buffer); - buffer.flip(); - try { - return TestMessagesProto3.TestAllTypes.parseFrom( - CodedInputStream.newInstance(buffer.asReadOnlyBuffer())); - } catch (InvalidProtocolBufferException e) { - throw e; - } catch (IOException e) { - throw new RuntimeException( - "ByteString based ByteBuffer should not throw IOException.", e); - } - } - @Override - public TestMessagesProto2.TestAllTypesProto2 parseProto2(ByteString bytes) - throws InvalidProtocolBufferException { - ByteBuffer buffer = ByteBuffer.allocateDirect(bytes.size()); - bytes.copyTo(buffer); - buffer.flip(); - try { - return TestMessagesProto2.TestAllTypesProto2.parseFrom( - CodedInputStream.newInstance(buffer.asReadOnlyBuffer())); - } catch (InvalidProtocolBufferException e) { - throw e; - } catch (IOException e) { - throw new RuntimeException( - "ByteString based ByteBuffer should not throw IOException.", e); - } - } - }, - INPUT_STREAM_DECODER() { - @Override - public TestMessagesProto3.TestAllTypes parseProto3(ByteString bytes) - throws InvalidProtocolBufferException { - try { - return TestMessagesProto3.TestAllTypes.parseFrom(bytes.newInput()); - } catch (InvalidProtocolBufferException e) { - throw e; - } catch (IOException e) { - throw new RuntimeException( - "ByteString based InputStream should not throw IOException.", e); - } - } - @Override - public TestMessagesProto2.TestAllTypesProto2 parseProto2(ByteString bytes) - throws InvalidProtocolBufferException { - try { - return TestMessagesProto2.TestAllTypesProto2.parseFrom(bytes.newInput()); - } catch (InvalidProtocolBufferException e) { - throw e; - } catch (IOException e) { - throw new RuntimeException( - "ByteString based InputStream should not throw IOException.", e); - } - } - }; - - public abstract TestMessagesProto3.TestAllTypes parseProto3(ByteString bytes) - throws InvalidProtocolBufferException; - public abstract TestMessagesProto2.TestAllTypesProto2 parseProto2(ByteString bytes) - throws InvalidProtocolBufferException; + + private enum BinaryDecoderType { + BTYE_STRING_DECODER, + BYTE_ARRAY_DECODER, + ARRAY_BYTE_BUFFER_DECODER, + READONLY_ARRAY_BYTE_BUFFER_DECODER, + DIRECT_BYTE_BUFFER_DECODER, + READONLY_DIRECT_BYTE_BUFFER_DECODER, + INPUT_STREAM_DECODER; } - private TestMessagesProto3.TestAllTypes parseBinaryToProto3(ByteString bytes) + private static class BinaryDecoder { + public MessageType decode (ByteString bytes, BinaryDecoderType type, + Parser parser, ExtensionRegistry extensions) throws InvalidProtocolBufferException { - TestMessagesProto3.TestAllTypes[] messages = - new TestMessagesProto3.TestAllTypes[BinaryDecoder.values().length]; - InvalidProtocolBufferException[] exceptions = - new InvalidProtocolBufferException[BinaryDecoder.values().length]; - - boolean hasMessage = false; - boolean hasException = false; - for (int i = 0; i < BinaryDecoder.values().length; ++i) { - try { - messages[i] = BinaryDecoder.values()[i].parseProto3(bytes); - hasMessage = true; - } catch (InvalidProtocolBufferException e) { - exceptions[i] = e; - hasException = true; - } - } - - if (hasMessage && hasException) { - StringBuilder sb = - new StringBuilder("Binary decoders disagreed on whether the payload was valid.\n"); - for (int i = 0; i < BinaryDecoder.values().length; ++i) { - sb.append(BinaryDecoder.values()[i].name()); - if (messages[i] != null) { - sb.append(" accepted the payload.\n"); - } else { - sb.append(" rejected the payload.\n"); + switch (type) { + case BTYE_STRING_DECODER: + return parser.parseFrom(bytes, extensions); + case BYTE_ARRAY_DECODER: + return parser.parseFrom(bytes.toByteArray(), extensions); + case ARRAY_BYTE_BUFFER_DECODER: { + ByteBuffer buffer = ByteBuffer.allocate(bytes.size()); + bytes.copyTo(buffer); + buffer.flip(); + try { + return parser.parseFrom(CodedInputStream.newInstance(buffer), extensions); + } catch (InvalidProtocolBufferException e) { + throw e; + } } - } - throw new RuntimeException(sb.toString()); - } - - if (hasException) { - // We do not check if exceptions are equal. Different implementations may return different - // exception messages. Throw an arbitrary one out instead. - throw exceptions[0]; - } - - // Fast path comparing all the messages with the first message, assuming equality being - // symmetric and transitive. - boolean allEqual = true; - for (int i = 1; i < messages.length; ++i) { - if (!messages[0].equals(messages[i])) { - allEqual = false; - break; - } - } - - // Slow path: compare and find out all unequal pairs. - if (!allEqual) { - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < messages.length - 1; ++i) { - for (int j = i + 1; j < messages.length; ++j) { - if (!messages[i].equals(messages[j])) { - sb.append(BinaryDecoder.values()[i].name()) - .append(" and ") - .append(BinaryDecoder.values()[j].name()) - .append(" parsed the payload differently.\n"); + case READONLY_ARRAY_BYTE_BUFFER_DECODER: { + try { + return parser.parseFrom( + CodedInputStream.newInstance(bytes.asReadOnlyByteBuffer()), extensions); + } catch (InvalidProtocolBufferException e) { + throw e; + } + } + case DIRECT_BYTE_BUFFER_DECODER: { + ByteBuffer buffer = ByteBuffer.allocateDirect(bytes.size()); + bytes.copyTo(buffer); + buffer.flip(); + try { + return parser.parseFrom(CodedInputStream.newInstance(buffer), extensions); + } catch (InvalidProtocolBufferException e) { + throw e; + } + } + case READONLY_DIRECT_BYTE_BUFFER_DECODER: { + ByteBuffer buffer = ByteBuffer.allocateDirect(bytes.size()); + bytes.copyTo(buffer); + buffer.flip(); + try { + return parser.parseFrom( + CodedInputStream.newInstance(buffer.asReadOnlyBuffer()), extensions); + } catch (InvalidProtocolBufferException e) { + throw e; + } + } + case INPUT_STREAM_DECODER: { + try { + return parser.parseFrom(bytes.newInput(), extensions); + } catch (InvalidProtocolBufferException e) { + throw e; } } + default : + return null; } - throw new RuntimeException(sb.toString()); } - - return messages[0]; } - - private TestMessagesProto2.TestAllTypesProto2 parseBinaryToProto2(ByteString bytes) + + private MessageType parseBinary( + ByteString bytes, Parser parser, ExtensionRegistry extensions) throws InvalidProtocolBufferException { - TestMessagesProto2.TestAllTypesProto2[] messages = - new TestMessagesProto2.TestAllTypesProto2[BinaryDecoder.values().length]; - InvalidProtocolBufferException[] exceptions = - new InvalidProtocolBufferException[BinaryDecoder.values().length]; + ArrayList messages = new ArrayList (); + ArrayList exceptions = + new ArrayList (); + + for (int i = 0; i < BinaryDecoderType.values().length; i++) { + messages.add(null); + exceptions.add(null); + } + BinaryDecoder decoder = new BinaryDecoder (); boolean hasMessage = false; boolean hasException = false; - for (int i = 0; i < BinaryDecoder.values().length; ++i) { + for (int i = 0; i < BinaryDecoderType.values().length; ++i) { try { - messages[i] = BinaryDecoder.values()[i].parseProto2(bytes); + //= BinaryDecoderType.values()[i].parseProto3(bytes); + messages.set(i, decoder.decode(bytes, BinaryDecoderType.values()[i], parser, extensions)); hasMessage = true; } catch (InvalidProtocolBufferException e) { - exceptions[i] = e; + exceptions.set(i, e); hasException = true; } } @@ -327,9 +157,9 @@ class ConformanceJava { if (hasMessage && hasException) { StringBuilder sb = new StringBuilder("Binary decoders disagreed on whether the payload was valid.\n"); - for (int i = 0; i < BinaryDecoder.values().length; ++i) { - sb.append(BinaryDecoder.values()[i].name()); - if (messages[i] != null) { + for (int i = 0; i < BinaryDecoderType.values().length; ++i) { + sb.append(BinaryDecoderType.values()[i].name()); + if (messages.get(i) != null) { sb.append(" accepted the payload.\n"); } else { sb.append(" rejected the payload.\n"); @@ -341,14 +171,14 @@ class ConformanceJava { if (hasException) { // We do not check if exceptions are equal. Different implementations may return different // exception messages. Throw an arbitrary one out instead. - throw exceptions[0]; + throw exceptions.get(0); } // Fast path comparing all the messages with the first message, assuming equality being // symmetric and transitive. boolean allEqual = true; - for (int i = 1; i < messages.length; ++i) { - if (!messages[0].equals(messages[i])) { + for (int i = 1; i < messages.size(); ++i) { + if (!messages.get(0).equals(messages.get(i))) { allEqual = false; break; } @@ -357,12 +187,12 @@ class ConformanceJava { // Slow path: compare and find out all unequal pairs. if (!allEqual) { StringBuilder sb = new StringBuilder(); - for (int i = 0; i < messages.length - 1; ++i) { - for (int j = i + 1; j < messages.length; ++j) { - if (!messages[i].equals(messages[j])) { - sb.append(BinaryDecoder.values()[i].name()) + for (int i = 0; i < messages.size() - 1; ++i) { + for (int j = i + 1; j < messages.size(); ++j) { + if (!messages.get(i).equals(messages.get(j))) { + sb.append(BinaryDecoderType.values()[i].name()) .append(" and ") - .append(BinaryDecoder.values()[j].name()) + .append(BinaryDecoderType.values()[j].name()) .append(" parsed the payload differently.\n"); } } @@ -370,25 +200,29 @@ class ConformanceJava { throw new RuntimeException(sb.toString()); } - return messages[0]; + return messages.get(0); } - private Conformance.ConformanceResponse doTest(Conformance.ConformanceRequest request) { com.google.protobuf.AbstractMessage testMessage; - boolean isProto3 = request.getMessageType().equals("proto3"); + boolean isProto3 = request.getMessageType().equals("protobuf_test_messages.proto3.TestAllTypes"); + boolean isProto2 = request.getMessageType().equals("protobuf_test_messages.proto2.TestAllTypesProto2"); switch (request.getPayloadCase()) { case PROTOBUF_PAYLOAD: { if (isProto3) { try { - testMessage = parseBinaryToProto3(request.getProtobufPayload()); + ExtensionRegistry extensions = ExtensionRegistry.newInstance(); + TestMessagesProto3.registerAllExtensions(extensions); + testMessage = parseBinary(request.getProtobufPayload(), TestAllTypes.parser(), extensions); } catch (InvalidProtocolBufferException e) { return Conformance.ConformanceResponse.newBuilder().setParseError(e.getMessage()).build(); } - } else if (request.getMessageType().equals("proto2")) { + } else if (isProto2) { try { - testMessage = parseBinaryToProto2(request.getProtobufPayload()); + ExtensionRegistry extensions = ExtensionRegistry.newInstance(); + TestMessagesProto2.registerAllExtensions(extensions); + testMessage = parseBinary(request.getProtobufPayload(), TestAllTypesProto2.parser(), extensions); } catch (InvalidProtocolBufferException e) { return Conformance.ConformanceResponse.newBuilder().setParseError(e.getMessage()).build(); } diff --git a/conformance/conformance_test.cc b/conformance/conformance_test.cc index 7583c88d..1c251e51 100644 --- a/conformance/conformance_test.cc +++ b/conformance/conformance_test.cc @@ -674,35 +674,37 @@ void ConformanceTestSuite::TestPrematureEOFForType(FieldDescriptor::Type type) { void ConformanceTestSuite::TestValidDataForType( FieldDescriptor::Type type, - std::vector> values, bool isProto3) { - const string type_name = - UpperCase(string(".") + FieldDescriptor::TypeName(type)); - WireFormatLite::WireType wire_type = WireFormatLite::WireTypeForFieldType( - static_cast(type)); - const FieldDescriptor* field = GetFieldForType(type, false, isProto3); - const FieldDescriptor* rep_field = GetFieldForType(type, true, isProto3); - - RunValidProtobufTest("ValidDataScalar" + type_name, REQUIRED, - cat(tag(field->number(), wire_type), values[0].first), - field->name() + ": " + values[0].second, isProto3); - - string proto; - string text = field->name() + ": " + values.back().second; - for (size_t i = 0; i < values.size(); i++) { - proto += cat(tag(field->number(), wire_type), values[i].first); - } - RunValidProtobufTest("RepeatedScalarSelectsLast" + type_name, REQUIRED, - proto, text, isProto3); + std::vector> values) { + for (int isProto3 = 0; isProto3 < 2; isProto3++) { + const string type_name = + UpperCase(string(".") + FieldDescriptor::TypeName(type)); + WireFormatLite::WireType wire_type = WireFormatLite::WireTypeForFieldType( + static_cast(type)); + const FieldDescriptor* field = GetFieldForType(type, false, isProto3); + const FieldDescriptor* rep_field = GetFieldForType(type, true, isProto3); + + RunValidProtobufTest("ValidDataScalar" + type_name, REQUIRED, + cat(tag(field->number(), wire_type), values[0].first), + field->name() + ": " + values[0].second, isProto3); + + string proto; + string text = field->name() + ": " + values.back().second; + for (size_t i = 0; i < values.size(); i++) { + proto += cat(tag(field->number(), wire_type), values[i].first); + } + RunValidProtobufTest("RepeatedScalarSelectsLast" + type_name, REQUIRED, + proto, text, isProto3); - proto.clear(); - text.clear(); + proto.clear(); + text.clear(); - for (size_t i = 0; i < values.size(); i++) { - proto += cat(tag(rep_field->number(), wire_type), values[i].first); - text += rep_field->name() + ": " + values[i].second + " "; + for (size_t i = 0; i < values.size(); i++) { + proto += cat(tag(rep_field->number(), wire_type), values[i].first); + text += rep_field->name() + ": " + values[i].second + " "; + } + RunValidProtobufTest("ValidDataRepeated" + type_name, REQUIRED, + proto, text, isProto3); } - RunValidProtobufTest("ValidDataRepeated" + type_name, REQUIRED, - proto, text, isProto3); } void ConformanceTestSuite::SetFailureList(const string& filename, @@ -793,29 +795,23 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, {dbl(0.1), "0.1"}, {dbl(1.7976931348623157e+308), "1.7976931348623157e+308"}, {dbl(2.22507385850720138309e-308), "2.22507385850720138309e-308"} - }, true); - TestValidDataForType(FieldDescriptor::TYPE_DOUBLE, { - {dbl(0.1), "0.1"}, - {dbl(1.7976931348623157e+308), "1.7976931348623157e+308"}, - {dbl(2.22507385850720138309e-308), "2.22507385850720138309e-308"} - }, false); - + }); TestValidDataForType(FieldDescriptor::TYPE_FLOAT, { {flt(0.1), "0.1"}, {flt(1.00000075e-36), "1.00000075e-36"}, {flt(3.402823e+38), "3.402823e+38"}, // 3.40282347e+38 {flt(1.17549435e-38f), "1.17549435e-38"} - }, true); + }); TestValidDataForType(FieldDescriptor::TYPE_INT64, { {varint(12345), "12345"}, {varint(kInt64Max), std::to_string(kInt64Max)}, {varint(kInt64Min), std::to_string(kInt64Min)} - }, true); + }); TestValidDataForType(FieldDescriptor::TYPE_UINT64, { {varint(12345), "12345"}, {varint(kUint64Max), std::to_string(kUint64Max)}, {varint(0), "0"} - }, true); + }); TestValidDataForType(FieldDescriptor::TYPE_INT32, { {varint(12345), "12345"}, {longvarint(12345, 2), "12345"}, @@ -825,7 +821,7 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, {varint(1LL << 33), std::to_string(static_cast(1LL << 33))}, {varint((1LL << 33) - 1), std::to_string(static_cast((1LL << 33) - 1))}, - }, true); + }); TestValidDataForType(FieldDescriptor::TYPE_UINT32, { {varint(12345), "12345"}, {longvarint(12345, 2), "12345"}, @@ -835,42 +831,42 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, {varint(1LL << 33), std::to_string(static_cast(1LL << 33))}, {varint((1LL << 33) - 1), std::to_string(static_cast((1LL << 33) - 1))}, - }, true); + }); TestValidDataForType(FieldDescriptor::TYPE_FIXED64, { {u64(12345), "12345"}, {u64(kUint64Max), std::to_string(kUint64Max)}, {u64(0), "0"} - }, true); + }); TestValidDataForType(FieldDescriptor::TYPE_FIXED32, { {u32(12345), "12345"}, {u32(kUint32Max), std::to_string(kUint32Max)}, // UINT32_MAX {u32(0), "0"} - }, true); + }); TestValidDataForType(FieldDescriptor::TYPE_SFIXED64, { {u64(12345), "12345"}, {u64(kInt64Max), std::to_string(kInt64Max)}, {u64(kInt64Min), std::to_string(kInt64Min)} - }, true); + }); TestValidDataForType(FieldDescriptor::TYPE_SFIXED32, { {u32(12345), "12345"}, {u32(kInt32Max), std::to_string(kInt32Max)}, {u32(kInt32Min), std::to_string(kInt32Min)} - }, true); + }); TestValidDataForType(FieldDescriptor::TYPE_BOOL, { {varint(1), "true"}, {varint(0), "false"}, {varint(12345678), "true"} - }, true); + }); TestValidDataForType(FieldDescriptor::TYPE_SINT32, { {zz32(12345), "12345"}, {zz32(kInt32Max), std::to_string(kInt32Max)}, {zz32(kInt32Min), std::to_string(kInt32Min)} - }, true); + }); TestValidDataForType(FieldDescriptor::TYPE_SINT64, { {zz64(12345), "12345"}, {zz64(kInt64Max), std::to_string(kInt64Max)}, {zz64(kInt64Min), std::to_string(kInt64Min)} - }, true); + }); // TODO(haberman): // TestValidDataForType(FieldDescriptor::TYPE_STRING diff --git a/conformance/conformance_test.h b/conformance/conformance_test.h index 6bfcd72f..3e3ac6eb 100644 --- a/conformance/conformance_test.h +++ b/conformance/conformance_test.h @@ -210,8 +210,7 @@ class ConformanceTestSuite { void TestIllegalTags(); void TestValidDataForType( google::protobuf::FieldDescriptor::Type, - std::vector> values, - bool isProto3); + std::vector> values); bool CheckSetEmpty(const set& set_to_check, const std::string& write_to_file, const std::string& msg); ConformanceTestRunner* runner_; -- cgit v1.2.3 From a7d5be6a910caabc4b26d73bc5c369dbc638c4c3 Mon Sep 17 00:00:00 2001 From: Yilun Chong Date: Thu, 29 Jun 2017 15:04:50 -0700 Subject: change php objc nodejs csharp ruby --- conformance/conformance_nodejs.js | 4 +-- conformance/conformance_objc.m | 4 +-- conformance/conformance_php.php | 4 +-- conformance/conformance_ruby.rb | 4 +-- csharp/src/Google.Protobuf.Conformance/Program.cs | 31 +++++++++++------------ src/google/protobuf/test_messages_proto2.proto | 14 +++++----- 6 files changed, 30 insertions(+), 31 deletions(-) (limited to 'conformance') diff --git a/conformance/conformance_nodejs.js b/conformance/conformance_nodejs.js index 30294bf6..7ea392d1 100755 --- a/conformance/conformance_nodejs.js +++ b/conformance/conformance_nodejs.js @@ -50,7 +50,7 @@ function doTest(request) { switch (request.getPayloadCase()) { case conformance.ConformanceRequest.PayloadCase.PROTOBUF_PAYLOAD: { - if (request.getMessageType() == "proto3") { + if (request.getMessageType() == "protobuf_test_messages.proto3.TestAllTypes") { try { testMessage = test_messages_proto3.TestAllTypes.deserializeBinary( request.getProtobufPayload()); @@ -58,7 +58,7 @@ function doTest(request) { response.setParseError(err.toString()); return response; } - } else if (request.getMessageType() == "proto2"){ + } else if (request.getMessageType() == "protobuf_test_messages.proto2.TestAllTypesProto2"){ response.setSkipped("NodeJS doesn\'t support proto2"); return response; } else { diff --git a/conformance/conformance_objc.m b/conformance/conformance_objc.m index db3cc3e7..8bf1d4b8 100644 --- a/conformance/conformance_objc.m +++ b/conformance/conformance_objc.m @@ -71,7 +71,7 @@ static ConformanceResponse *DoTest(ConformanceRequest *request) { break; case ConformanceRequest_Payload_OneOfCase_ProtobufPayload: { - if ([request.messageType isEqualToString:@"proto3"]) { + if ([request.messageType isEqualToString:@"protobuf_test_messages.proto3.TestAllTypes"]) { NSError *error = nil; testMessage = [TestAllTypes parseFromData:request.protobufPayload error:&error]; @@ -79,7 +79,7 @@ static ConformanceResponse *DoTest(ConformanceRequest *request) { response.parseError = [NSString stringWithFormat:@"Parse error: %@", error]; } - } else if ([request.messageType isEqualToString:@"proto2"]) { + } else if ([request.messageType isEqualToString:@"protobuf_test_messages.proto2.TestAllTypesProto2"]) { response.skipped = @"ObjC doesn't support proto2"; break; } else { diff --git a/conformance/conformance_php.php b/conformance/conformance_php.php index 848cb4c7..ca2292ad 100755 --- a/conformance/conformance_php.php +++ b/conformance/conformance_php.php @@ -45,14 +45,14 @@ function doTest($request) $test_message = new \Protobuf_test_messages\Proto3\TestAllTypes(); $response = new \Conformance\ConformanceResponse(); if ($request->getPayload() == "protobuf_payload") { - if ($request->getMessageType() == "proto3") { + if ($request->getMessageType() == "protobuf_test_messages.proto3.TestAllTypes") { try { $test_message->mergeFromString($request->getProtobufPayload()); } catch (Exception $e) { $response->setParseError($e->getMessage()); return $response; } - } elseif ($request->getMessageType() == "proto2") { + } elseif ($request->getMessageType() == "protobuf_test_messages.proto2.TestAllTypesProto2") { $response->setSkipped("PHP doesn't support proto2"); return $response; } else { diff --git a/conformance/conformance_ruby.rb b/conformance/conformance_ruby.rb index 552344b4..0fd9e3f8 100755 --- a/conformance/conformance_ruby.rb +++ b/conformance/conformance_ruby.rb @@ -43,7 +43,7 @@ def do_test(request) begin case request.payload when :protobuf_payload - if request.message_type.eql?('proto3') + if request.message_type.eql?('protobuf_test_messages.proto3.TestAllTypes') begin test_message = ProtobufTestMessages::Proto3::TestAllTypes.decode( request.protobuf_payload) @@ -51,7 +51,7 @@ def do_test(request) response.parse_error = err.message.encode('utf-8') return response end - elsif request.message_type.eql?('proto2') + elsif request.message_type.eql?('protobuf_test_messages.proto2.TestAllTypesProto2') response.skipped = "Ruby doesn't support proto2" return response else diff --git a/csharp/src/Google.Protobuf.Conformance/Program.cs b/csharp/src/Google.Protobuf.Conformance/Program.cs index 76b21e39..2f30036c 100644 --- a/csharp/src/Google.Protobuf.Conformance/Program.cs +++ b/csharp/src/Google.Protobuf.Conformance/Program.cs @@ -91,22 +91,21 @@ namespace Google.Protobuf.Conformance message = parser.Parse(request.JsonPayload); break; case ConformanceRequest.PayloadOneofCase.ProtobufPayload: - { - if (request.MessageType.Equals("proto3")) - { - message = ProtobufTestMessages.Proto3.TestAllTypes.Parser.ParseFrom(request.ProtobufPayload); - } - else if (request.MessageType.Equals("proto2")) - { - - return new ConformanceResponse { Skipped = "CSharp doesn't support proto2" }; - } - else - { - throw new Exception(" Protobuf request doesn't have specific payload type"); - } - break; - } + { + if (request.MessageType.Equals("protobuf_test_messages.proto3.TestAllTypes")) + { + message = ProtobufTestMessages.Proto3.TestAllTypes.Parser.ParseFrom(request.ProtobufPayload); + } + else if (request.MessageType.Equals("protobuf_test_messages.proto2.TestAllTypesProto2")) + { + return new ConformanceResponse { Skipped = "CSharp doesn't support proto2" }; + } + else + { + throw new Exception(" Protobuf request doesn't have specific payload type"); + } + break; + } default: throw new Exception("Unsupported request payload: " + request.PayloadCase); } diff --git a/src/google/protobuf/test_messages_proto2.proto b/src/google/protobuf/test_messages_proto2.proto index 0c072b0c..58fb0060 100644 --- a/src/google/protobuf/test_messages_proto2.proto +++ b/src/google/protobuf/test_messages_proto2.proto @@ -181,21 +181,21 @@ message TestAllTypesProto2 { optional int32 Field_name18__ = 418; // message_set test case. - message mset_correct { + message MessageSetCorrect { option message_set_wire_format = true; extensions 4 to max; } - message mset_correct_extension1 { - extend mset_correct { - optional mset_correct_extension1 message_set_extension = 1547769; + message MessageSetCorrectExtension1 { + extend MessageSetCorrect { + optional MessageSetCorrectExtension1 message_set_extension = 1547769; } optional string str = 25; } - message mset_correct_extension2 { - extend mset_correct { - optional mset_correct_extension1 message_set_extension = 4135312; + message MessageSetCorrectExtension2 { + extend MessageSetCorrect { + optional MessageSetCorrectExtension2 message_set_extension = 4135312; } optional int32 i = 9; } -- cgit v1.2.3 From 3adb054bbfa83530ca5a5fd54a856755fd72af83 Mon Sep 17 00:00:00 2001 From: Yilun Chong Date: Fri, 30 Jun 2017 17:22:32 -0700 Subject: add some test proto2 supported, add js proto2 supported, fixed some error --- conformance/ConformanceJava.java | 11 +- conformance/Makefile.am | 4 +- conformance/conformance_cpp.cc | 22 +- conformance/conformance_nodejs.js | 14 +- conformance/conformance_objc.m | 6 +- conformance/conformance_objc.m~ | 188 ++++ conformance/conformance_php.php | 10 +- conformance/conformance_php.php~ | 119 ++ conformance/conformance_python.py | 9 +- conformance/conformance_ruby.rb | 8 +- conformance/conformance_ruby.rb~ | 131 +++ conformance/conformance_test.cc | 197 ++-- conformance/conformance_test.h | 22 +- conformance/failure_list_cpp.txt | 75 +- conformance/failure_list_csharp.txt | 12 +- conformance/failure_list_java.txt | 74 +- conformance/failure_list_js.txt | 34 +- conformance/failure_list_php.txt | 1209 +++++++++++---------- conformance/failure_list_php_c.txt | 441 ++++---- conformance/failure_list_python.txt | 38 +- conformance/failure_list_python_cpp.txt | 74 +- conformance/failure_list_ruby.txt | 256 ++--- csharp/src/Google.Protobuf.Conformance/Program.cs | 10 +- src/google/protobuf/test_messages_proto2.proto | 2 +- src/google/protobuf/test_messages_proto3.proto | 6 +- 25 files changed, 1742 insertions(+), 1230 deletions(-) create mode 100644 conformance/conformance_objc.m~ create mode 100755 conformance/conformance_php.php~ create mode 100755 conformance/conformance_ruby.rb~ (limited to 'conformance') diff --git a/conformance/ConformanceJava.java b/conformance/ConformanceJava.java index 15aaed96..596d113a 100644 --- a/conformance/ConformanceJava.java +++ b/conformance/ConformanceJava.java @@ -5,7 +5,7 @@ import com.google.protobuf.CodedInputStream; import com.google.protobuf.conformance.Conformance; import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf_test_messages.proto3.TestMessagesProto3; -import com.google.protobuf_test_messages.proto3.TestMessagesProto3.TestAllTypes; +import com.google.protobuf_test_messages.proto3.TestMessagesProto3.TestAllTypesProto3; import com.google.protobuf_test_messages.proto2.TestMessagesProto2; import com.google.protobuf_test_messages.proto2.TestMessagesProto2.TestAllTypesProto2; import com.google.protobuf.ExtensionRegistry; @@ -205,7 +205,7 @@ class ConformanceJava { private Conformance.ConformanceResponse doTest(Conformance.ConformanceRequest request) { com.google.protobuf.AbstractMessage testMessage; - boolean isProto3 = request.getMessageType().equals("protobuf_test_messages.proto3.TestAllTypes"); + boolean isProto3 = request.getMessageType().equals("protobuf_test_messages.proto3.TestAllTypesProto3"); boolean isProto2 = request.getMessageType().equals("protobuf_test_messages.proto2.TestAllTypesProto2"); switch (request.getPayloadCase()) { @@ -214,7 +214,7 @@ class ConformanceJava { try { ExtensionRegistry extensions = ExtensionRegistry.newInstance(); TestMessagesProto3.registerAllExtensions(extensions); - testMessage = parseBinary(request.getProtobufPayload(), TestAllTypes.parser(), extensions); + testMessage = parseBinary(request.getProtobufPayload(), TestAllTypesProto3.parser(), extensions); } catch (InvalidProtocolBufferException e) { return Conformance.ConformanceResponse.newBuilder().setParseError(e.getMessage()).build(); } @@ -233,7 +233,8 @@ class ConformanceJava { } case JSON_PAYLOAD: { try { - TestMessagesProto3.TestAllTypes.Builder builder = TestMessagesProto3.TestAllTypes.newBuilder(); + TestMessagesProto3.TestAllTypesProto3.Builder builder = + TestMessagesProto3.TestAllTypesProto3.newBuilder(); JsonFormat.parser().usingTypeRegistry(typeRegistry) .merge(request.getJsonPayload(), builder); testMessage = builder.build(); @@ -301,7 +302,7 @@ class ConformanceJava { public void run() throws Exception { typeRegistry = TypeRegistry.newBuilder().add( - TestMessagesProto3.TestAllTypes.getDescriptor()).build(); + TestMessagesProto3.TestAllTypesProto3.getDescriptor()).build(); while (doTestIo()) { this.testCount++; } diff --git a/conformance/Makefile.am b/conformance/Makefile.am index 268fc7e6..58eb7f59 100644 --- a/conformance/Makefile.am +++ b/conformance/Makefile.am @@ -252,7 +252,7 @@ if USE_EXTERNAL_PROTOC # Some implementations include pre-generated versions of well-known types. protoc_middleman: $(conformance_protoc_inputs) $(conformance_proto2_protoc_inputs) $(well_known_type_protoc_inputs) google-protobuf $(PROTOC) -I$(srcdir) -I$(top_srcdir) --cpp_out=. --java_out=. --ruby_out=. --objc_out=. --python_out=. --php_out=. --js_out=import_style=commonjs,binary:. $(conformance_protoc_inputs) - $(PROTOC) -I$(srcdir) -I$(top_srcdir) --cpp_out=. --java_out=. --python_out=. $(conformance_proto2_protoc_inputs) + $(PROTOC) -I$(srcdir) -I$(top_srcdir) --cpp_out=. --java_out=. --python_out=. --js_out=import_style=commonjs,binary:. $(conformance_proto2_protoc_inputs) $(PROTOC) -I$(srcdir) -I$(top_srcdir) --cpp_out=. --java_out=. --ruby_out=. --python_out=. --php_out=. --js_out=import_style=commonjs,binary:google-protobuf $(well_known_type_protoc_inputs) ## $(PROTOC) -I$(srcdir) -I$(top_srcdir) --java_out=lite:lite $(conformance_protoc_inputs) $(well_known_type_protoc_inputs) touch protoc_middleman @@ -264,7 +264,7 @@ else # building out-of-tree. protoc_middleman: $(top_srcdir)/src/protoc$(EXEEXT) $(conformance_protoc_inputs) $(conformance_proto2_protoc_inputs) $(well_known_type_protoc_inputs) google-protobuf oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/../src/protoc$(EXEEXT) -I. -I$(top_srcdir)/src --cpp_out=$$oldpwd --java_out=$$oldpwd --ruby_out=$$oldpwd --objc_out=$$oldpwd --python_out=$$oldpwd --php_out=$$oldpwd --js_out=import_style=commonjs,binary:$$oldpwd $(conformance_protoc_inputs) ) - oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/../src/protoc$(EXEEXT) -I. -I$(top_srcdir)/src --cpp_out=$$oldpwd --java_out=$$oldpwd --python_out=$$oldpwd $(conformance_proto2_protoc_inputs) ) + oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/../src/protoc$(EXEEXT) -I. -I$(top_srcdir)/src --cpp_out=$$oldpwd --java_out=$$oldpwd --python_out=$$oldpwd --js_out=import_style=commonjs,binary:$$oldpwd $(conformance_proto2_protoc_inputs) ) oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/../src/protoc$(EXEEXT) -I. -I$(top_srcdir)/src --cpp_out=$$oldpwd --java_out=$$oldpwd --ruby_out=$$oldpwd --python_out=$$oldpwd --php_out=$$oldpwd --js_out=import_style=commonjs,binary:$$oldpwd/google-protobuf $(well_known_type_protoc_inputs) ) ## @mkdir -p lite ## oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/../src/protoc$(EXEEXT) -I. -I$(top_srcdir)/src --java_out=lite:$$oldpwd/lite $(conformance_protoc_inputs) $(well_known_type_protoc_inputs) ) diff --git a/conformance/conformance_cpp.cc b/conformance/conformance_cpp.cc index 8d204dd2..bf70309a 100644 --- a/conformance/conformance_cpp.cc +++ b/conformance/conformance_cpp.cc @@ -44,14 +44,14 @@ using conformance::ConformanceResponse; using google::protobuf::Descriptor; using google::protobuf::DescriptorPool; using google::protobuf::Message; +using google::protobuf::MessageFactory; using google::protobuf::internal::scoped_ptr; using google::protobuf::util::BinaryToJsonString; using google::protobuf::util::JsonToBinaryString; using google::protobuf::util::NewTypeResolverForDescriptorPool; using google::protobuf::util::Status; using google::protobuf::util::TypeResolver; -using protobuf_test_messages::proto3::TestAllTypes; -using protobuf_test_messages::proto2::TestAllTypesProto2; +using protobuf_test_messages::proto3::TestAllTypesProto3; using std::string; static const char kTypeUrlPrefix[] = "type.googleapis.com"; @@ -92,18 +92,12 @@ void CheckedWrite(int fd, const void *buf, size_t len) { void DoTest(const ConformanceRequest& request, ConformanceResponse* response) { Message *test_message; - bool isProto3 = - request.message_type() == "protobuf_test_messages.proto3.TestAllTypes"; - bool isJson = request.payload_case() == ConformanceRequest::kJsonPayload; - bool isProto2 = - request.message_type() == "protobuf_test_messages.proto2.TestAllTypesProto2"; - if (isJson || isProto3) { - test_message = new TestAllTypes; - } else if (isProto2) { - test_message = new TestAllTypesProto2; - } else { - GOOGLE_LOG(FATAL) << "Protobuf request doesn't have specific payload type"; + const Descriptor *descriptor = DescriptorPool::generated_pool()->FindMessageTypeByName( + request.message_type()); + if (!descriptor) { + GOOGLE_LOG(FATAL) << "No such message type: " << request.message_type(); } + test_message = MessageFactory::generated_factory()->GetPrototype(descriptor)->New(); switch (request.payload_case()) { case ConformanceRequest::kProtobufPayload: { @@ -214,7 +208,7 @@ bool DoTestIo() { int main() { type_resolver = NewTypeResolverForDescriptorPool( kTypeUrlPrefix, DescriptorPool::generated_pool()); - type_url = new string(GetTypeUrl(TestAllTypes::descriptor())); + type_url = new string(GetTypeUrl(TestAllTypesProto3::descriptor())); while (1) { if (!DoTestIo()) { fprintf(stderr, "conformance-cpp: received EOF from test runner " diff --git a/conformance/conformance_nodejs.js b/conformance/conformance_nodejs.js index 7ea392d1..5d3955f7 100755 --- a/conformance/conformance_nodejs.js +++ b/conformance/conformance_nodejs.js @@ -34,6 +34,7 @@ var conformance = require('conformance_pb'); var test_messages_proto3 = require('google/protobuf/test_messages_proto3_pb'); +var test_messages_proto2 = require('google/protobuf/test_messages_proto2_pb'); var fs = require('fs'); var testCount = 0; @@ -50,17 +51,22 @@ function doTest(request) { switch (request.getPayloadCase()) { case conformance.ConformanceRequest.PayloadCase.PROTOBUF_PAYLOAD: { - if (request.getMessageType() == "protobuf_test_messages.proto3.TestAllTypes") { + if (request.getMessageType() == "protobuf_test_messages.proto3.TestAllTypesProto3") { try { - testMessage = test_messages_proto3.TestAllTypes.deserializeBinary( + testMessage = test_messages_proto3.TestAllTypesProto3.deserializeBinary( request.getProtobufPayload()); } catch (err) { response.setParseError(err.toString()); return response; } } else if (request.getMessageType() == "protobuf_test_messages.proto2.TestAllTypesProto2"){ - response.setSkipped("NodeJS doesn\'t support proto2"); - return response; + try { + testMessage = test_messages_proto2.TestAllTypesProto2.deserializeBinary( + request.getProtobufPayload()); + } catch (err) { + response.setParseError(err.toString()); + return response; + } } else { throw "Protobuf request doesn\'t have specific payload type"; } diff --git a/conformance/conformance_objc.m b/conformance/conformance_objc.m index 8bf1d4b8..ba1c946f 100644 --- a/conformance/conformance_objc.m +++ b/conformance/conformance_objc.m @@ -63,7 +63,7 @@ static NSData *CheckedReadDataOfLength(NSFileHandle *handle, NSUInteger numBytes static ConformanceResponse *DoTest(ConformanceRequest *request) { ConformanceResponse *response = [ConformanceResponse message]; - TestAllTypes *testMessage = nil; + TestAllTypesProto3 *testMessage = nil; switch (request.payloadOneOfCase) { case ConformanceRequest_Payload_OneOfCase_GPBUnsetOneOfCase: @@ -71,9 +71,9 @@ static ConformanceResponse *DoTest(ConformanceRequest *request) { break; case ConformanceRequest_Payload_OneOfCase_ProtobufPayload: { - if ([request.messageType isEqualToString:@"protobuf_test_messages.proto3.TestAllTypes"]) { + if ([request.messageType isEqualToString:@"protobuf_test_messages.proto3.TestAllTypesProto3"]) { NSError *error = nil; - testMessage = [TestAllTypes parseFromData:request.protobufPayload + testMessage = [TestAllTypesProto3 parseFromData:request.protobufPayload error:&error]; if (!testMessage) { response.parseError = diff --git a/conformance/conformance_objc.m~ b/conformance/conformance_objc.m~ new file mode 100644 index 00000000..ba1c946f --- /dev/null +++ b/conformance/conformance_objc.m~ @@ -0,0 +1,188 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#import + +#import "Conformance.pbobjc.h" +#import "google/protobuf/TestMessagesProto3.pbobjc.h" + +static void Die(NSString *format, ...) __dead2; + +static BOOL verbose = NO; +static int32_t testCount = 0; + +static void Die(NSString *format, ...) { + va_list args; + va_start(args, format); + NSString *msg = [[NSString alloc] initWithFormat:format arguments:args]; + NSLog(@"%@", msg); + va_end(args); + [msg release]; + exit(66); +} + +static NSData *CheckedReadDataOfLength(NSFileHandle *handle, NSUInteger numBytes) { + NSData *data = [handle readDataOfLength:numBytes]; + NSUInteger dataLen = data.length; + if (dataLen == 0) { + return nil; // EOF. + } + if (dataLen != numBytes) { + Die(@"Failed to read the request length (%d), only got: %@", + numBytes, data); + } + return data; +} + +static ConformanceResponse *DoTest(ConformanceRequest *request) { + ConformanceResponse *response = [ConformanceResponse message]; + TestAllTypesProto3 *testMessage = nil; + + switch (request.payloadOneOfCase) { + case ConformanceRequest_Payload_OneOfCase_GPBUnsetOneOfCase: + Die(@"Request didn't have a payload: %@", request); + break; + + case ConformanceRequest_Payload_OneOfCase_ProtobufPayload: { + if ([request.messageType isEqualToString:@"protobuf_test_messages.proto3.TestAllTypesProto3"]) { + NSError *error = nil; + testMessage = [TestAllTypesProto3 parseFromData:request.protobufPayload + error:&error]; + if (!testMessage) { + response.parseError = + [NSString stringWithFormat:@"Parse error: %@", error]; + } + } else if ([request.messageType isEqualToString:@"protobuf_test_messages.proto2.TestAllTypesProto2"]) { + response.skipped = @"ObjC doesn't support proto2"; + break; + } else { + Die(@"Protobuf request doesn't have specific payload type"); + break; + } + break; + } + + case ConformanceRequest_Payload_OneOfCase_JsonPayload: + response.skipped = @"ObjC doesn't support parsing JSON"; + break; + } + + if (testMessage) { + switch (request.requestedOutputFormat) { + case WireFormat_GPBUnrecognizedEnumeratorValue: + case WireFormat_Unspecified: + Die(@"Unrecognized/unspecified output format: %@", request); + break; + + case WireFormat_Protobuf: + response.protobufPayload = testMessage.data; + if (!response.protobufPayload) { + response.serializeError = + [NSString stringWithFormat:@"Failed to make data from: %@", testMessage]; + } + break; + + case WireFormat_Json: + response.skipped = @"ObjC doesn't support generating JSON"; + break; + } + } + + return response; +} + +static uint32_t UInt32FromLittleEndianData(NSData *data) { + if (data.length != sizeof(uint32_t)) { + Die(@"Data not the right size for uint32_t: %@", data); + } + uint32_t value; + memcpy(&value, data.bytes, sizeof(uint32_t)); + return CFSwapInt32LittleToHost(value); +} + +static NSData *UInt32ToLittleEndianData(uint32_t num) { + uint32_t value = CFSwapInt32HostToLittle(num); + return [NSData dataWithBytes:&value length:sizeof(uint32_t)]; +} + +static BOOL DoTestIo(NSFileHandle *input, NSFileHandle *output) { + // See conformance_test_runner.cc for the wire format. + NSData *data = CheckedReadDataOfLength(input, sizeof(uint32_t)); + if (!data) { + // EOF. + return NO; + } + uint32_t numBytes = UInt32FromLittleEndianData(data); + data = CheckedReadDataOfLength(input, numBytes); + if (!data) { + Die(@"Failed to read request"); + } + + NSError *error = nil; + ConformanceRequest *request = [ConformanceRequest parseFromData:data + error:&error]; + if (!request) { + Die(@"Failed to parse the message data: %@", error); + } + + ConformanceResponse *response = DoTest(request); + if (!response) { + Die(@"Failed to make a reply from %@", request); + } + + data = response.data; + [output writeData:UInt32ToLittleEndianData((int32_t)data.length)]; + [output writeData:data]; + + if (verbose) { + NSLog(@"Request: %@", request); + NSLog(@"Response: %@", response); + } + + ++testCount; + return YES; +} + +int main(int argc, const char *argv[]) { + @autoreleasepool { + NSFileHandle *input = [[NSFileHandle fileHandleWithStandardInput] retain]; + NSFileHandle *output = [[NSFileHandle fileHandleWithStandardOutput] retain]; + + BOOL notDone = YES; + while (notDone) { + @autoreleasepool { + notDone = DoTestIo(input, output); + } + } + + NSLog(@"Received EOF from test runner after %d tests, exiting.", testCount); + } + return 0; +} diff --git a/conformance/conformance_php.php b/conformance/conformance_php.php index ca2292ad..c1bd9bed 100755 --- a/conformance/conformance_php.php +++ b/conformance/conformance_php.php @@ -23,9 +23,9 @@ require_once("Google/Protobuf/StringValue.php"); require_once("Google/Protobuf/UInt64Value.php"); require_once("Protobuf_test_messages/Proto3/ForeignMessage.php"); require_once("Protobuf_test_messages/Proto3/ForeignEnum.php"); -require_once("Protobuf_test_messages/Proto3/TestAllTypes.php"); -require_once("Protobuf_test_messages/Proto3/TestAllTypes_NestedMessage.php"); -require_once("Protobuf_test_messages/Proto3/TestAllTypes_NestedEnum.php"); +require_once("Protobuf_test_messages/Proto3/TestAllTypesProto3.php"); +require_once("Protobuf_test_messages/Proto3/TestAllTypesProto3_NestedMessage.php"); +require_once("Protobuf_test_messages/Proto3/TestAllTypesProto3_NestedEnum.php"); require_once("GPBMetadata/Conformance.php"); require_once("GPBMetadata/Google/Protobuf/Any.php"); @@ -42,10 +42,10 @@ $test_count = 0; function doTest($request) { - $test_message = new \Protobuf_test_messages\Proto3\TestAllTypes(); + $test_message = new \Protobuf_test_messages\Proto3\TestAllTypesProto3(); $response = new \Conformance\ConformanceResponse(); if ($request->getPayload() == "protobuf_payload") { - if ($request->getMessageType() == "protobuf_test_messages.proto3.TestAllTypes") { + if ($request->getMessageType() == "protobuf_test_messages.proto3.TestAllTypesProto3") { try { $test_message->mergeFromString($request->getProtobufPayload()); } catch (Exception $e) { diff --git a/conformance/conformance_php.php~ b/conformance/conformance_php.php~ new file mode 100755 index 00000000..ca2292ad --- /dev/null +++ b/conformance/conformance_php.php~ @@ -0,0 +1,119 @@ +getPayload() == "protobuf_payload") { + if ($request->getMessageType() == "protobuf_test_messages.proto3.TestAllTypes") { + try { + $test_message->mergeFromString($request->getProtobufPayload()); + } catch (Exception $e) { + $response->setParseError($e->getMessage()); + return $response; + } + } elseif ($request->getMessageType() == "protobuf_test_messages.proto2.TestAllTypesProto2") { + $response->setSkipped("PHP doesn't support proto2"); + return $response; + } else { + trigger_error("Protobuf request doesn't have specific payload type", E_USER_ERROR); + } + } elseif ($request->getPayload() == "json_payload") { + try { + $test_message->jsonDecode($request->getJsonPayload()); + } catch (Exception $e) { + $response->setParseError($e->getMessage()); + return $response; + } + } else { + trigger_error("Request didn't have payload.", E_USER_ERROR); + } + + if ($request->getRequestedOutputFormat() == WireFormat::UNSPECIFIED) { + trigger_error("Unspecified output format.", E_USER_ERROR); + } elseif ($request->getRequestedOutputFormat() == WireFormat::PROTOBUF) { + $response->setProtobufPayload($test_message->serializeToString()); + } elseif ($request->getRequestedOutputFormat() == WireFormat::JSON) { + $response->setJsonPayload($test_message->jsonEncode()); + } + + return $response; +} + +function doTestIO() +{ + $length_bytes = fread(STDIN, 4); + if (strlen($length_bytes) == 0) { + return false; # EOF + } elseif (strlen($length_bytes) != 4) { + trigger_error("I/O error", E_USER_ERROR); + } + + $length = unpack("V", $length_bytes)[1]; + $serialized_request = fread(STDIN, $length); + if (strlen($serialized_request) != $length) { + trigger_error("I/O error", E_USER_ERROR); + } + + $request = new \Conformance\ConformanceRequest(); + $request->mergeFromString($serialized_request); + + $response = doTest($request); + + $serialized_response = $response->serializeToString(); + fwrite(STDOUT, pack("V", strlen($serialized_response))); + fwrite(STDOUT, $serialized_response); + + $GLOBALS['test_count'] += 1; + + return true; +} + +while(true){ + if (!doTestIO()) { + fprintf(STDERR, + "conformance_php: received EOF from test runner " + + "after %d tests, exiting\n", $test_count); + exit; + } +} diff --git a/conformance/conformance_python.py b/conformance/conformance_python.py index 62cfce87..c5ba2467 100755 --- a/conformance/conformance_python.py +++ b/conformance/conformance_python.py @@ -38,6 +38,8 @@ See conformance.proto for more information. import struct import sys import os +from google.protobuf import descriptor +from google.protobuf import descriptor_pool from google.protobuf import json_format from google.protobuf import message from google.protobuf import test_messages_proto3_pb2 @@ -54,15 +56,16 @@ class ProtocolError(Exception): pass def do_test(request): - isProto3 = (request.message_type == "protobuf_test_messages.proto3.TestAllTypes") + isProto3 = (request.message_type == "protobuf_test_messages.proto3.TestAllTypesProto3") isJson = (request.WhichOneof('payload') == 'json_payload') isProto2 = (request.message_type == "protobuf_test_messages.proto2.TestAllTypesProto2") if (not isProto3) and (not isJson) and (not isProto2): raise ProtocolError("Protobuf request doesn't have specific payload type") - + test_message = test_messages_proto2_pb2.TestAllTypesProto2() if isProto2 else \ - test_messages_proto3_pb2.TestAllTypes() + test_messages_proto3_pb2.TestAllTypesProto3() + response = conformance_pb2.ConformanceResponse() try: diff --git a/conformance/conformance_ruby.rb b/conformance/conformance_ruby.rb index 0fd9e3f8..df63bf7c 100755 --- a/conformance/conformance_ruby.rb +++ b/conformance/conformance_ruby.rb @@ -37,15 +37,15 @@ $test_count = 0 $verbose = false def do_test(request) - test_message = ProtobufTestMessages::Proto3::TestAllTypes.new + test_message = ProtobufTestMessages::Proto3::TestAllTypesProto3.new response = Conformance::ConformanceResponse.new begin case request.payload when :protobuf_payload - if request.message_type.eql?('protobuf_test_messages.proto3.TestAllTypes') + if request.message_type.eql?('protobuf_test_messages.proto3.TestAllTypesProto3') begin - test_message = ProtobufTestMessages::Proto3::TestAllTypes.decode( + test_message = ProtobufTestMessages::Proto3::TestAllTypesProto3.decode( request.protobuf_payload) rescue Google::Protobuf::ParseError => err response.parse_error = err.message.encode('utf-8') @@ -60,7 +60,7 @@ def do_test(request) when :json_payload begin - test_message = ProtobufTestMessages::Proto3::TestAllTypes.decode_json( + test_message = ProtobufTestMessages::Proto3::TestAllTypesProto3.decode_json( request.json_payload) rescue Google::Protobuf::ParseError => err response.parse_error = err.message.encode('utf-8') diff --git a/conformance/conformance_ruby.rb~ b/conformance/conformance_ruby.rb~ new file mode 100755 index 00000000..df63bf7c --- /dev/null +++ b/conformance/conformance_ruby.rb~ @@ -0,0 +1,131 @@ +#!/usr/bin/env ruby +# +# Protocol Buffers - Google's data interchange format +# Copyright 2008 Google Inc. All rights reserved. +# https://developers.google.com/protocol-buffers/ +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +require 'conformance_pb' +require 'google/protobuf/test_messages_proto3_pb' + +$test_count = 0 +$verbose = false + +def do_test(request) + test_message = ProtobufTestMessages::Proto3::TestAllTypesProto3.new + response = Conformance::ConformanceResponse.new + + begin + case request.payload + when :protobuf_payload + if request.message_type.eql?('protobuf_test_messages.proto3.TestAllTypesProto3') + begin + test_message = ProtobufTestMessages::Proto3::TestAllTypesProto3.decode( + request.protobuf_payload) + rescue Google::Protobuf::ParseError => err + response.parse_error = err.message.encode('utf-8') + return response + end + elsif request.message_type.eql?('protobuf_test_messages.proto2.TestAllTypesProto2') + response.skipped = "Ruby doesn't support proto2" + return response + else + fail "Protobuf request doesn't have specific payload type" + end + + when :json_payload + begin + test_message = ProtobufTestMessages::Proto3::TestAllTypesProto3.decode_json( + request.json_payload) + rescue Google::Protobuf::ParseError => err + response.parse_error = err.message.encode('utf-8') + return response + end + + when nil + fail "Request didn't have payload" + end + + case request.requested_output_format + when :UNSPECIFIED + fail 'Unspecified output format' + + when :PROTOBUF + response.protobuf_payload = test_message.to_proto + + when :JSON + response.json_payload = test_message.to_json + + when nil + fail "Request didn't have requested output format" + end + rescue StandardError => err + response.runtime_error = err.message.encode('utf-8') + end + + response +end + +# Returns true if the test ran successfully, false on legitimate EOF. +# If EOF is encountered in an unexpected place, raises IOError. +def do_test_io + length_bytes = STDIN.read(4) + return false if length_bytes.nil? + + length = length_bytes.unpack('V').first + serialized_request = STDIN.read(length) + if serialized_request.nil? || serialized_request.length != length + fail IOError + end + + request = Conformance::ConformanceRequest.decode(serialized_request) + + response = do_test(request) + + serialized_response = Conformance::ConformanceResponse.encode(response) + STDOUT.write([serialized_response.length].pack('V')) + STDOUT.write(serialized_response) + STDOUT.flush + + if $verbose + STDERR.puts("conformance_ruby: request=#{request.to_json}, " \ + "response=#{response.to_json}\n") + end + + $test_count += 1 + + true +end + +loop do + unless do_test_io + STDERR.puts('conformance_ruby: received EOF from test runner ' \ + "after #{$test_count} tests, exiting") + break + end +end diff --git a/conformance/conformance_test.cc b/conformance/conformance_test.cc index 1c251e51..d7b81a5f 100644 --- a/conformance/conformance_test.cc +++ b/conformance/conformance_test.cc @@ -60,7 +60,7 @@ using google::protobuf::util::JsonToBinaryString; using google::protobuf::util::MessageDifferencer; using google::protobuf::util::NewTypeResolverForDescriptorPool; using google::protobuf::util::Status; -using protobuf_test_messages::proto3::TestAllTypes; +using protobuf_test_messages::proto3::TestAllTypesProto3; using protobuf_test_messages::proto2::TestAllTypesProto2; using std::string; @@ -168,7 +168,7 @@ const FieldDescriptor* GetFieldForType(FieldDescriptor::Type type, bool repeated, bool isProto3) { const Descriptor* d = isProto3 ? - TestAllTypes().GetDescriptor() : TestAllTypesProto2().GetDescriptor(); + TestAllTypesProto3().GetDescriptor() : TestAllTypesProto2().GetDescriptor(); for (int i = 0; i < d->field_count(); i++) { const FieldDescriptor* f = d->field(i); if (f->type() == type && f->is_repeated() == repeated) { @@ -279,7 +279,7 @@ void ConformanceTestSuite::RunValidInputTest( auto newTestMessage = [&isProto3]() { Message* newMessage; if (isProto3) { - newMessage = new TestAllTypes; + newMessage = new TestAllTypesProto3; } else { newMessage = new TestAllTypesProto2; } @@ -298,16 +298,18 @@ void ConformanceTestSuite::RunValidInputTest( case conformance::PROTOBUF: { request.set_protobuf_payload(input); if (isProto3) { - request.set_message_type("protobuf_test_messages.proto3.TestAllTypes"); + request.set_message_type("protobuf_test_messages.proto3.TestAllTypesProto3"); } else { request.set_message_type("protobuf_test_messages.proto2.TestAllTypesProto2"); } break; } - case conformance::JSON: + case conformance::JSON: { + request.set_message_type("protobuf_test_messages.proto3.TestAllTypesProto3"); request.set_json_payload(input); break; + } default: GOOGLE_LOG(FATAL) << "Unspecified input format"; @@ -402,20 +404,19 @@ void ConformanceTestSuite::RunValidInputTest( differences.c_str()); } } - -// Expect that this precise protobuf will cause a parse error. -void ConformanceTestSuite::ExpectParseFailureForProto( +void ConformanceTestSuite::ExpectParseFailureForProtoWithProtoVersion ( const string& proto, const string& test_name, ConformanceLevel level, bool isProto3) { ConformanceRequest request; ConformanceResponse response; request.set_protobuf_payload(proto); if (isProto3) { - request.set_message_type("protobuf_test_messages.proto3.TestAllTypes"); + request.set_message_type("protobuf_test_messages.proto3.TestAllTypesProto3"); } else { request.set_message_type("protobuf_test_messages.proto2.TestAllTypesProto2"); } string effective_test_name = ConformanceLevelToString(level) + + (isProto3 ? ".Proto3" : ".Proto2") + ".ProtobufInput." + test_name; // We don't expect output, but if the program erroneously accepts the protobuf @@ -433,61 +434,69 @@ void ConformanceTestSuite::ExpectParseFailureForProto( } } +// Expect that this precise protobuf will cause a parse error. +void ConformanceTestSuite::ExpectParseFailureForProto( + const string& proto, const string& test_name, ConformanceLevel level) { + ExpectParseFailureForProtoWithProtoVersion(proto, test_name, level, true); + ExpectParseFailureForProtoWithProtoVersion(proto, test_name, level, false); +} + // Expect that this protobuf will cause a parse error, even if it is followed // by valid protobuf data. We can try running this twice: once with this // data verbatim and once with this data followed by some valid data. // // TODO(haberman): implement the second of these. void ConformanceTestSuite::ExpectHardParseFailureForProto( - const string& proto, const string& test_name, ConformanceLevel level, - bool isProto3) { - return ExpectParseFailureForProto(proto, test_name, level, isProto3); + const string& proto, const string& test_name, ConformanceLevel level) { + return ExpectParseFailureForProto(proto, test_name, level); } void ConformanceTestSuite::RunValidJsonTest( const string& test_name, ConformanceLevel level, const string& input_json, const string& equivalent_text_format) { RunValidInputTest( - ConformanceLevelToString(level) + ".JsonInput." + test_name + + ConformanceLevelToString(level) + ".Proto3.JsonInput." + test_name + ".ProtobufOutput", level, input_json, conformance::JSON, equivalent_text_format, conformance::PROTOBUF, true); RunValidInputTest( - ConformanceLevelToString(level) + ".JsonInput." + test_name + + ConformanceLevelToString(level) + ".Proto3.JsonInput." + test_name + ".JsonOutput", level, input_json, conformance::JSON, equivalent_text_format, conformance::JSON, true); } void ConformanceTestSuite::RunValidJsonTestWithProtobufInput( - const string& test_name, ConformanceLevel level, const TestAllTypes& input, - const string& equivalent_text_format, bool isProto3) { + const string& test_name, ConformanceLevel level, const TestAllTypesProto3& input, + const string& equivalent_text_format) { RunValidInputTest( - ConformanceLevelToString(level) + ".ProtobufInput." + test_name + + ConformanceLevelToString(level) + ".Proto3" + ".ProtobufInput." + test_name + ".JsonOutput", level, input.SerializeAsString(), conformance::PROTOBUF, - equivalent_text_format, conformance::JSON, isProto3); + equivalent_text_format, conformance::JSON, true); } void ConformanceTestSuite::RunValidProtobufTest( const string& test_name, ConformanceLevel level, const string& input_protobuf, const string& equivalent_text_format, bool isProto3) { - string rname = ".ProtobufInput."; + string rname = ".Proto3"; if (!isProto3) { - rname = ".Protobuf2Input."; + rname = ".Proto2"; } RunValidInputTest( - ConformanceLevelToString(level) + rname + test_name + + ConformanceLevelToString(level) + rname + ".ProtobufInput." + test_name + ".ProtobufOutput", level, input_protobuf, conformance::PROTOBUF, equivalent_text_format, conformance::PROTOBUF, isProto3); - RunValidInputTest( - ConformanceLevelToString(level) + rname + test_name + - ".JsonOutput", level, input_protobuf, conformance::PROTOBUF, - equivalent_text_format, conformance::JSON, isProto3); + if (isProto3) { + RunValidInputTest( + ConformanceLevelToString(level) + rname + ".ProtobufInput." + test_name + + ".JsonOutput", level, input_protobuf, conformance::PROTOBUF, + equivalent_text_format, conformance::JSON, isProto3); + } } void ConformanceTestSuite::RunValidProtobufTestWithMessage( - const string& test_name, ConformanceLevel level, const TestAllTypes& input, + const string& test_name, ConformanceLevel level, const Message *input, const string& equivalent_text_format, bool isProto3) { - RunValidProtobufTest(test_name, level, input.SerializeAsString(), equivalent_text_format, isProto3); + RunValidProtobufTest(test_name, level, input->SerializeAsString(), equivalent_text_format, isProto3); } // According to proto3 JSON specification, JSON serializers follow more strict @@ -502,9 +511,10 @@ void ConformanceTestSuite::RunValidJsonTestWithValidator( ConformanceResponse response; request.set_json_payload(input_json); request.set_requested_output_format(conformance::JSON); + request.set_message_type("protobuf_test_messages.proto3.TestAllTypesProto3"); string effective_test_name = ConformanceLevelToString(level) + - ".JsonInput." + test_name + ".Validator"; + ".Proto3.JsonInput." + test_name + ".Validator"; RunTest(effective_test_name, request, &response); @@ -540,8 +550,9 @@ void ConformanceTestSuite::ExpectParseFailureForJson( ConformanceRequest request; ConformanceResponse response; request.set_json_payload(input_json); + request.set_message_type("protobuf_test_messages.proto3.TestAllTypesProto3"); string effective_test_name = - ConformanceLevelToString(level) + ".JsonInput." + test_name; + ConformanceLevelToString(level) + ".Proto3.JsonInput." + test_name; // We don't expect output, but if the program erroneously accepts the protobuf // we let it send its response as this. We must not leave it unspecified. @@ -560,7 +571,7 @@ void ConformanceTestSuite::ExpectParseFailureForJson( void ConformanceTestSuite::ExpectSerializeFailureForJson( const string& test_name, ConformanceLevel level, const string& text_format) { - TestAllTypes payload_message; + TestAllTypesProto3 payload_message; GOOGLE_CHECK( TextFormat::ParseFromString(text_format, &payload_message)) << "Failed to parse: " << text_format; @@ -568,7 +579,7 @@ void ConformanceTestSuite::ExpectSerializeFailureForJson( ConformanceRequest request; ConformanceResponse response; request.set_protobuf_payload(payload_message.SerializeAsString()); - request.set_message_type("protobuf_test_messages.proto3.TestAllTypes"); + request.set_message_type("protobuf_test_messages.proto3.TestAllTypesProto3"); string effective_test_name = ConformanceLevelToString(level) + "." + test_name + ".JsonOutput"; request.set_requested_output_format(conformance::JSON); @@ -606,43 +617,43 @@ void ConformanceTestSuite::TestPrematureEOFForType(FieldDescriptor::Type type) { ExpectParseFailureForProto( tag(field->number(), wire_type), - "PrematureEofBeforeKnownNonRepeatedValue" + type_name, REQUIRED, true); + "PrematureEofBeforeKnownNonRepeatedValue" + type_name, REQUIRED); ExpectParseFailureForProto( tag(rep_field->number(), wire_type), - "PrematureEofBeforeKnownRepeatedValue" + type_name, REQUIRED, true); + "PrematureEofBeforeKnownRepeatedValue" + type_name, REQUIRED); ExpectParseFailureForProto( tag(UNKNOWN_FIELD, wire_type), - "PrematureEofBeforeUnknownValue" + type_name, REQUIRED, true); + "PrematureEofBeforeUnknownValue" + type_name, REQUIRED); ExpectParseFailureForProto( cat( tag(field->number(), wire_type), incomplete ), - "PrematureEofInsideKnownNonRepeatedValue" + type_name, REQUIRED, true); + "PrematureEofInsideKnownNonRepeatedValue" + type_name, REQUIRED); ExpectParseFailureForProto( cat( tag(rep_field->number(), wire_type), incomplete ), - "PrematureEofInsideKnownRepeatedValue" + type_name, REQUIRED, true); + "PrematureEofInsideKnownRepeatedValue" + type_name, REQUIRED); ExpectParseFailureForProto( cat( tag(UNKNOWN_FIELD, wire_type), incomplete ), - "PrematureEofInsideUnknownValue" + type_name, REQUIRED, true); + "PrematureEofInsideUnknownValue" + type_name, REQUIRED); if (wire_type == WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { ExpectParseFailureForProto( cat( tag(field->number(), wire_type), varint(1) ), "PrematureEofInDelimitedDataForKnownNonRepeatedValue" + type_name, - REQUIRED, true); + REQUIRED); ExpectParseFailureForProto( cat( tag(rep_field->number(), wire_type), varint(1) ), "PrematureEofInDelimitedDataForKnownRepeatedValue" + type_name, - REQUIRED, true); + REQUIRED); // EOF in the middle of delimited data for unknown value. ExpectParseFailureForProto( cat( tag(UNKNOWN_FIELD, wire_type), varint(1) ), - "PrematureEofInDelimitedDataForUnknownValue" + type_name, REQUIRED, true); + "PrematureEofInDelimitedDataForUnknownValue" + type_name, REQUIRED); if (type == FieldDescriptor::TYPE_MESSAGE) { // Submessage ends in the middle of a value. @@ -653,7 +664,7 @@ void ConformanceTestSuite::TestPrematureEOFForType(FieldDescriptor::Type type) { cat( tag(field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), varint(incomplete_submsg.size()), incomplete_submsg ), - "PrematureEofInSubmessageValue" + type_name, REQUIRED, true); + "PrematureEofInSubmessageValue" + type_name, REQUIRED); } } else if (type != FieldDescriptor::TYPE_GROUP) { // Non-delimited, non-group: eligible for packing. @@ -662,13 +673,13 @@ void ConformanceTestSuite::TestPrematureEOFForType(FieldDescriptor::Type type) { ExpectHardParseFailureForProto( cat(tag(rep_field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), varint(incomplete.size()), incomplete), - "PrematureEofInPackedFieldValue" + type_name, REQUIRED, true); + "PrematureEofInPackedFieldValue" + type_name, REQUIRED); // EOF in the middle of packed region. ExpectParseFailureForProto( cat(tag(rep_field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED), varint(1)), - "PrematureEofInPackedField" + type_name, REQUIRED, true); + "PrematureEofInPackedField" + type_name, REQUIRED); } } @@ -758,9 +769,47 @@ void ConformanceTestSuite::TestIllegalTags() { for (int i = 0; i < 4; i++) { string name = "IllegalZeroFieldNum_Case_0"; name.back() += i; - ExpectParseFailureForProto(nullfield[i], name, REQUIRED, true); + ExpectParseFailureForProto(nullfield[i], name, REQUIRED); } } +template +void ConformanceTestSuite::TestOneofMessage (MessageType &message, + bool isProto3) { + message.set_oneof_uint32(0); + RunValidProtobufTestWithMessage( + "OneofZeroUint32", RECOMMENDED, &message, "oneof_uint32: 0", isProto3); + message.mutable_oneof_nested_message()->set_a(0); + RunValidProtobufTestWithMessage( + "OneofZeroMessage", RECOMMENDED, &message, + isProto3 ? "oneof_nested_message: {}" : "oneof_nested_message: {a: 0}", + isProto3); + message.mutable_oneof_nested_message()->set_a(1); + RunValidProtobufTestWithMessage( + "OneofZeroMessageSetTwice", RECOMMENDED, &message, + "oneof_nested_message: {a: 1}", + isProto3); + message.set_oneof_string(""); + RunValidProtobufTestWithMessage( + "OneofZeroString", RECOMMENDED, &message, "oneof_string: \"\"", isProto3); + message.set_oneof_bytes(""); + RunValidProtobufTestWithMessage( + "OneofZeroBytes", RECOMMENDED, &message, "oneof_bytes: \"\"", isProto3); + message.set_oneof_bool(false); + RunValidProtobufTestWithMessage( + "OneofZeroBool", RECOMMENDED, &message, "oneof_bool: false", isProto3); + message.set_oneof_uint64(0); + RunValidProtobufTestWithMessage( + "OneofZeroUint64", RECOMMENDED, &message, "oneof_uint64: 0", isProto3); + message.set_oneof_float(0.0f); + RunValidProtobufTestWithMessage( + "OneofZeroFloat", RECOMMENDED, &message, "oneof_float: 0", isProto3); + message.set_oneof_double(0.0); + RunValidProtobufTestWithMessage( + "OneofZeroDouble", RECOMMENDED, &message, "oneof_double: 0", isProto3); + message.set_oneof_enum(MessageType::FOO); + RunValidProtobufTestWithMessage( + "OneofZeroEnum", RECOMMENDED, &message, "oneof_enum: FOO", isProto3); +} bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, std::string* output) { @@ -773,7 +822,7 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, unexpected_succeeding_tests_.clear(); type_resolver_.reset(NewTypeResolverForDescriptorPool( kTypeUrlPrefix, DescriptorPool::generated_pool())); - type_url_ = GetTypeUrl(TestAllTypes::descriptor()); + type_url_ = GetTypeUrl(TestAllTypesProto3::descriptor()); output_ = "\nCONFORMANCE TEST BEGIN ====================================\n\n"; @@ -1369,21 +1418,21 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, "optional_float: -inf"); // Non-cannonical Nan will be correctly normalized. { - TestAllTypes message; + TestAllTypesProto3 message; // IEEE floating-point standard 32-bit quiet NaN: // 0111 1111 1xxx xxxx xxxx xxxx xxxx xxxx message.set_optional_float( WireFormatLite::DecodeFloat(0x7FA12345)); RunValidJsonTestWithProtobufInput( "FloatFieldNormalizeQuietNan", REQUIRED, message, - "optional_float: nan", true); + "optional_float: nan"); // IEEE floating-point standard 64-bit signaling NaN: // 1111 1111 1xxx xxxx xxxx xxxx xxxx xxxx message.set_optional_float( WireFormatLite::DecodeFloat(0xFFB54321)); RunValidJsonTestWithProtobufInput( "FloatFieldNormalizeSignalingNan", REQUIRED, message, - "optional_float: nan", true); + "optional_float: nan"); } // Special values must be quoted. @@ -1441,17 +1490,17 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, "optional_double: -inf"); // Non-cannonical Nan will be correctly normalized. { - TestAllTypes message; + TestAllTypesProto3 message; message.set_optional_double( WireFormatLite::DecodeDouble(0x7FFA123456789ABCLL)); RunValidJsonTestWithProtobufInput( "DoubleFieldNormalizeQuietNan", REQUIRED, message, - "optional_double: nan", true); + "optional_double: nan"); message.set_optional_double( WireFormatLite::DecodeDouble(0xFFFBCBA987654321LL)); RunValidJsonTestWithProtobufInput( "DoubleFieldNormalizeSignalingNan", REQUIRED, message, - "optional_double: nan", true); + "optional_double: nan"); } // Special values must be quoted. @@ -1571,36 +1620,10 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, "OneofFieldDuplicate", REQUIRED, R"({"oneofUint32": 1, "oneofString": "test"})"); // Ensure zero values for oneof make it out/backs. - { - TestAllTypes message; - message.set_oneof_uint32(0); - RunValidProtobufTestWithMessage( - "OneofZeroUint32", RECOMMENDED, message, "oneof_uint32: 0", true); - message.mutable_oneof_nested_message()->set_a(0); - RunValidProtobufTestWithMessage( - "OneofZeroMessage", RECOMMENDED, message, "oneof_nested_message: {}", true); - message.set_oneof_string(""); - RunValidProtobufTestWithMessage( - "OneofZeroString", RECOMMENDED, message, "oneof_string: \"\"", true); - message.set_oneof_bytes(""); - RunValidProtobufTestWithMessage( - "OneofZeroBytes", RECOMMENDED, message, "oneof_bytes: \"\"", true); - message.set_oneof_bool(false); - RunValidProtobufTestWithMessage( - "OneofZeroBool", RECOMMENDED, message, "oneof_bool: false", true); - message.set_oneof_uint64(0); - RunValidProtobufTestWithMessage( - "OneofZeroUint64", RECOMMENDED, message, "oneof_uint64: 0", true); - message.set_oneof_float(0.0f); - RunValidProtobufTestWithMessage( - "OneofZeroFloat", RECOMMENDED, message, "oneof_float: 0", true); - message.set_oneof_double(0.0); - RunValidProtobufTestWithMessage( - "OneofZeroDouble", RECOMMENDED, message, "oneof_double: 0", true); - message.set_oneof_enum(TestAllTypes::FOO); - RunValidProtobufTestWithMessage( - "OneofZeroEnum", RECOMMENDED, message, "oneof_enum: FOO", true); - } + TestAllTypesProto3 messageProto3; + TestAllTypesProto2 messageProto2; + TestOneofMessage(messageProto3, true); + TestOneofMessage(messageProto2, false); RunValidJsonTest( "OneofZeroUint32", RECOMMENDED, R"({"oneofUint32": 0})", "oneof_uint32: 0"); @@ -2242,13 +2265,13 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, "Any", REQUIRED, R"({ "optionalAny": { - "@type": "type.googleapis.com/protobuf_test_messages.proto3.TestAllTypes", + "@type": "type.googleapis.com/protobuf_test_messages.proto3.TestAllTypesProto3", "optionalInt32": 12345 } })", R"( optional_any: { - [type.googleapis.com/protobuf_test_messages.proto3.TestAllTypes] { + [type.googleapis.com/protobuf_test_messages.proto3.TestAllTypesProto3] { optional_int32: 12345 } } @@ -2259,7 +2282,7 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, "optionalAny": { "@type": "type.googleapis.com/google.protobuf.Any", "value": { - "@type": "type.googleapis.com/protobuf_test_messages.proto3.TestAllTypes", + "@type": "type.googleapis.com/protobuf_test_messages.proto3.TestAllTypesProto3", "optionalInt32": 12345 } } @@ -2267,7 +2290,7 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, R"( optional_any: { [type.googleapis.com/google.protobuf.Any] { - [type.googleapis.com/protobuf_test_messages.proto3.TestAllTypes] { + [type.googleapis.com/protobuf_test_messages.proto3.TestAllTypesProto3] { optional_int32: 12345 } } @@ -2279,12 +2302,12 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, R"({ "optionalAny": { "optionalInt32": 12345, - "@type": "type.googleapis.com/protobuf_test_messages.proto3.TestAllTypes" + "@type": "type.googleapis.com/protobuf_test_messages.proto3.TestAllTypesProto3" } })", R"( optional_any: { - [type.googleapis.com/protobuf_test_messages.proto3.TestAllTypes] { + [type.googleapis.com/protobuf_test_messages.proto3.TestAllTypesProto3] { optional_int32: 12345 } } diff --git a/conformance/conformance_test.h b/conformance/conformance_test.h index 3e3ac6eb..6eeea8b6 100644 --- a/conformance/conformance_test.h +++ b/conformance/conformance_test.h @@ -53,7 +53,7 @@ class ConformanceResponse; namespace protobuf_test_messages { namespace proto3 { -class TestAllTypes; +class TestAllTypesProto3; } // namespace proto3 } // namespace protobuf_test_messages @@ -174,16 +174,15 @@ class ConformanceTestSuite { void RunValidJsonTestWithProtobufInput( const string& test_name, ConformanceLevel level, - const protobuf_test_messages::proto3::TestAllTypes& input, - const string& equivalent_text_format, - bool isProto3); + const protobuf_test_messages::proto3::TestAllTypesProto3& input, + const string& equivalent_text_format); void RunValidProtobufTest(const string& test_name, ConformanceLevel level, const string& input_protobuf, const string& equivalent_text_format, bool isProto3); void RunValidProtobufTestWithMessage( const string& test_name, ConformanceLevel level, - const protobuf_test_messages::proto3::TestAllTypes& input, + const Message *input, const string& equivalent_text_format, bool isProto3); @@ -198,16 +197,21 @@ class ConformanceTestSuite { void ExpectSerializeFailureForJson(const string& test_name, ConformanceLevel level, const string& text_format); + void ExpectParseFailureForProtoWithProtoVersion (const string& proto, + const string& test_name, + ConformanceLevel level, + bool isProto3); void ExpectParseFailureForProto(const std::string& proto, const std::string& test_name, - ConformanceLevel level, - bool isProto3); + ConformanceLevel level); void ExpectHardParseFailureForProto(const std::string& proto, const std::string& test_name, - ConformanceLevel level, - bool isProto3); + ConformanceLevel level); void TestPrematureEOFForType(google::protobuf::FieldDescriptor::Type type); void TestIllegalTags(); + template + void TestOneofMessage (MessageType &message, + bool isProto3); void TestValidDataForType( google::protobuf::FieldDescriptor::Type, std::vector> values); diff --git a/conformance/failure_list_cpp.txt b/conformance/failure_list_cpp.txt index 8a4fa7eb..c8b0fecf 100644 --- a/conformance/failure_list_cpp.txt +++ b/conformance/failure_list_cpp.txt @@ -10,35 +10,46 @@ Recommended.FieldMaskNumbersDontRoundTrip.JsonOutput Recommended.FieldMaskPathsDontRoundTrip.JsonOutput Recommended.FieldMaskTooManyUnderscore.JsonOutput -Recommended.JsonInput.BoolFieldDoubleQuotedFalse -Recommended.JsonInput.BoolFieldDoubleQuotedTrue -Recommended.JsonInput.FieldMaskInvalidCharacter -Recommended.JsonInput.FieldNameDuplicate -Recommended.JsonInput.FieldNameDuplicateDifferentCasing1 -Recommended.JsonInput.FieldNameDuplicateDifferentCasing2 -Recommended.JsonInput.FieldNameNotQuoted -Recommended.JsonInput.MapFieldValueIsNull -Recommended.JsonInput.RepeatedFieldMessageElementIsNull -Recommended.JsonInput.RepeatedFieldPrimitiveElementIsNull -Recommended.JsonInput.RepeatedFieldTrailingComma -Recommended.JsonInput.RepeatedFieldTrailingCommaWithNewlines -Recommended.JsonInput.RepeatedFieldTrailingCommaWithSpace -Recommended.JsonInput.RepeatedFieldTrailingCommaWithSpaceCommaSpace -Recommended.JsonInput.StringFieldSingleQuoteBoth -Recommended.JsonInput.StringFieldSingleQuoteKey -Recommended.JsonInput.StringFieldSingleQuoteValue -Recommended.JsonInput.StringFieldUppercaseEscapeLetter -Recommended.JsonInput.TrailingCommaInAnObject -Recommended.JsonInput.TrailingCommaInAnObjectWithNewlines -Recommended.JsonInput.TrailingCommaInAnObjectWithSpace -Recommended.JsonInput.TrailingCommaInAnObjectWithSpaceCommaSpace -Required.ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.MESSAGE -Required.ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.MESSAGE -Required.ProtobufInput.PrematureEofInPackedField.BOOL -Required.ProtobufInput.PrematureEofInPackedField.ENUM -Required.ProtobufInput.PrematureEofInPackedField.INT32 -Required.ProtobufInput.PrematureEofInPackedField.INT64 -Required.ProtobufInput.PrematureEofInPackedField.SINT32 -Required.ProtobufInput.PrematureEofInPackedField.SINT64 -Required.ProtobufInput.PrematureEofInPackedField.UINT32 -Required.ProtobufInput.PrematureEofInPackedField.UINT64 +Recommended.Proto3.JsonInput.BoolFieldDoubleQuotedFalse +Recommended.Proto3.JsonInput.BoolFieldDoubleQuotedTrue +Recommended.Proto3.JsonInput.FieldMaskInvalidCharacter +Recommended.Proto3.JsonInput.FieldNameDuplicate +Recommended.Proto3.JsonInput.FieldNameDuplicateDifferentCasing1 +Recommended.Proto3.JsonInput.FieldNameDuplicateDifferentCasing2 +Recommended.Proto3.JsonInput.FieldNameNotQuoted +Recommended.Proto3.JsonInput.MapFieldValueIsNull +Recommended.Proto3.JsonInput.RepeatedFieldMessageElementIsNull +Recommended.Proto3.JsonInput.RepeatedFieldPrimitiveElementIsNull +Recommended.Proto3.JsonInput.RepeatedFieldTrailingComma +Recommended.Proto3.JsonInput.RepeatedFieldTrailingCommaWithNewlines +Recommended.Proto3.JsonInput.RepeatedFieldTrailingCommaWithSpace +Recommended.Proto3.JsonInput.RepeatedFieldTrailingCommaWithSpaceCommaSpace +Recommended.Proto3.JsonInput.StringFieldSingleQuoteBoth +Recommended.Proto3.JsonInput.StringFieldSingleQuoteKey +Recommended.Proto3.JsonInput.StringFieldSingleQuoteValue +Recommended.Proto3.JsonInput.StringFieldUppercaseEscapeLetter +Recommended.Proto3.JsonInput.TrailingCommaInAnObject +Recommended.Proto3.JsonInput.TrailingCommaInAnObjectWithNewlines +Recommended.Proto3.JsonInput.TrailingCommaInAnObjectWithSpace +Recommended.Proto3.JsonInput.TrailingCommaInAnObjectWithSpaceCommaSpace +Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.MESSAGE +Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.MESSAGE +Required.Proto3.ProtobufInput.PrematureEofInPackedField.BOOL +Required.Proto3.ProtobufInput.PrematureEofInPackedField.ENUM +Required.Proto3.ProtobufInput.PrematureEofInPackedField.INT32 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.INT64 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.SINT32 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.SINT64 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.UINT32 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.UINT64 +Required.Proto2.ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.MESSAGE +Required.Proto2.ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.MESSAGE +Required.Proto2.ProtobufInput.PrematureEofInPackedField.BOOL +Required.Proto2.ProtobufInput.PrematureEofInPackedField.ENUM +Required.Proto2.ProtobufInput.PrematureEofInPackedField.INT32 +Required.Proto2.ProtobufInput.PrematureEofInPackedField.INT64 +Required.Proto2.ProtobufInput.PrematureEofInPackedField.SINT32 +Required.Proto2.ProtobufInput.PrematureEofInPackedField.SINT64 +Required.Proto2.ProtobufInput.PrematureEofInPackedField.UINT32 +Required.Proto2.ProtobufInput.PrematureEofInPackedField.UINT64 + diff --git a/conformance/failure_list_csharp.txt b/conformance/failure_list_csharp.txt index 922db94c..d215235a 100644 --- a/conformance/failure_list_csharp.txt +++ b/conformance/failure_list_csharp.txt @@ -1,4 +1,8 @@ -Required.ProtobufInput.IllegalZeroFieldNum_Case_0 -Required.ProtobufInput.IllegalZeroFieldNum_Case_1 -Required.ProtobufInput.IllegalZeroFieldNum_Case_2 -Required.ProtobufInput.IllegalZeroFieldNum_Case_3 +Required.Proto3.ProtobufInput.IllegalZeroFieldNum_Case_0 +Required.Proto3.ProtobufInput.IllegalZeroFieldNum_Case_1 +Required.Proto3.ProtobufInput.IllegalZeroFieldNum_Case_2 +Required.Proto3.ProtobufInput.IllegalZeroFieldNum_Case_3 +Required.Proto2.ProtobufInput.IllegalZeroFieldNum_Case_0 +Required.Proto2.ProtobufInput.IllegalZeroFieldNum_Case_1 +Required.Proto2.ProtobufInput.IllegalZeroFieldNum_Case_2 +Required.Proto2.ProtobufInput.IllegalZeroFieldNum_Case_3 diff --git a/conformance/failure_list_java.txt b/conformance/failure_list_java.txt index 632940ef..5116c569 100644 --- a/conformance/failure_list_java.txt +++ b/conformance/failure_list_java.txt @@ -7,39 +7,41 @@ Recommended.FieldMaskNumbersDontRoundTrip.JsonOutput Recommended.FieldMaskPathsDontRoundTrip.JsonOutput Recommended.FieldMaskTooManyUnderscore.JsonOutput -Recommended.JsonInput.BoolFieldAllCapitalFalse -Recommended.JsonInput.BoolFieldAllCapitalTrue -Recommended.JsonInput.BoolFieldCamelCaseFalse -Recommended.JsonInput.BoolFieldCamelCaseTrue -Recommended.JsonInput.BoolFieldDoubleQuotedFalse -Recommended.JsonInput.BoolFieldDoubleQuotedTrue -Recommended.JsonInput.BoolMapFieldKeyNotQuoted -Recommended.JsonInput.DoubleFieldInfinityNotQuoted -Recommended.JsonInput.DoubleFieldNanNotQuoted -Recommended.JsonInput.DoubleFieldNegativeInfinityNotQuoted -Recommended.JsonInput.FieldMaskInvalidCharacter -Recommended.JsonInput.FieldNameDuplicate -Recommended.JsonInput.FieldNameNotQuoted -Recommended.JsonInput.FloatFieldInfinityNotQuoted -Recommended.JsonInput.FloatFieldNanNotQuoted -Recommended.JsonInput.FloatFieldNegativeInfinityNotQuoted -Recommended.JsonInput.Int32MapFieldKeyNotQuoted -Recommended.JsonInput.Int64MapFieldKeyNotQuoted -Recommended.JsonInput.JsonWithComments -Recommended.JsonInput.StringFieldSingleQuoteBoth -Recommended.JsonInput.StringFieldSingleQuoteKey -Recommended.JsonInput.StringFieldSingleQuoteValue -Recommended.JsonInput.StringFieldSurrogateInWrongOrder -Recommended.JsonInput.StringFieldUnpairedHighSurrogate -Recommended.JsonInput.StringFieldUnpairedLowSurrogate -Recommended.JsonInput.Uint32MapFieldKeyNotQuoted -Recommended.JsonInput.Uint64MapFieldKeyNotQuoted -Required.JsonInput.EnumFieldNotQuoted -Required.JsonInput.Int32FieldLeadingZero -Required.JsonInput.Int32FieldNegativeWithLeadingZero -Required.JsonInput.Int32FieldPlusSign -Required.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotBool -Required.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotInt -Required.JsonInput.StringFieldNotAString -Required.ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.MESSAGE -Required.ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.MESSAGE +Recommended.Proto3.JsonInput.BoolFieldAllCapitalFalse +Recommended.Proto3.JsonInput.BoolFieldAllCapitalTrue +Recommended.Proto3.JsonInput.BoolFieldCamelCaseFalse +Recommended.Proto3.JsonInput.BoolFieldCamelCaseTrue +Recommended.Proto3.JsonInput.BoolFieldDoubleQuotedFalse +Recommended.Proto3.JsonInput.BoolFieldDoubleQuotedTrue +Recommended.Proto3.JsonInput.BoolMapFieldKeyNotQuoted +Recommended.Proto3.JsonInput.DoubleFieldInfinityNotQuoted +Recommended.Proto3.JsonInput.DoubleFieldNanNotQuoted +Recommended.Proto3.JsonInput.DoubleFieldNegativeInfinityNotQuoted +Recommended.Proto3.JsonInput.FieldMaskInvalidCharacter +Recommended.Proto3.JsonInput.FieldNameDuplicate +Recommended.Proto3.JsonInput.FieldNameNotQuoted +Recommended.Proto3.JsonInput.FloatFieldInfinityNotQuoted +Recommended.Proto3.JsonInput.FloatFieldNanNotQuoted +Recommended.Proto3.JsonInput.FloatFieldNegativeInfinityNotQuoted +Recommended.Proto3.JsonInput.Int32MapFieldKeyNotQuoted +Recommended.Proto3.JsonInput.Int64MapFieldKeyNotQuoted +Recommended.Proto3.JsonInput.JsonWithComments +Recommended.Proto3.JsonInput.StringFieldSingleQuoteBoth +Recommended.Proto3.JsonInput.StringFieldSingleQuoteKey +Recommended.Proto3.JsonInput.StringFieldSingleQuoteValue +Recommended.Proto3.JsonInput.StringFieldSurrogateInWrongOrder +Recommended.Proto3.JsonInput.StringFieldUnpairedHighSurrogate +Recommended.Proto3.JsonInput.StringFieldUnpairedLowSurrogate +Recommended.Proto3.JsonInput.Uint32MapFieldKeyNotQuoted +Recommended.Proto3.JsonInput.Uint64MapFieldKeyNotQuoted +Required.Proto3.JsonInput.EnumFieldNotQuoted +Required.Proto3.JsonInput.Int32FieldLeadingZero +Required.Proto3.JsonInput.Int32FieldNegativeWithLeadingZero +Required.Proto3.JsonInput.Int32FieldPlusSign +Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotBool +Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotInt +Required.Proto3.JsonInput.StringFieldNotAString +Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.MESSAGE +Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.MESSAGE +Required.Proto2.ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.MESSAGE +Required.Proto2.ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.MESSAGE \ No newline at end of file diff --git a/conformance/failure_list_js.txt b/conformance/failure_list_js.txt index 5414a2f9..eb20f659 100644 --- a/conformance/failure_list_js.txt +++ b/conformance/failure_list_js.txt @@ -1,15 +1,19 @@ -Required.ProtobufInput.RepeatedScalarSelectsLast.INT32.ProtobufOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.UINT32.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.BOOL.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.DOUBLE.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.FIXED32.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.FIXED64.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.FLOAT.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.INT32.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.INT64.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.SFIXED32.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.SFIXED64.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.SINT32.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.SINT64.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.UINT32.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.UINT64.ProtobufOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.INT32.ProtobufOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.UINT32.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.BOOL.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.INT32.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.INT64.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.SINT32.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.SINT64.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.UINT32.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.UINT64.ProtobufOutput +Required.Proto2.ProtobufInput.RepeatedScalarSelectsLast.INT32.ProtobufOutput +Required.Proto2.ProtobufInput.RepeatedScalarSelectsLast.UINT32.ProtobufOutput +Required.Proto2.ProtobufInput.ValidDataRepeated.INT32.ProtobufOutput +Required.Proto2.ProtobufInput.ValidDataRepeated.UINT32.ProtobufOutput diff --git a/conformance/failure_list_php.txt b/conformance/failure_list_php.txt index 6dd93918..c7898bda 100644 --- a/conformance/failure_list_php.txt +++ b/conformance/failure_list_php.txt @@ -1,611 +1,612 @@ Recommended.FieldMaskNumbersDontRoundTrip.JsonOutput Recommended.FieldMaskPathsDontRoundTrip.JsonOutput Recommended.FieldMaskTooManyUnderscore.JsonOutput -Recommended.JsonInput.BoolFieldAllCapitalFalse -Recommended.JsonInput.BoolFieldAllCapitalTrue -Recommended.JsonInput.BoolFieldCamelCaseFalse -Recommended.JsonInput.BoolFieldCamelCaseTrue -Recommended.JsonInput.BoolFieldDoubleQuotedFalse -Recommended.JsonInput.BoolFieldDoubleQuotedTrue -Recommended.JsonInput.BoolFieldIntegerOne -Recommended.JsonInput.BoolFieldIntegerZero -Recommended.JsonInput.BoolMapFieldKeyNotQuoted -Recommended.JsonInput.DoubleFieldInfinityNotQuoted -Recommended.JsonInput.DoubleFieldNanNotQuoted -Recommended.JsonInput.DoubleFieldNegativeInfinityNotQuoted -Recommended.JsonInput.DurationHas3FractionalDigits.Validator -Recommended.JsonInput.DurationHas6FractionalDigits.Validator -Recommended.JsonInput.DurationHas9FractionalDigits.Validator -Recommended.JsonInput.DurationHasZeroFractionalDigit.Validator -Recommended.JsonInput.FieldMaskInvalidCharacter -Recommended.JsonInput.FieldNameDuplicate -Recommended.JsonInput.FieldNameDuplicateDifferentCasing1 -Recommended.JsonInput.FieldNameDuplicateDifferentCasing2 -Recommended.JsonInput.FieldNameNotQuoted -Recommended.JsonInput.FieldNameWithDoubleUnderscores.JsonOutput -Recommended.JsonInput.FieldNameWithDoubleUnderscores.ProtobufOutput -Recommended.JsonInput.FieldNameWithDoubleUnderscores.Validator -Recommended.JsonInput.FloatFieldInfinityNotQuoted -Recommended.JsonInput.FloatFieldNanNotQuoted -Recommended.JsonInput.FloatFieldNegativeInfinityNotQuoted -Recommended.JsonInput.Int32MapFieldKeyNotQuoted -Recommended.JsonInput.Int64FieldBeString.Validator -Recommended.JsonInput.Int64MapFieldKeyNotQuoted -Recommended.JsonInput.JsonWithComments -Recommended.JsonInput.MapFieldKeyIsNull -Recommended.JsonInput.MapFieldValueIsNull -Recommended.JsonInput.MissingCommaMultiline -Recommended.JsonInput.MissingCommaOneLine -Recommended.JsonInput.MultilineNoSpaces.JsonOutput -Recommended.JsonInput.MultilineNoSpaces.ProtobufOutput -Recommended.JsonInput.MultilineWithSpaces.JsonOutput -Recommended.JsonInput.MultilineWithSpaces.ProtobufOutput -Recommended.JsonInput.OneLineNoSpaces.JsonOutput -Recommended.JsonInput.OneLineNoSpaces.ProtobufOutput -Recommended.JsonInput.OneLineWithSpaces.JsonOutput -Recommended.JsonInput.OneLineWithSpaces.ProtobufOutput -Recommended.JsonInput.OneofZeroBool.JsonOutput -Recommended.JsonInput.OneofZeroBool.ProtobufOutput -Recommended.JsonInput.OneofZeroBytes.JsonOutput -Recommended.JsonInput.OneofZeroBytes.ProtobufOutput -Recommended.JsonInput.OneofZeroDouble.JsonOutput -Recommended.JsonInput.OneofZeroDouble.ProtobufOutput -Recommended.JsonInput.OneofZeroEnum.JsonOutput -Recommended.JsonInput.OneofZeroEnum.ProtobufOutput -Recommended.JsonInput.OneofZeroFloat.JsonOutput -Recommended.JsonInput.OneofZeroFloat.ProtobufOutput -Recommended.JsonInput.OneofZeroMessage.JsonOutput -Recommended.JsonInput.OneofZeroMessage.ProtobufOutput -Recommended.JsonInput.OneofZeroString.JsonOutput -Recommended.JsonInput.OneofZeroString.ProtobufOutput -Recommended.JsonInput.OneofZeroUint32.JsonOutput -Recommended.JsonInput.OneofZeroUint32.ProtobufOutput -Recommended.JsonInput.OneofZeroUint64.JsonOutput -Recommended.JsonInput.OneofZeroUint64.ProtobufOutput -Recommended.JsonInput.RepeatedFieldMessageElementIsNull -Recommended.JsonInput.RepeatedFieldPrimitiveElementIsNull -Recommended.JsonInput.RepeatedFieldTrailingComma -Recommended.JsonInput.RepeatedFieldTrailingCommaWithNewlines -Recommended.JsonInput.RepeatedFieldTrailingCommaWithSpace -Recommended.JsonInput.RepeatedFieldTrailingCommaWithSpaceCommaSpace -Recommended.JsonInput.StringEndsWithEscapeChar -Recommended.JsonInput.StringFieldInvalidEscape -Recommended.JsonInput.StringFieldSingleQuoteBoth -Recommended.JsonInput.StringFieldSingleQuoteKey -Recommended.JsonInput.StringFieldSingleQuoteValue -Recommended.JsonInput.StringFieldSurrogateInWrongOrder -Recommended.JsonInput.StringFieldUnpairedHighSurrogate -Recommended.JsonInput.StringFieldUnpairedLowSurrogate -Recommended.JsonInput.StringFieldUnterminatedEscape -Recommended.JsonInput.StringFieldUppercaseEscapeLetter -Recommended.JsonInput.TimestampHas3FractionalDigits.Validator -Recommended.JsonInput.TimestampHas6FractionalDigits.Validator -Recommended.JsonInput.TimestampHas9FractionalDigits.Validator -Recommended.JsonInput.TimestampHasZeroFractionalDigit.Validator -Recommended.JsonInput.TimestampZeroNormalized.Validator -Recommended.JsonInput.TrailingCommaInAnObject -Recommended.JsonInput.TrailingCommaInAnObjectWithNewlines -Recommended.JsonInput.TrailingCommaInAnObjectWithSpace -Recommended.JsonInput.TrailingCommaInAnObjectWithSpaceCommaSpace -Recommended.JsonInput.Uint32MapFieldKeyNotQuoted -Recommended.JsonInput.Uint64FieldBeString.Validator -Recommended.JsonInput.Uint64MapFieldKeyNotQuoted -Recommended.ProtobufInput.OneofZeroBool.JsonOutput -Recommended.ProtobufInput.OneofZeroBool.ProtobufOutput -Recommended.ProtobufInput.OneofZeroBytes.JsonOutput -Recommended.ProtobufInput.OneofZeroBytes.ProtobufOutput -Recommended.ProtobufInput.OneofZeroDouble.JsonOutput -Recommended.ProtobufInput.OneofZeroDouble.ProtobufOutput -Recommended.ProtobufInput.OneofZeroEnum.JsonOutput -Recommended.ProtobufInput.OneofZeroEnum.ProtobufOutput -Recommended.ProtobufInput.OneofZeroFloat.JsonOutput -Recommended.ProtobufInput.OneofZeroFloat.ProtobufOutput -Recommended.ProtobufInput.OneofZeroMessage.JsonOutput -Recommended.ProtobufInput.OneofZeroMessage.ProtobufOutput -Recommended.ProtobufInput.OneofZeroString.JsonOutput -Recommended.ProtobufInput.OneofZeroString.ProtobufOutput -Recommended.ProtobufInput.OneofZeroUint32.JsonOutput -Recommended.ProtobufInput.OneofZeroUint32.ProtobufOutput -Recommended.ProtobufInput.OneofZeroUint64.JsonOutput -Recommended.ProtobufInput.OneofZeroUint64.ProtobufOutput +Recommended.Proto3.JsonInput.BoolFieldAllCapitalFalse +Recommended.Proto3.JsonInput.BoolFieldAllCapitalTrue +Recommended.Proto3.JsonInput.BoolFieldCamelCaseFalse +Recommended.Proto3.JsonInput.BoolFieldCamelCaseTrue +Recommended.Proto3.JsonInput.BoolFieldDoubleQuotedFalse +Recommended.Proto3.JsonInput.BoolFieldDoubleQuotedTrue +Recommended.Proto3.JsonInput.BoolFieldIntegerOne +Recommended.Proto3.JsonInput.BoolFieldIntegerZero +Recommended.Proto3.JsonInput.BoolMapFieldKeyNotQuoted +Recommended.Proto3.JsonInput.DoubleFieldInfinityNotQuoted +Recommended.Proto3.JsonInput.DoubleFieldNanNotQuoted +Recommended.Proto3.JsonInput.DoubleFieldNegativeInfinityNotQuoted +Recommended.Proto3.JsonInput.DurationHas3FractionalDigits.Validator +Recommended.Proto3.JsonInput.DurationHas6FractionalDigits.Validator +Recommended.Proto3.JsonInput.DurationHas9FractionalDigits.Validator +Recommended.Proto3.JsonInput.DurationHasZeroFractionalDigit.Validator +Recommended.Proto3.JsonInput.FieldMaskInvalidCharacter +Recommended.Proto3.JsonInput.FieldNameDuplicate +Recommended.Proto3.JsonInput.FieldNameDuplicateDifferentCasing1 +Recommended.Proto3.JsonInput.FieldNameDuplicateDifferentCasing2 +Recommended.Proto3.JsonInput.FieldNameNotQuoted +Recommended.Proto3.JsonInput.FieldNameWithDoubleUnderscores.JsonOutput +Recommended.Proto3.JsonInput.FieldNameWithDoubleUnderscores.ProtobufOutput +Recommended.Proto3.JsonInput.FieldNameWithDoubleUnderscores.Validator +Recommended.Proto3.JsonInput.FloatFieldInfinityNotQuoted +Recommended.Proto3.JsonInput.FloatFieldNanNotQuoted +Recommended.Proto3.JsonInput.FloatFieldNegativeInfinityNotQuoted +Recommended.Proto3.JsonInput.Int32MapFieldKeyNotQuoted +Recommended.Proto3.JsonInput.Int64FieldBeString.Validator +Recommended.Proto3.JsonInput.Int64MapFieldKeyNotQuoted +Recommended.Proto3.JsonInput.JsonWithComments +Recommended.Proto3.JsonInput.MapFieldKeyIsNull +Recommended.Proto3.JsonInput.MapFieldValueIsNull +Recommended.Proto3.JsonInput.MissingCommaMultiline +Recommended.Proto3.JsonInput.MissingCommaOneLine +Recommended.Proto3.JsonInput.MultilineNoSpaces.JsonOutput +Recommended.Proto3.JsonInput.MultilineNoSpaces.ProtobufOutput +Recommended.Proto3.JsonInput.MultilineWithSpaces.JsonOutput +Recommended.Proto3.JsonInput.MultilineWithSpaces.ProtobufOutput +Recommended.Proto3.JsonInput.OneLineNoSpaces.JsonOutput +Recommended.Proto3.JsonInput.OneLineNoSpaces.ProtobufOutput +Recommended.Proto3.JsonInput.OneLineWithSpaces.JsonOutput +Recommended.Proto3.JsonInput.OneLineWithSpaces.ProtobufOutput +Recommended.Proto3.JsonInput.OneofZeroBool.JsonOutput +Recommended.Proto3.JsonInput.OneofZeroBool.ProtobufOutput +Recommended.Proto3.JsonInput.OneofZeroBytes.JsonOutput +Recommended.Proto3.JsonInput.OneofZeroBytes.ProtobufOutput +Recommended.Proto3.JsonInput.OneofZeroDouble.JsonOutput +Recommended.Proto3.JsonInput.OneofZeroDouble.ProtobufOutput +Recommended.Proto3.JsonInput.OneofZeroEnum.JsonOutput +Recommended.Proto3.JsonInput.OneofZeroEnum.ProtobufOutput +Recommended.Proto3.JsonInput.OneofZeroFloat.JsonOutput +Recommended.Proto3.JsonInput.OneofZeroFloat.ProtobufOutput +Recommended.Proto3.JsonInput.OneofZeroMessage.JsonOutput +Recommended.Proto3.JsonInput.OneofZeroMessage.ProtobufOutput +Recommended.Proto3.JsonInput.OneofZeroString.JsonOutput +Recommended.Proto3.JsonInput.OneofZeroString.ProtobufOutput +Recommended.Proto3.JsonInput.OneofZeroUint32.JsonOutput +Recommended.Proto3.JsonInput.OneofZeroUint32.ProtobufOutput +Recommended.Proto3.JsonInput.OneofZeroUint64.JsonOutput +Recommended.Proto3.JsonInput.OneofZeroUint64.ProtobufOutput +Recommended.Proto3.JsonInput.RepeatedFieldMessageElementIsNull +Recommended.Proto3.JsonInput.RepeatedFieldPrimitiveElementIsNull +Recommended.Proto3.JsonInput.RepeatedFieldTrailingComma +Recommended.Proto3.JsonInput.RepeatedFieldTrailingCommaWithNewlines +Recommended.Proto3.JsonInput.RepeatedFieldTrailingCommaWithSpace +Recommended.Proto3.JsonInput.RepeatedFieldTrailingCommaWithSpaceCommaSpace +Recommended.Proto3.JsonInput.StringEndsWithEscapeChar +Recommended.Proto3.JsonInput.StringFieldInvalidEscape +Recommended.Proto3.JsonInput.StringFieldSingleQuoteBoth +Recommended.Proto3.JsonInput.StringFieldSingleQuoteKey +Recommended.Proto3.JsonInput.StringFieldSingleQuoteValue +Recommended.Proto3.JsonInput.StringFieldSurrogateInWrongOrder +Recommended.Proto3.JsonInput.StringFieldUnpairedHighSurrogate +Recommended.Proto3.JsonInput.StringFieldUnpairedLowSurrogate +Recommended.Proto3.JsonInput.StringFieldUnterminatedEscape +Recommended.Proto3.JsonInput.StringFieldUppercaseEscapeLetter +Recommended.Proto3.JsonInput.TimestampHas3FractionalDigits.Validator +Recommended.Proto3.JsonInput.TimestampHas6FractionalDigits.Validator +Recommended.Proto3.JsonInput.TimestampHas9FractionalDigits.Validator +Recommended.Proto3.JsonInput.TimestampHasZeroFractionalDigit.Validator +Recommended.Proto3.JsonInput.TimestampZeroNormalized.Validator +Recommended.Proto3.JsonInput.TrailingCommaInAnObject +Recommended.Proto3.JsonInput.TrailingCommaInAnObjectWithNewlines +Recommended.Proto3.JsonInput.TrailingCommaInAnObjectWithSpace +Recommended.Proto3.JsonInput.TrailingCommaInAnObjectWithSpaceCommaSpace +Recommended.Proto3.JsonInput.Uint32MapFieldKeyNotQuoted +Recommended.Proto3.JsonInput.Uint64FieldBeString.Validator +Recommended.Proto3.JsonInput.Uint64MapFieldKeyNotQuoted +Recommended.Proto3.ProtobufInput.OneofZeroBool.JsonOutput +Recommended.Proto3.ProtobufInput.OneofZeroBool.ProtobufOutput +Recommended.Proto3.ProtobufInput.OneofZeroBytes.JsonOutput +Recommended.Proto3.ProtobufInput.OneofZeroBytes.ProtobufOutput +Recommended.Proto3.ProtobufInput.OneofZeroDouble.JsonOutput +Recommended.Proto3.ProtobufInput.OneofZeroDouble.ProtobufOutput +Recommended.Proto3.ProtobufInput.OneofZeroEnum.JsonOutput +Recommended.Proto3.ProtobufInput.OneofZeroEnum.ProtobufOutput +Recommended.Proto3.ProtobufInput.OneofZeroFloat.JsonOutput +Recommended.Proto3.ProtobufInput.OneofZeroFloat.ProtobufOutput +Recommended.Proto3.ProtobufInput.OneofZeroMessage.JsonOutput +Recommended.Proto3.ProtobufInput.OneofZeroMessage.ProtobufOutput +Recommended.Proto3.ProtobufInput.OneofZeroString.JsonOutput +Recommended.Proto3.ProtobufInput.OneofZeroString.ProtobufOutput +Recommended.Proto3.ProtobufInput.OneofZeroUint32.JsonOutput +Recommended.Proto3.ProtobufInput.OneofZeroUint32.ProtobufOutput +Recommended.Proto3.ProtobufInput.OneofZeroUint64.JsonOutput +Recommended.Proto3.ProtobufInput.OneofZeroUint64.ProtobufOutput Required.DurationProtoInputTooLarge.JsonOutput Required.DurationProtoInputTooSmall.JsonOutput -Required.JsonInput.AllFieldAcceptNull.JsonOutput -Required.JsonInput.AllFieldAcceptNull.ProtobufOutput -Required.JsonInput.Any.JsonOutput -Required.JsonInput.Any.ProtobufOutput -Required.JsonInput.AnyNested.JsonOutput -Required.JsonInput.AnyNested.ProtobufOutput -Required.JsonInput.AnyUnorderedTypeTag.JsonOutput -Required.JsonInput.AnyUnorderedTypeTag.ProtobufOutput -Required.JsonInput.AnyWithDuration.JsonOutput -Required.JsonInput.AnyWithDuration.ProtobufOutput -Required.JsonInput.AnyWithFieldMask.JsonOutput -Required.JsonInput.AnyWithFieldMask.ProtobufOutput -Required.JsonInput.AnyWithInt32ValueWrapper.JsonOutput -Required.JsonInput.AnyWithInt32ValueWrapper.ProtobufOutput -Required.JsonInput.AnyWithStruct.JsonOutput -Required.JsonInput.AnyWithStruct.ProtobufOutput -Required.JsonInput.AnyWithTimestamp.JsonOutput -Required.JsonInput.AnyWithTimestamp.ProtobufOutput -Required.JsonInput.AnyWithValueForInteger.JsonOutput -Required.JsonInput.AnyWithValueForInteger.ProtobufOutput -Required.JsonInput.AnyWithValueForJsonObject.JsonOutput -Required.JsonInput.AnyWithValueForJsonObject.ProtobufOutput -Required.JsonInput.BoolFieldFalse.JsonOutput -Required.JsonInput.BoolFieldFalse.ProtobufOutput -Required.JsonInput.BoolFieldTrue.JsonOutput -Required.JsonInput.BoolFieldTrue.ProtobufOutput -Required.JsonInput.BoolMapEscapedKey.JsonOutput -Required.JsonInput.BoolMapEscapedKey.ProtobufOutput -Required.JsonInput.BoolMapField.JsonOutput -Required.JsonInput.BoolMapField.ProtobufOutput -Required.JsonInput.BytesField.JsonOutput -Required.JsonInput.BytesField.ProtobufOutput -Required.JsonInput.BytesFieldInvalidBase64Characters -Required.JsonInput.BytesRepeatedField.JsonOutput -Required.JsonInput.BytesRepeatedField.ProtobufOutput -Required.JsonInput.DoubleFieldInfinity.JsonOutput -Required.JsonInput.DoubleFieldInfinity.ProtobufOutput -Required.JsonInput.DoubleFieldMaxNegativeValue.JsonOutput -Required.JsonInput.DoubleFieldMaxNegativeValue.ProtobufOutput -Required.JsonInput.DoubleFieldMaxPositiveValue.JsonOutput -Required.JsonInput.DoubleFieldMaxPositiveValue.ProtobufOutput -Required.JsonInput.DoubleFieldMinNegativeValue.JsonOutput -Required.JsonInput.DoubleFieldMinNegativeValue.ProtobufOutput -Required.JsonInput.DoubleFieldMinPositiveValue.JsonOutput -Required.JsonInput.DoubleFieldMinPositiveValue.ProtobufOutput -Required.JsonInput.DoubleFieldNan.JsonOutput -Required.JsonInput.DoubleFieldNan.ProtobufOutput -Required.JsonInput.DoubleFieldNegativeInfinity.JsonOutput -Required.JsonInput.DoubleFieldNegativeInfinity.ProtobufOutput -Required.JsonInput.DoubleFieldQuotedValue.JsonOutput -Required.JsonInput.DoubleFieldQuotedValue.ProtobufOutput -Required.JsonInput.DoubleFieldTooLarge -Required.JsonInput.DoubleFieldTooSmall -Required.JsonInput.DurationJsonInputTooLarge -Required.JsonInput.DurationJsonInputTooSmall -Required.JsonInput.DurationMaxValue.JsonOutput -Required.JsonInput.DurationMaxValue.ProtobufOutput -Required.JsonInput.DurationMinValue.JsonOutput -Required.JsonInput.DurationMinValue.ProtobufOutput -Required.JsonInput.DurationMissingS -Required.JsonInput.DurationRepeatedValue.JsonOutput -Required.JsonInput.DurationRepeatedValue.ProtobufOutput -Required.JsonInput.EnumField.JsonOutput -Required.JsonInput.EnumField.ProtobufOutput -Required.JsonInput.EnumFieldNotQuoted -Required.JsonInput.EnumFieldNumericValueNonZero.JsonOutput -Required.JsonInput.EnumFieldNumericValueNonZero.ProtobufOutput -Required.JsonInput.EnumFieldNumericValueZero.JsonOutput -Required.JsonInput.EnumFieldNumericValueZero.ProtobufOutput -Required.JsonInput.EnumFieldUnknownValue.Validator -Required.JsonInput.EnumRepeatedField.JsonOutput -Required.JsonInput.EnumRepeatedField.ProtobufOutput -Required.JsonInput.FieldMask.JsonOutput -Required.JsonInput.FieldMask.ProtobufOutput -Required.JsonInput.FieldNameEscaped.JsonOutput -Required.JsonInput.FieldNameEscaped.ProtobufOutput -Required.JsonInput.FieldNameInLowerCamelCase.Validator -Required.JsonInput.FieldNameInSnakeCase.JsonOutput -Required.JsonInput.FieldNameInSnakeCase.ProtobufOutput -Required.JsonInput.FieldNameWithMixedCases.JsonOutput -Required.JsonInput.FieldNameWithMixedCases.ProtobufOutput -Required.JsonInput.FieldNameWithMixedCases.Validator -Required.JsonInput.FieldNameWithNumbers.JsonOutput -Required.JsonInput.FieldNameWithNumbers.ProtobufOutput -Required.JsonInput.FieldNameWithNumbers.Validator -Required.JsonInput.FloatFieldInfinity.JsonOutput -Required.JsonInput.FloatFieldInfinity.ProtobufOutput -Required.JsonInput.FloatFieldMaxNegativeValue.JsonOutput -Required.JsonInput.FloatFieldMaxNegativeValue.ProtobufOutput -Required.JsonInput.FloatFieldMaxPositiveValue.JsonOutput -Required.JsonInput.FloatFieldMaxPositiveValue.ProtobufOutput -Required.JsonInput.FloatFieldMinNegativeValue.JsonOutput -Required.JsonInput.FloatFieldMinNegativeValue.ProtobufOutput -Required.JsonInput.FloatFieldMinPositiveValue.JsonOutput -Required.JsonInput.FloatFieldMinPositiveValue.ProtobufOutput -Required.JsonInput.FloatFieldNan.JsonOutput -Required.JsonInput.FloatFieldNan.ProtobufOutput -Required.JsonInput.FloatFieldNegativeInfinity.JsonOutput -Required.JsonInput.FloatFieldNegativeInfinity.ProtobufOutput -Required.JsonInput.FloatFieldQuotedValue.JsonOutput -Required.JsonInput.FloatFieldQuotedValue.ProtobufOutput -Required.JsonInput.FloatFieldTooLarge -Required.JsonInput.FloatFieldTooSmall -Required.JsonInput.HelloWorld.JsonOutput -Required.JsonInput.HelloWorld.ProtobufOutput -Required.JsonInput.Int32FieldExponentialFormat.JsonOutput -Required.JsonInput.Int32FieldExponentialFormat.ProtobufOutput -Required.JsonInput.Int32FieldFloatTrailingZero.JsonOutput -Required.JsonInput.Int32FieldFloatTrailingZero.ProtobufOutput -Required.JsonInput.Int32FieldLeadingSpace -Required.JsonInput.Int32FieldLeadingZero -Required.JsonInput.Int32FieldMaxFloatValue.JsonOutput -Required.JsonInput.Int32FieldMaxFloatValue.ProtobufOutput -Required.JsonInput.Int32FieldMaxValue.JsonOutput -Required.JsonInput.Int32FieldMaxValue.ProtobufOutput -Required.JsonInput.Int32FieldMinFloatValue.JsonOutput -Required.JsonInput.Int32FieldMinFloatValue.ProtobufOutput -Required.JsonInput.Int32FieldMinValue.JsonOutput -Required.JsonInput.Int32FieldMinValue.ProtobufOutput -Required.JsonInput.Int32FieldNegativeWithLeadingZero -Required.JsonInput.Int32FieldNotInteger -Required.JsonInput.Int32FieldNotNumber -Required.JsonInput.Int32FieldPlusSign -Required.JsonInput.Int32FieldStringValue.JsonOutput -Required.JsonInput.Int32FieldStringValue.ProtobufOutput -Required.JsonInput.Int32FieldStringValueEscaped.JsonOutput -Required.JsonInput.Int32FieldStringValueEscaped.ProtobufOutput -Required.JsonInput.Int32FieldTooLarge -Required.JsonInput.Int32FieldTooSmall -Required.JsonInput.Int32FieldTrailingSpace -Required.JsonInput.Int32MapEscapedKey.JsonOutput -Required.JsonInput.Int32MapEscapedKey.ProtobufOutput -Required.JsonInput.Int32MapField.JsonOutput -Required.JsonInput.Int32MapField.ProtobufOutput -Required.JsonInput.Int64FieldMaxValue.JsonOutput -Required.JsonInput.Int64FieldMaxValue.ProtobufOutput -Required.JsonInput.Int64FieldMaxValueNotQuoted.JsonOutput -Required.JsonInput.Int64FieldMaxValueNotQuoted.ProtobufOutput -Required.JsonInput.Int64FieldMinValue.JsonOutput -Required.JsonInput.Int64FieldMinValue.ProtobufOutput -Required.JsonInput.Int64FieldMinValueNotQuoted.JsonOutput -Required.JsonInput.Int64FieldMinValueNotQuoted.ProtobufOutput -Required.JsonInput.Int64FieldNotInteger -Required.JsonInput.Int64FieldNotNumber -Required.JsonInput.Int64FieldTooLarge -Required.JsonInput.Int64FieldTooSmall -Required.JsonInput.Int64MapEscapedKey.JsonOutput -Required.JsonInput.Int64MapEscapedKey.ProtobufOutput -Required.JsonInput.Int64MapField.JsonOutput -Required.JsonInput.Int64MapField.ProtobufOutput -Required.JsonInput.MessageField.JsonOutput -Required.JsonInput.MessageField.ProtobufOutput -Required.JsonInput.MessageMapField.JsonOutput -Required.JsonInput.MessageMapField.ProtobufOutput -Required.JsonInput.MessageRepeatedField.JsonOutput -Required.JsonInput.MessageRepeatedField.ProtobufOutput -Required.JsonInput.OneofFieldDuplicate -Required.JsonInput.OptionalBoolWrapper.JsonOutput -Required.JsonInput.OptionalBoolWrapper.ProtobufOutput -Required.JsonInput.OptionalBytesWrapper.JsonOutput -Required.JsonInput.OptionalBytesWrapper.ProtobufOutput -Required.JsonInput.OptionalDoubleWrapper.JsonOutput -Required.JsonInput.OptionalDoubleWrapper.ProtobufOutput -Required.JsonInput.OptionalFloatWrapper.JsonOutput -Required.JsonInput.OptionalFloatWrapper.ProtobufOutput -Required.JsonInput.OptionalInt32Wrapper.JsonOutput -Required.JsonInput.OptionalInt32Wrapper.ProtobufOutput -Required.JsonInput.OptionalInt64Wrapper.JsonOutput -Required.JsonInput.OptionalInt64Wrapper.ProtobufOutput -Required.JsonInput.OptionalStringWrapper.JsonOutput -Required.JsonInput.OptionalStringWrapper.ProtobufOutput -Required.JsonInput.OptionalUint32Wrapper.JsonOutput -Required.JsonInput.OptionalUint32Wrapper.ProtobufOutput -Required.JsonInput.OptionalUint64Wrapper.JsonOutput -Required.JsonInput.OptionalUint64Wrapper.ProtobufOutput -Required.JsonInput.OptionalWrapperTypesWithNonDefaultValue.JsonOutput -Required.JsonInput.OptionalWrapperTypesWithNonDefaultValue.ProtobufOutput -Required.JsonInput.OriginalProtoFieldName.JsonOutput -Required.JsonInput.OriginalProtoFieldName.ProtobufOutput -Required.JsonInput.PrimitiveRepeatedField.JsonOutput -Required.JsonInput.PrimitiveRepeatedField.ProtobufOutput -Required.JsonInput.RepeatedBoolWrapper.JsonOutput -Required.JsonInput.RepeatedBoolWrapper.ProtobufOutput -Required.JsonInput.RepeatedBytesWrapper.JsonOutput -Required.JsonInput.RepeatedBytesWrapper.ProtobufOutput -Required.JsonInput.RepeatedDoubleWrapper.JsonOutput -Required.JsonInput.RepeatedDoubleWrapper.ProtobufOutput -Required.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotBool -Required.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotMessage -Required.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotString -Required.JsonInput.RepeatedFieldWrongElementTypeExpectingMessagesGotBool -Required.JsonInput.RepeatedFieldWrongElementTypeExpectingMessagesGotInt -Required.JsonInput.RepeatedFieldWrongElementTypeExpectingMessagesGotString -Required.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotBool -Required.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotInt -Required.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotMessage -Required.JsonInput.RepeatedFloatWrapper.JsonOutput -Required.JsonInput.RepeatedFloatWrapper.ProtobufOutput -Required.JsonInput.RepeatedInt32Wrapper.JsonOutput -Required.JsonInput.RepeatedInt32Wrapper.ProtobufOutput -Required.JsonInput.RepeatedInt64Wrapper.JsonOutput -Required.JsonInput.RepeatedInt64Wrapper.ProtobufOutput -Required.JsonInput.RepeatedStringWrapper.JsonOutput -Required.JsonInput.RepeatedStringWrapper.ProtobufOutput -Required.JsonInput.RepeatedUint32Wrapper.JsonOutput -Required.JsonInput.RepeatedUint32Wrapper.ProtobufOutput -Required.JsonInput.RepeatedUint64Wrapper.JsonOutput -Required.JsonInput.RepeatedUint64Wrapper.ProtobufOutput -Required.JsonInput.StringField.JsonOutput -Required.JsonInput.StringField.ProtobufOutput -Required.JsonInput.StringFieldEscape.JsonOutput -Required.JsonInput.StringFieldEscape.ProtobufOutput -Required.JsonInput.StringFieldNotAString -Required.JsonInput.StringFieldSurrogatePair.JsonOutput -Required.JsonInput.StringFieldSurrogatePair.ProtobufOutput -Required.JsonInput.StringFieldUnicode.JsonOutput -Required.JsonInput.StringFieldUnicode.ProtobufOutput -Required.JsonInput.StringFieldUnicodeEscape.JsonOutput -Required.JsonInput.StringFieldUnicodeEscape.ProtobufOutput -Required.JsonInput.StringFieldUnicodeEscapeWithLowercaseHexLetters.JsonOutput -Required.JsonInput.StringFieldUnicodeEscapeWithLowercaseHexLetters.ProtobufOutput -Required.JsonInput.StringRepeatedField.JsonOutput -Required.JsonInput.StringRepeatedField.ProtobufOutput -Required.JsonInput.Struct.JsonOutput -Required.JsonInput.Struct.ProtobufOutput -Required.JsonInput.TimestampJsonInputLowercaseT -Required.JsonInput.TimestampJsonInputLowercaseZ -Required.JsonInput.TimestampJsonInputMissingT -Required.JsonInput.TimestampJsonInputMissingZ -Required.JsonInput.TimestampJsonInputTooLarge -Required.JsonInput.TimestampJsonInputTooSmall -Required.JsonInput.TimestampMaxValue.JsonOutput -Required.JsonInput.TimestampMaxValue.ProtobufOutput -Required.JsonInput.TimestampMinValue.JsonOutput -Required.JsonInput.TimestampMinValue.ProtobufOutput -Required.JsonInput.TimestampRepeatedValue.JsonOutput -Required.JsonInput.TimestampRepeatedValue.ProtobufOutput -Required.JsonInput.TimestampWithNegativeOffset.JsonOutput -Required.JsonInput.TimestampWithNegativeOffset.ProtobufOutput -Required.JsonInput.TimestampWithPositiveOffset.JsonOutput -Required.JsonInput.TimestampWithPositiveOffset.ProtobufOutput -Required.JsonInput.Uint32FieldMaxFloatValue.JsonOutput -Required.JsonInput.Uint32FieldMaxFloatValue.ProtobufOutput -Required.JsonInput.Uint32FieldMaxValue.JsonOutput -Required.JsonInput.Uint32FieldMaxValue.ProtobufOutput -Required.JsonInput.Uint32FieldNotInteger -Required.JsonInput.Uint32FieldNotNumber -Required.JsonInput.Uint32FieldTooLarge -Required.JsonInput.Uint32MapField.JsonOutput -Required.JsonInput.Uint32MapField.ProtobufOutput -Required.JsonInput.Uint64FieldMaxValue.JsonOutput -Required.JsonInput.Uint64FieldMaxValue.ProtobufOutput -Required.JsonInput.Uint64FieldMaxValueNotQuoted.JsonOutput -Required.JsonInput.Uint64FieldMaxValueNotQuoted.ProtobufOutput -Required.JsonInput.Uint64FieldNotInteger -Required.JsonInput.Uint64FieldNotNumber -Required.JsonInput.Uint64FieldTooLarge -Required.JsonInput.Uint64MapField.JsonOutput -Required.JsonInput.Uint64MapField.ProtobufOutput -Required.JsonInput.ValueAcceptBool.JsonOutput -Required.JsonInput.ValueAcceptBool.ProtobufOutput -Required.JsonInput.ValueAcceptFloat.JsonOutput -Required.JsonInput.ValueAcceptFloat.ProtobufOutput -Required.JsonInput.ValueAcceptInteger.JsonOutput -Required.JsonInput.ValueAcceptInteger.ProtobufOutput -Required.JsonInput.ValueAcceptList.JsonOutput -Required.JsonInput.ValueAcceptList.ProtobufOutput -Required.JsonInput.ValueAcceptNull.JsonOutput -Required.JsonInput.ValueAcceptNull.ProtobufOutput -Required.JsonInput.ValueAcceptObject.JsonOutput -Required.JsonInput.ValueAcceptObject.ProtobufOutput -Required.JsonInput.ValueAcceptString.JsonOutput -Required.JsonInput.ValueAcceptString.ProtobufOutput -Required.JsonInput.WrapperTypesWithNullValue.JsonOutput -Required.JsonInput.WrapperTypesWithNullValue.ProtobufOutput -Required.ProtobufInput.DoubleFieldNormalizeQuietNan.JsonOutput -Required.ProtobufInput.DoubleFieldNormalizeSignalingNan.JsonOutput -Required.ProtobufInput.FloatFieldNormalizeQuietNan.JsonOutput -Required.ProtobufInput.FloatFieldNormalizeSignalingNan.JsonOutput -Required.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.BOOL -Required.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.BYTES -Required.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.DOUBLE -Required.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.ENUM -Required.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.FIXED32 -Required.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.FIXED64 -Required.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.FLOAT -Required.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.INT32 -Required.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.INT64 -Required.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.MESSAGE -Required.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.SFIXED32 -Required.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.SFIXED64 -Required.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.SINT32 -Required.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.SINT64 -Required.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.STRING -Required.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.UINT32 -Required.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.UINT64 -Required.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.BOOL -Required.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.BYTES -Required.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.DOUBLE -Required.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.ENUM -Required.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.FIXED32 -Required.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.FIXED64 -Required.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.FLOAT -Required.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.INT32 -Required.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.INT64 -Required.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.MESSAGE -Required.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.SFIXED32 -Required.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.SFIXED64 -Required.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.SINT32 -Required.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.SINT64 -Required.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.STRING -Required.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.UINT32 -Required.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.UINT64 -Required.ProtobufInput.PrematureEofBeforeUnknownValue.BOOL -Required.ProtobufInput.PrematureEofBeforeUnknownValue.BYTES -Required.ProtobufInput.PrematureEofBeforeUnknownValue.DOUBLE -Required.ProtobufInput.PrematureEofBeforeUnknownValue.ENUM -Required.ProtobufInput.PrematureEofBeforeUnknownValue.FIXED32 -Required.ProtobufInput.PrematureEofBeforeUnknownValue.FIXED64 -Required.ProtobufInput.PrematureEofBeforeUnknownValue.FLOAT -Required.ProtobufInput.PrematureEofBeforeUnknownValue.INT32 -Required.ProtobufInput.PrematureEofBeforeUnknownValue.INT64 -Required.ProtobufInput.PrematureEofBeforeUnknownValue.MESSAGE -Required.ProtobufInput.PrematureEofBeforeUnknownValue.SFIXED32 -Required.ProtobufInput.PrematureEofBeforeUnknownValue.SFIXED64 -Required.ProtobufInput.PrematureEofBeforeUnknownValue.SINT32 -Required.ProtobufInput.PrematureEofBeforeUnknownValue.SINT64 -Required.ProtobufInput.PrematureEofBeforeUnknownValue.STRING -Required.ProtobufInput.PrematureEofBeforeUnknownValue.UINT32 -Required.ProtobufInput.PrematureEofBeforeUnknownValue.UINT64 -Required.ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.BYTES -Required.ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.MESSAGE -Required.ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.STRING -Required.ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.BYTES -Required.ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.MESSAGE -Required.ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.STRING -Required.ProtobufInput.PrematureEofInDelimitedDataForUnknownValue.BYTES -Required.ProtobufInput.PrematureEofInDelimitedDataForUnknownValue.MESSAGE -Required.ProtobufInput.PrematureEofInDelimitedDataForUnknownValue.STRING -Required.ProtobufInput.PrematureEofInPackedField.BOOL -Required.ProtobufInput.PrematureEofInPackedField.DOUBLE -Required.ProtobufInput.PrematureEofInPackedField.ENUM -Required.ProtobufInput.PrematureEofInPackedField.FIXED32 -Required.ProtobufInput.PrematureEofInPackedField.FIXED64 -Required.ProtobufInput.PrematureEofInPackedField.FLOAT -Required.ProtobufInput.PrematureEofInPackedField.INT32 -Required.ProtobufInput.PrematureEofInPackedField.INT64 -Required.ProtobufInput.PrematureEofInPackedField.SFIXED32 -Required.ProtobufInput.PrematureEofInPackedField.SFIXED64 -Required.ProtobufInput.PrematureEofInPackedField.SINT32 -Required.ProtobufInput.PrematureEofInPackedField.SINT64 -Required.ProtobufInput.PrematureEofInPackedField.UINT32 -Required.ProtobufInput.PrematureEofInPackedField.UINT64 -Required.ProtobufInput.PrematureEofInPackedFieldValue.BOOL -Required.ProtobufInput.PrematureEofInPackedFieldValue.DOUBLE -Required.ProtobufInput.PrematureEofInPackedFieldValue.ENUM -Required.ProtobufInput.PrematureEofInPackedFieldValue.FIXED32 -Required.ProtobufInput.PrematureEofInPackedFieldValue.FIXED64 -Required.ProtobufInput.PrematureEofInPackedFieldValue.FLOAT -Required.ProtobufInput.PrematureEofInPackedFieldValue.INT32 -Required.ProtobufInput.PrematureEofInPackedFieldValue.INT64 -Required.ProtobufInput.PrematureEofInPackedFieldValue.SFIXED32 -Required.ProtobufInput.PrematureEofInPackedFieldValue.SFIXED64 -Required.ProtobufInput.PrematureEofInPackedFieldValue.SINT32 -Required.ProtobufInput.PrematureEofInPackedFieldValue.SINT64 -Required.ProtobufInput.PrematureEofInPackedFieldValue.UINT32 -Required.ProtobufInput.PrematureEofInPackedFieldValue.UINT64 -Required.ProtobufInput.PrematureEofInSubmessageValue.MESSAGE -Required.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.BOOL -Required.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.BYTES -Required.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.DOUBLE -Required.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.ENUM -Required.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.FIXED32 -Required.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.FIXED64 -Required.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.FLOAT -Required.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.INT32 -Required.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.INT64 -Required.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.MESSAGE -Required.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.SFIXED32 -Required.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.SFIXED64 -Required.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.SINT32 -Required.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.SINT64 -Required.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.STRING -Required.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.UINT32 -Required.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.UINT64 -Required.ProtobufInput.PrematureEofInsideKnownRepeatedValue.BOOL -Required.ProtobufInput.PrematureEofInsideKnownRepeatedValue.BYTES -Required.ProtobufInput.PrematureEofInsideKnownRepeatedValue.DOUBLE -Required.ProtobufInput.PrematureEofInsideKnownRepeatedValue.ENUM -Required.ProtobufInput.PrematureEofInsideKnownRepeatedValue.FIXED32 -Required.ProtobufInput.PrematureEofInsideKnownRepeatedValue.FIXED64 -Required.ProtobufInput.PrematureEofInsideKnownRepeatedValue.FLOAT -Required.ProtobufInput.PrematureEofInsideKnownRepeatedValue.INT32 -Required.ProtobufInput.PrematureEofInsideKnownRepeatedValue.INT64 -Required.ProtobufInput.PrematureEofInsideKnownRepeatedValue.MESSAGE -Required.ProtobufInput.PrematureEofInsideKnownRepeatedValue.SFIXED32 -Required.ProtobufInput.PrematureEofInsideKnownRepeatedValue.SFIXED64 -Required.ProtobufInput.PrematureEofInsideKnownRepeatedValue.SINT32 -Required.ProtobufInput.PrematureEofInsideKnownRepeatedValue.SINT64 -Required.ProtobufInput.PrematureEofInsideKnownRepeatedValue.STRING -Required.ProtobufInput.PrematureEofInsideKnownRepeatedValue.UINT32 -Required.ProtobufInput.PrematureEofInsideKnownRepeatedValue.UINT64 -Required.ProtobufInput.PrematureEofInsideUnknownValue.BOOL -Required.ProtobufInput.PrematureEofInsideUnknownValue.BYTES -Required.ProtobufInput.PrematureEofInsideUnknownValue.DOUBLE -Required.ProtobufInput.PrematureEofInsideUnknownValue.ENUM -Required.ProtobufInput.PrematureEofInsideUnknownValue.FIXED32 -Required.ProtobufInput.PrematureEofInsideUnknownValue.FIXED64 -Required.ProtobufInput.PrematureEofInsideUnknownValue.FLOAT -Required.ProtobufInput.PrematureEofInsideUnknownValue.INT32 -Required.ProtobufInput.PrematureEofInsideUnknownValue.INT64 -Required.ProtobufInput.PrematureEofInsideUnknownValue.MESSAGE -Required.ProtobufInput.PrematureEofInsideUnknownValue.SFIXED32 -Required.ProtobufInput.PrematureEofInsideUnknownValue.SFIXED64 -Required.ProtobufInput.PrematureEofInsideUnknownValue.SINT32 -Required.ProtobufInput.PrematureEofInsideUnknownValue.SINT64 -Required.ProtobufInput.PrematureEofInsideUnknownValue.STRING -Required.ProtobufInput.PrematureEofInsideUnknownValue.UINT32 -Required.ProtobufInput.PrematureEofInsideUnknownValue.UINT64 -Required.ProtobufInput.RepeatedScalarSelectsLast.BOOL.JsonOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.BOOL.ProtobufOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.DOUBLE.JsonOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.DOUBLE.ProtobufOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.FIXED32.JsonOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.FIXED32.ProtobufOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.FIXED64.JsonOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.FIXED64.ProtobufOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.FLOAT.JsonOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.FLOAT.ProtobufOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.INT32.JsonOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.INT32.ProtobufOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.INT64.JsonOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.INT64.ProtobufOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.SFIXED32.JsonOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.SFIXED32.ProtobufOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.SFIXED64.JsonOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.SFIXED64.ProtobufOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.SINT32.JsonOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.SINT32.ProtobufOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.SINT64.JsonOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.SINT64.ProtobufOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.UINT32.JsonOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.UINT32.ProtobufOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.UINT64.JsonOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.UINT64.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.BOOL.JsonOutput -Required.ProtobufInput.ValidDataRepeated.BOOL.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.DOUBLE.JsonOutput -Required.ProtobufInput.ValidDataRepeated.DOUBLE.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.FIXED32.JsonOutput -Required.ProtobufInput.ValidDataRepeated.FIXED32.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.FIXED64.JsonOutput -Required.ProtobufInput.ValidDataRepeated.FIXED64.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.FLOAT.JsonOutput -Required.ProtobufInput.ValidDataRepeated.FLOAT.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.INT32.JsonOutput -Required.ProtobufInput.ValidDataRepeated.INT32.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.INT64.JsonOutput -Required.ProtobufInput.ValidDataRepeated.INT64.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.SFIXED32.JsonOutput -Required.ProtobufInput.ValidDataRepeated.SFIXED32.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.SFIXED64.JsonOutput -Required.ProtobufInput.ValidDataRepeated.SFIXED64.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.SINT32.JsonOutput -Required.ProtobufInput.ValidDataRepeated.SINT32.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.SINT64.JsonOutput -Required.ProtobufInput.ValidDataRepeated.SINT64.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.UINT32.JsonOutput -Required.ProtobufInput.ValidDataRepeated.UINT32.ProtobufOutput -Required.ProtobufInput.ValidDataRepeated.UINT64.JsonOutput -Required.ProtobufInput.ValidDataRepeated.UINT64.ProtobufOutput -Required.ProtobufInput.ValidDataScalar.BOOL.JsonOutput -Required.ProtobufInput.ValidDataScalar.BOOL.ProtobufOutput -Required.ProtobufInput.ValidDataScalar.DOUBLE.JsonOutput -Required.ProtobufInput.ValidDataScalar.DOUBLE.ProtobufOutput -Required.ProtobufInput.ValidDataScalar.FIXED32.JsonOutput -Required.ProtobufInput.ValidDataScalar.FIXED32.ProtobufOutput -Required.ProtobufInput.ValidDataScalar.FIXED64.JsonOutput -Required.ProtobufInput.ValidDataScalar.FIXED64.ProtobufOutput -Required.ProtobufInput.ValidDataScalar.FLOAT.JsonOutput -Required.ProtobufInput.ValidDataScalar.FLOAT.ProtobufOutput -Required.ProtobufInput.ValidDataScalar.INT32.JsonOutput -Required.ProtobufInput.ValidDataScalar.INT32.ProtobufOutput -Required.ProtobufInput.ValidDataScalar.INT64.JsonOutput -Required.ProtobufInput.ValidDataScalar.INT64.ProtobufOutput -Required.ProtobufInput.ValidDataScalar.SFIXED32.JsonOutput -Required.ProtobufInput.ValidDataScalar.SFIXED32.ProtobufOutput -Required.ProtobufInput.ValidDataScalar.SFIXED64.JsonOutput -Required.ProtobufInput.ValidDataScalar.SFIXED64.ProtobufOutput -Required.ProtobufInput.ValidDataScalar.SINT32.JsonOutput -Required.ProtobufInput.ValidDataScalar.SINT32.ProtobufOutput -Required.ProtobufInput.ValidDataScalar.SINT64.JsonOutput -Required.ProtobufInput.ValidDataScalar.SINT64.ProtobufOutput -Required.ProtobufInput.ValidDataScalar.UINT32.JsonOutput -Required.ProtobufInput.ValidDataScalar.UINT32.ProtobufOutput -Required.ProtobufInput.ValidDataScalar.UINT64.JsonOutput -Required.ProtobufInput.ValidDataScalar.UINT64.ProtobufOutput +Required.Proto3.JsonInput.AllFieldAcceptNull.JsonOutput +Required.Proto3.JsonInput.AllFieldAcceptNull.ProtobufOutput +Required.Proto3.JsonInput.Any.JsonOutput +Required.Proto3.JsonInput.Any.ProtobufOutput +Required.Proto3.JsonInput.AnyNested.JsonOutput +Required.Proto3.JsonInput.AnyNested.ProtobufOutput +Required.Proto3.JsonInput.AnyUnorderedTypeTag.JsonOutput +Required.Proto3.JsonInput.AnyUnorderedTypeTag.ProtobufOutput +Required.Proto3.JsonInput.AnyWithDuration.JsonOutput +Required.Proto3.JsonInput.AnyWithDuration.ProtobufOutput +Required.Proto3.JsonInput.AnyWithFieldMask.JsonOutput +Required.Proto3.JsonInput.AnyWithFieldMask.ProtobufOutput +Required.Proto3.JsonInput.AnyWithInt32ValueWrapper.JsonOutput +Required.Proto3.JsonInput.AnyWithInt32ValueWrapper.ProtobufOutput +Required.Proto3.JsonInput.AnyWithStruct.JsonOutput +Required.Proto3.JsonInput.AnyWithStruct.ProtobufOutput +Required.Proto3.JsonInput.AnyWithTimestamp.JsonOutput +Required.Proto3.JsonInput.AnyWithTimestamp.ProtobufOutput +Required.Proto3.JsonInput.AnyWithValueForInteger.JsonOutput +Required.Proto3.JsonInput.AnyWithValueForInteger.ProtobufOutput +Required.Proto3.JsonInput.AnyWithValueForJsonObject.JsonOutput +Required.Proto3.JsonInput.AnyWithValueForJsonObject.ProtobufOutput +Required.Proto3.JsonInput.BoolFieldFalse.JsonOutput +Required.Proto3.JsonInput.BoolFieldFalse.ProtobufOutput +Required.Proto3.JsonInput.BoolFieldTrue.JsonOutput +Required.Proto3.JsonInput.BoolFieldTrue.ProtobufOutput +Required.Proto3.JsonInput.BoolMapEscapedKey.JsonOutput +Required.Proto3.JsonInput.BoolMapEscapedKey.ProtobufOutput +Required.Proto3.JsonInput.BoolMapField.JsonOutput +Required.Proto3.JsonInput.BoolMapField.ProtobufOutput +Required.Proto3.JsonInput.BytesField.JsonOutput +Required.Proto3.JsonInput.BytesField.ProtobufOutput +Required.Proto3.JsonInput.BytesFieldInvalidBase64Characters +Required.Proto3.JsonInput.BytesRepeatedField.JsonOutput +Required.Proto3.JsonInput.BytesRepeatedField.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldInfinity.JsonOutput +Required.Proto3.JsonInput.DoubleFieldInfinity.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldMaxNegativeValue.JsonOutput +Required.Proto3.JsonInput.DoubleFieldMaxNegativeValue.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldMaxPositiveValue.JsonOutput +Required.Proto3.JsonInput.DoubleFieldMaxPositiveValue.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldMinNegativeValue.JsonOutput +Required.Proto3.JsonInput.DoubleFieldMinNegativeValue.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldMinPositiveValue.JsonOutput +Required.Proto3.JsonInput.DoubleFieldMinPositiveValue.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldNan.JsonOutput +Required.Proto3.JsonInput.DoubleFieldNan.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldNegativeInfinity.JsonOutput +Required.Proto3.JsonInput.DoubleFieldNegativeInfinity.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldQuotedValue.JsonOutput +Required.Proto3.JsonInput.DoubleFieldQuotedValue.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldTooLarge +Required.Proto3.JsonInput.DoubleFieldTooSmall +Required.Proto3.JsonInput.DurationJsonInputTooLarge +Required.Proto3.JsonInput.DurationJsonInputTooSmall +Required.Proto3.JsonInput.DurationMaxValue.JsonOutput +Required.Proto3.JsonInput.DurationMaxValue.ProtobufOutput +Required.Proto3.JsonInput.DurationMinValue.JsonOutput +Required.Proto3.JsonInput.DurationMinValue.ProtobufOutput +Required.Proto3.JsonInput.DurationMissingS +Required.Proto3.JsonInput.DurationRepeatedValue.JsonOutput +Required.Proto3.JsonInput.DurationRepeatedValue.ProtobufOutput +Required.Proto3.JsonInput.EnumField.JsonOutput +Required.Proto3.JsonInput.EnumField.ProtobufOutput +Required.Proto3.JsonInput.EnumFieldNotQuoted +Required.Proto3.JsonInput.EnumFieldNumericValueNonZero.JsonOutput +Required.Proto3.JsonInput.EnumFieldNumericValueNonZero.ProtobufOutput +Required.Proto3.JsonInput.EnumFieldNumericValueZero.JsonOutput +Required.Proto3.JsonInput.EnumFieldNumericValueZero.ProtobufOutput +Required.Proto3.JsonInput.EnumFieldUnknownValue.Validator +Required.Proto3.JsonInput.EnumRepeatedField.JsonOutput +Required.Proto3.JsonInput.EnumRepeatedField.ProtobufOutput +Required.Proto3.JsonInput.FieldMask.JsonOutput +Required.Proto3.JsonInput.FieldMask.ProtobufOutput +Required.Proto3.JsonInput.FieldNameEscaped.JsonOutput +Required.Proto3.JsonInput.FieldNameEscaped.ProtobufOutput +Required.Proto3.JsonInput.FieldNameInLowerCamelCase.Validator +Required.Proto3.JsonInput.FieldNameInSnakeCase.JsonOutput +Required.Proto3.JsonInput.FieldNameInSnakeCase.ProtobufOutput +Required.Proto3.JsonInput.FieldNameWithMixedCases.JsonOutput +Required.Proto3.JsonInput.FieldNameWithMixedCases.ProtobufOutput +Required.Proto3.JsonInput.FieldNameWithMixedCases.Validator +Required.Proto3.JsonInput.FieldNameWithNumbers.JsonOutput +Required.Proto3.JsonInput.FieldNameWithNumbers.ProtobufOutput +Required.Proto3.JsonInput.FieldNameWithNumbers.Validator +Required.Proto3.JsonInput.FloatFieldInfinity.JsonOutput +Required.Proto3.JsonInput.FloatFieldInfinity.ProtobufOutput +Required.Proto3.JsonInput.FloatFieldMaxNegativeValue.JsonOutput +Required.Proto3.JsonInput.FloatFieldMaxNegativeValue.ProtobufOutput +Required.Proto3.JsonInput.FloatFieldMaxPositiveValue.JsonOutput +Required.Proto3.JsonInput.FloatFieldMaxPositiveValue.ProtobufOutput +Required.Proto3.JsonInput.FloatFieldMinNegativeValue.JsonOutput +Required.Proto3.JsonInput.FloatFieldMinNegativeValue.ProtobufOutput +Required.Proto3.JsonInput.FloatFieldMinPositiveValue.JsonOutput +Required.Proto3.JsonInput.FloatFieldMinPositiveValue.ProtobufOutput +Required.Proto3.JsonInput.FloatFieldNan.JsonOutput +Required.Proto3.JsonInput.FloatFieldNan.ProtobufOutput +Required.Proto3.JsonInput.FloatFieldNegativeInfinity.JsonOutput +Required.Proto3.JsonInput.FloatFieldNegativeInfinity.ProtobufOutput +Required.Proto3.JsonInput.FloatFieldQuotedValue.JsonOutput +Required.Proto3.JsonInput.FloatFieldQuotedValue.ProtobufOutput +Required.Proto3.JsonInput.FloatFieldTooLarge +Required.Proto3.JsonInput.FloatFieldTooSmall +Required.Proto3.JsonInput.HelloWorld.JsonOutput +Required.Proto3.JsonInput.HelloWorld.ProtobufOutput +Required.Proto3.JsonInput.Int32FieldExponentialFormat.JsonOutput +Required.Proto3.JsonInput.Int32FieldExponentialFormat.ProtobufOutput +Required.Proto3.JsonInput.Int32FieldFloatTrailingZero.JsonOutput +Required.Proto3.JsonInput.Int32FieldFloatTrailingZero.ProtobufOutput +Required.Proto3.JsonInput.Int32FieldLeadingSpace +Required.Proto3.JsonInput.Int32FieldLeadingZero +Required.Proto3.JsonInput.Int32FieldMaxFloatValue.JsonOutput +Required.Proto3.JsonInput.Int32FieldMaxFloatValue.ProtobufOutput +Required.Proto3.JsonInput.Int32FieldMaxValue.JsonOutput +Required.Proto3.JsonInput.Int32FieldMaxValue.ProtobufOutput +Required.Proto3.JsonInput.Int32FieldMinFloatValue.JsonOutput +Required.Proto3.JsonInput.Int32FieldMinFloatValue.ProtobufOutput +Required.Proto3.JsonInput.Int32FieldMinValue.JsonOutput +Required.Proto3.JsonInput.Int32FieldMinValue.ProtobufOutput +Required.Proto3.JsonInput.Int32FieldNegativeWithLeadingZero +Required.Proto3.JsonInput.Int32FieldNotInteger +Required.Proto3.JsonInput.Int32FieldNotNumber +Required.Proto3.JsonInput.Int32FieldPlusSign +Required.Proto3.JsonInput.Int32FieldStringValue.JsonOutput +Required.Proto3.JsonInput.Int32FieldStringValue.ProtobufOutput +Required.Proto3.JsonInput.Int32FieldStringValueEscaped.JsonOutput +Required.Proto3.JsonInput.Int32FieldStringValueEscaped.ProtobufOutput +Required.Proto3.JsonInput.Int32FieldTooLarge +Required.Proto3.JsonInput.Int32FieldTooSmall +Required.Proto3.JsonInput.Int32FieldTrailingSpace +Required.Proto3.JsonInput.Int32MapEscapedKey.JsonOutput +Required.Proto3.JsonInput.Int32MapEscapedKey.ProtobufOutput +Required.Proto3.JsonInput.Int32MapField.JsonOutput +Required.Proto3.JsonInput.Int32MapField.ProtobufOutput +Required.Proto3.JsonInput.Int64FieldMaxValue.JsonOutput +Required.Proto3.JsonInput.Int64FieldMaxValue.ProtobufOutput +Required.Proto3.JsonInput.Int64FieldMaxValueNotQuoted.JsonOutput +Required.Proto3.JsonInput.Int64FieldMaxValueNotQuoted.ProtobufOutput +Required.Proto3.JsonInput.Int64FieldMinValue.JsonOutput +Required.Proto3.JsonInput.Int64FieldMinValue.ProtobufOutput +Required.Proto3.JsonInput.Int64FieldMinValueNotQuoted.JsonOutput +Required.Proto3.JsonInput.Int64FieldMinValueNotQuoted.ProtobufOutput +Required.Proto3.JsonInput.Int64FieldNotInteger +Required.Proto3.JsonInput.Int64FieldNotNumber +Required.Proto3.JsonInput.Int64FieldTooLarge +Required.Proto3.JsonInput.Int64FieldTooSmall +Required.Proto3.JsonInput.Int64MapEscapedKey.JsonOutput +Required.Proto3.JsonInput.Int64MapEscapedKey.ProtobufOutput +Required.Proto3.JsonInput.Int64MapField.JsonOutput +Required.Proto3.JsonInput.Int64MapField.ProtobufOutput +Required.Proto3.JsonInput.MessageField.JsonOutput +Required.Proto3.JsonInput.MessageField.ProtobufOutput +Required.Proto3.JsonInput.MessageMapField.JsonOutput +Required.Proto3.JsonInput.MessageMapField.ProtobufOutput +Required.Proto3.JsonInput.MessageRepeatedField.JsonOutput +Required.Proto3.JsonInput.MessageRepeatedField.ProtobufOutput +Required.Proto3.JsonInput.OneofFieldDuplicate +Required.Proto3.JsonInput.OptionalBoolWrapper.JsonOutput +Required.Proto3.JsonInput.OptionalBoolWrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalBytesWrapper.JsonOutput +Required.Proto3.JsonInput.OptionalBytesWrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalDoubleWrapper.JsonOutput +Required.Proto3.JsonInput.OptionalDoubleWrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalFloatWrapper.JsonOutput +Required.Proto3.JsonInput.OptionalFloatWrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalInt32Wrapper.JsonOutput +Required.Proto3.JsonInput.OptionalInt32Wrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalInt64Wrapper.JsonOutput +Required.Proto3.JsonInput.OptionalInt64Wrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalStringWrapper.JsonOutput +Required.Proto3.JsonInput.OptionalStringWrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalUint32Wrapper.JsonOutput +Required.Proto3.JsonInput.OptionalUint32Wrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalUint64Wrapper.JsonOutput +Required.Proto3.JsonInput.OptionalUint64Wrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalWrapperTypesWithNonDefaultValue.JsonOutput +Required.Proto3.JsonInput.OptionalWrapperTypesWithNonDefaultValue.ProtobufOutput +Required.Proto3.JsonInput.OriginalProtoFieldName.JsonOutput +Required.Proto3.JsonInput.OriginalProtoFieldName.ProtobufOutput +Required.Proto3.JsonInput.PrimitiveRepeatedField.JsonOutput +Required.Proto3.JsonInput.PrimitiveRepeatedField.ProtobufOutput +Required.Proto3.JsonInput.RepeatedBoolWrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedBoolWrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedBytesWrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedBytesWrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedDoubleWrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedDoubleWrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotBool +Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotMessage +Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotString +Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingMessagesGotBool +Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingMessagesGotInt +Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingMessagesGotString +Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotBool +Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotInt +Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotMessage +Required.Proto3.JsonInput.RepeatedFloatWrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedFloatWrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedInt32Wrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedInt32Wrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedInt64Wrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedInt64Wrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedStringWrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedStringWrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedUint32Wrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedUint32Wrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedUint64Wrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedUint64Wrapper.ProtobufOutput +Required.Proto3.JsonInput.StringField.JsonOutput +Required.Proto3.JsonInput.StringField.ProtobufOutput +Required.Proto3.JsonInput.StringFieldEscape.JsonOutput +Required.Proto3.JsonInput.StringFieldEscape.ProtobufOutput +Required.Proto3.JsonInput.StringFieldNotAString +Required.Proto3.JsonInput.StringFieldSurrogatePair.JsonOutput +Required.Proto3.JsonInput.StringFieldSurrogatePair.ProtobufOutput +Required.Proto3.JsonInput.StringFieldUnicode.JsonOutput +Required.Proto3.JsonInput.StringFieldUnicode.ProtobufOutput +Required.Proto3.JsonInput.StringFieldUnicodeEscape.JsonOutput +Required.Proto3.JsonInput.StringFieldUnicodeEscape.ProtobufOutput +Required.Proto3.JsonInput.StringFieldUnicodeEscapeWithLowercaseHexLetters.JsonOutput +Required.Proto3.JsonInput.StringFieldUnicodeEscapeWithLowercaseHexLetters.ProtobufOutput +Required.Proto3.JsonInput.StringRepeatedField.JsonOutput +Required.Proto3.JsonInput.StringRepeatedField.ProtobufOutput +Required.Proto3.JsonInput.Struct.JsonOutput +Required.Proto3.JsonInput.Struct.ProtobufOutput +Required.Proto3.JsonInput.TimestampJsonInputLowercaseT +Required.Proto3.JsonInput.TimestampJsonInputLowercaseZ +Required.Proto3.JsonInput.TimestampJsonInputMissingT +Required.Proto3.JsonInput.TimestampJsonInputMissingZ +Required.Proto3.JsonInput.TimestampJsonInputTooLarge +Required.Proto3.JsonInput.TimestampJsonInputTooSmall +Required.Proto3.JsonInput.TimestampMaxValue.JsonOutput +Required.Proto3.JsonInput.TimestampMaxValue.ProtobufOutput +Required.Proto3.JsonInput.TimestampMinValue.JsonOutput +Required.Proto3.JsonInput.TimestampMinValue.ProtobufOutput +Required.Proto3.JsonInput.TimestampRepeatedValue.JsonOutput +Required.Proto3.JsonInput.TimestampRepeatedValue.ProtobufOutput +Required.Proto3.JsonInput.TimestampWithNegativeOffset.JsonOutput +Required.Proto3.JsonInput.TimestampWithNegativeOffset.ProtobufOutput +Required.Proto3.JsonInput.TimestampWithPositiveOffset.JsonOutput +Required.Proto3.JsonInput.TimestampWithPositiveOffset.ProtobufOutput +Required.Proto3.JsonInput.Uint32FieldMaxFloatValue.JsonOutput +Required.Proto3.JsonInput.Uint32FieldMaxFloatValue.ProtobufOutput +Required.Proto3.JsonInput.Uint32FieldMaxValue.JsonOutput +Required.Proto3.JsonInput.Uint32FieldMaxValue.ProtobufOutput +Required.Proto3.JsonInput.Uint32FieldNotInteger +Required.Proto3.JsonInput.Uint32FieldNotNumber +Required.Proto3.JsonInput.Uint32FieldTooLarge +Required.Proto3.JsonInput.Uint32MapField.JsonOutput +Required.Proto3.JsonInput.Uint32MapField.ProtobufOutput +Required.Proto3.JsonInput.Uint64FieldMaxValue.JsonOutput +Required.Proto3.JsonInput.Uint64FieldMaxValue.ProtobufOutput +Required.Proto3.JsonInput.Uint64FieldMaxValueNotQuoted.JsonOutput +Required.Proto3.JsonInput.Uint64FieldMaxValueNotQuoted.ProtobufOutput +Required.Proto3.JsonInput.Uint64FieldNotInteger +Required.Proto3.JsonInput.Uint64FieldNotNumber +Required.Proto3.JsonInput.Uint64FieldTooLarge +Required.Proto3.JsonInput.Uint64MapField.JsonOutput +Required.Proto3.JsonInput.Uint64MapField.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptBool.JsonOutput +Required.Proto3.JsonInput.ValueAcceptBool.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptFloat.JsonOutput +Required.Proto3.JsonInput.ValueAcceptFloat.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptInteger.JsonOutput +Required.Proto3.JsonInput.ValueAcceptInteger.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptList.JsonOutput +Required.Proto3.JsonInput.ValueAcceptList.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptNull.JsonOutput +Required.Proto3.JsonInput.ValueAcceptNull.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptObject.JsonOutput +Required.Proto3.JsonInput.ValueAcceptObject.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptString.JsonOutput +Required.Proto3.JsonInput.ValueAcceptString.ProtobufOutput +Required.Proto3.JsonInput.WrapperTypesWithNullValue.JsonOutput +Required.Proto3.JsonInput.WrapperTypesWithNullValue.ProtobufOutput +Required.Proto3.ProtobufInput.DoubleFieldNormalizeQuietNan.JsonOutput +Required.Proto3.ProtobufInput.DoubleFieldNormalizeSignalingNan.JsonOutput +Required.Proto3.ProtobufInput.FloatFieldNormalizeQuietNan.JsonOutput +Required.Proto3.ProtobufInput.FloatFieldNormalizeSignalingNan.JsonOutput +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.BOOL +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.BYTES +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.DOUBLE +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.ENUM +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.FIXED32 +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.FIXED64 +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.FLOAT +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.INT32 +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.INT64 +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.MESSAGE +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.SFIXED32 +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.SFIXED64 +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.SINT32 +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.SINT64 +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.STRING +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.UINT32 +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.UINT64 +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.BOOL +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.BYTES +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.DOUBLE +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.ENUM +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.FIXED32 +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.FIXED64 +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.FLOAT +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.INT32 +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.INT64 +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.MESSAGE +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.SFIXED32 +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.SFIXED64 +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.SINT32 +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.SINT64 +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.STRING +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.UINT32 +Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.UINT64 +Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.BOOL +Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.BYTES +Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.DOUBLE +Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.ENUM +Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.FIXED32 +Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.FIXED64 +Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.FLOAT +Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.INT32 +Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.INT64 +Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.MESSAGE +Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.SFIXED32 +Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.SFIXED64 +Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.SINT32 +Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.SINT64 +Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.STRING +Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.UINT32 +Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.UINT64 +Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.BYTES +Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.MESSAGE +Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.STRING +Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.BYTES +Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.MESSAGE +Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.STRING +Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForUnknownValue.BYTES +Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForUnknownValue.MESSAGE +Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForUnknownValue.STRING +Required.Proto3.ProtobufInput.PrematureEofInPackedField.BOOL +Required.Proto3.ProtobufInput.PrematureEofInPackedField.DOUBLE +Required.Proto3.ProtobufInput.PrematureEofInPackedField.ENUM +Required.Proto3.ProtobufInput.PrematureEofInPackedField.FIXED32 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.FIXED64 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.FLOAT +Required.Proto3.ProtobufInput.PrematureEofInPackedField.INT32 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.INT64 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.SFIXED32 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.SFIXED64 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.SINT32 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.SINT64 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.UINT32 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.UINT64 +Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.BOOL +Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.DOUBLE +Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.ENUM +Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.FIXED32 +Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.FIXED64 +Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.FLOAT +Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.INT32 +Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.INT64 +Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.SFIXED32 +Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.SFIXED64 +Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.SINT32 +Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.SINT64 +Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.UINT32 +Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.UINT64 +Required.Proto3.ProtobufInput.PrematureEofInSubmessageValue.MESSAGE +Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.BOOL +Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.BYTES +Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.DOUBLE +Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.ENUM +Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.FIXED32 +Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.FIXED64 +Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.FLOAT +Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.INT32 +Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.INT64 +Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.MESSAGE +Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.SFIXED32 +Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.SFIXED64 +Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.SINT32 +Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.SINT64 +Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.STRING +Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.UINT32 +Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.UINT64 +Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.BOOL +Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.BYTES +Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.DOUBLE +Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.ENUM +Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.FIXED32 +Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.FIXED64 +Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.FLOAT +Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.INT32 +Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.INT64 +Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.MESSAGE +Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.SFIXED32 +Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.SFIXED64 +Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.SINT32 +Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.SINT64 +Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.STRING +Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.UINT32 +Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.UINT64 +Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.BOOL +Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.BYTES +Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.DOUBLE +Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.ENUM +Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.FIXED32 +Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.FIXED64 +Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.FLOAT +Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.INT32 +Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.INT64 +Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.MESSAGE +Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.SFIXED32 +Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.SFIXED64 +Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.SINT32 +Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.SINT64 +Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.STRING +Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.UINT32 +Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.UINT64 +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.BOOL.JsonOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.BOOL.ProtobufOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.DOUBLE.JsonOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.DOUBLE.ProtobufOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.FIXED32.JsonOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.FIXED32.ProtobufOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.FIXED64.JsonOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.FIXED64.ProtobufOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.FLOAT.JsonOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.FLOAT.ProtobufOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.INT32.JsonOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.INT32.ProtobufOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.INT64.JsonOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.INT64.ProtobufOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.SFIXED32.JsonOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.SFIXED32.ProtobufOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.SFIXED64.JsonOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.SFIXED64.ProtobufOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.SINT32.JsonOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.SINT32.ProtobufOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.SINT64.JsonOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.SINT64.ProtobufOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.UINT32.JsonOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.UINT32.ProtobufOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.UINT64.JsonOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.UINT64.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.BOOL.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.BOOL.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.INT32.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.INT32.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.INT64.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.INT64.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.SINT32.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.SINT32.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.SINT64.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.SINT64.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.UINT32.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.UINT32.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.UINT64.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.UINT64.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataScalar.BOOL.JsonOutput +Required.Proto3.ProtobufInput.ValidDataScalar.BOOL.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataScalar.DOUBLE.JsonOutput +Required.Proto3.ProtobufInput.ValidDataScalar.DOUBLE.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataScalar.FIXED32.JsonOutput +Required.Proto3.ProtobufInput.ValidDataScalar.FIXED32.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataScalar.FIXED64.JsonOutput +Required.Proto3.ProtobufInput.ValidDataScalar.FIXED64.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataScalar.FLOAT.JsonOutput +Required.Proto3.ProtobufInput.ValidDataScalar.FLOAT.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataScalar.INT32.JsonOutput +Required.Proto3.ProtobufInput.ValidDataScalar.INT32.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataScalar.INT64.JsonOutput +Required.Proto3.ProtobufInput.ValidDataScalar.INT64.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataScalar.SFIXED32.JsonOutput +Required.Proto3.ProtobufInput.ValidDataScalar.SFIXED32.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataScalar.SFIXED64.JsonOutput +Required.Proto3.ProtobufInput.ValidDataScalar.SFIXED64.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataScalar.SINT32.JsonOutput +Required.Proto3.ProtobufInput.ValidDataScalar.SINT32.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataScalar.SINT64.JsonOutput +Required.Proto3.ProtobufInput.ValidDataScalar.SINT64.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataScalar.UINT32.JsonOutput +Required.Proto3.ProtobufInput.ValidDataScalar.UINT32.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataScalar.UINT64.JsonOutput +Required.Proto3.ProtobufInput.ValidDataScalar.UINT64.ProtobufOutput Required.TimestampProtoInputTooLarge.JsonOutput Required.TimestampProtoInputTooSmall.JsonOutput +Recommended.Proto3.ProtobufInput.OneofZeroMessageSetTwice.JsonOutput diff --git a/conformance/failure_list_php_c.txt b/conformance/failure_list_php_c.txt index f53449f7..0fb8e949 100644 --- a/conformance/failure_list_php_c.txt +++ b/conformance/failure_list_php_c.txt @@ -1,227 +1,228 @@ Recommended.FieldMaskNumbersDontRoundTrip.JsonOutput Recommended.FieldMaskPathsDontRoundTrip.JsonOutput Recommended.FieldMaskTooManyUnderscore.JsonOutput -Recommended.JsonInput.BoolFieldIntegerOne -Recommended.JsonInput.BoolFieldIntegerZero -Recommended.JsonInput.DurationHas3FractionalDigits.Validator -Recommended.JsonInput.DurationHas6FractionalDigits.Validator -Recommended.JsonInput.DurationHas9FractionalDigits.Validator -Recommended.JsonInput.DurationHasZeroFractionalDigit.Validator -Recommended.JsonInput.Int64FieldBeString.Validator -Recommended.JsonInput.MapFieldValueIsNull -Recommended.JsonInput.OneofZeroBool.JsonOutput -Recommended.JsonInput.OneofZeroBool.ProtobufOutput -Recommended.JsonInput.OneofZeroBytes.JsonOutput -Recommended.JsonInput.OneofZeroBytes.ProtobufOutput -Recommended.JsonInput.OneofZeroDouble.JsonOutput -Recommended.JsonInput.OneofZeroDouble.ProtobufOutput -Recommended.JsonInput.OneofZeroEnum.JsonOutput -Recommended.JsonInput.OneofZeroEnum.ProtobufOutput -Recommended.JsonInput.OneofZeroFloat.JsonOutput -Recommended.JsonInput.OneofZeroFloat.ProtobufOutput -Recommended.JsonInput.OneofZeroString.JsonOutput -Recommended.JsonInput.OneofZeroString.ProtobufOutput -Recommended.JsonInput.OneofZeroUint32.JsonOutput -Recommended.JsonInput.OneofZeroUint32.ProtobufOutput -Recommended.JsonInput.OneofZeroUint64.JsonOutput -Recommended.JsonInput.OneofZeroUint64.ProtobufOutput -Recommended.JsonInput.RepeatedFieldMessageElementIsNull -Recommended.JsonInput.RepeatedFieldPrimitiveElementIsNull -Recommended.JsonInput.StringEndsWithEscapeChar -Recommended.JsonInput.StringFieldSurrogateInWrongOrder -Recommended.JsonInput.StringFieldUnpairedHighSurrogate -Recommended.JsonInput.StringFieldUnpairedLowSurrogate -Recommended.JsonInput.TimestampHas3FractionalDigits.Validator -Recommended.JsonInput.TimestampHas6FractionalDigits.Validator -Recommended.JsonInput.TimestampHas9FractionalDigits.Validator -Recommended.JsonInput.TimestampHasZeroFractionalDigit.Validator -Recommended.JsonInput.TimestampZeroNormalized.Validator -Recommended.JsonInput.Uint64FieldBeString.Validator -Recommended.ProtobufInput.OneofZeroBool.JsonOutput -Recommended.ProtobufInput.OneofZeroBool.ProtobufOutput -Recommended.ProtobufInput.OneofZeroBytes.JsonOutput -Recommended.ProtobufInput.OneofZeroBytes.ProtobufOutput -Recommended.ProtobufInput.OneofZeroDouble.JsonOutput -Recommended.ProtobufInput.OneofZeroDouble.ProtobufOutput -Recommended.ProtobufInput.OneofZeroEnum.JsonOutput -Recommended.ProtobufInput.OneofZeroEnum.ProtobufOutput -Recommended.ProtobufInput.OneofZeroFloat.JsonOutput -Recommended.ProtobufInput.OneofZeroFloat.ProtobufOutput -Recommended.ProtobufInput.OneofZeroString.JsonOutput -Recommended.ProtobufInput.OneofZeroString.ProtobufOutput -Recommended.ProtobufInput.OneofZeroUint32.JsonOutput -Recommended.ProtobufInput.OneofZeroUint32.ProtobufOutput -Recommended.ProtobufInput.OneofZeroUint64.JsonOutput -Recommended.ProtobufInput.OneofZeroUint64.ProtobufOutput +Recommended.Proto3.JsonInput.BoolFieldIntegerOne +Recommended.Proto3.JsonInput.BoolFieldIntegerZero +Recommended.Proto3.JsonInput.DurationHas3FractionalDigits.Validator +Recommended.Proto3.JsonInput.DurationHas6FractionalDigits.Validator +Recommended.Proto3.JsonInput.DurationHas9FractionalDigits.Validator +Recommended.Proto3.JsonInput.DurationHasZeroFractionalDigit.Validator +Recommended.Proto3.JsonInput.Int64FieldBeString.Validator +Recommended.Proto3.JsonInput.MapFieldValueIsNull +Recommended.Proto3.JsonInput.OneofZeroBool.JsonOutput +Recommended.Proto3.JsonInput.OneofZeroBool.ProtobufOutput +Recommended.Proto3.JsonInput.OneofZeroBytes.JsonOutput +Recommended.Proto3.JsonInput.OneofZeroBytes.ProtobufOutput +Recommended.Proto3.JsonInput.OneofZeroDouble.JsonOutput +Recommended.Proto3.JsonInput.OneofZeroDouble.ProtobufOutput +Recommended.Proto3.JsonInput.OneofZeroEnum.JsonOutput +Recommended.Proto3.JsonInput.OneofZeroEnum.ProtobufOutput +Recommended.Proto3.JsonInput.OneofZeroFloat.JsonOutput +Recommended.Proto3.JsonInput.OneofZeroFloat.ProtobufOutput +Recommended.Proto3.JsonInput.OneofZeroString.JsonOutput +Recommended.Proto3.JsonInput.OneofZeroString.ProtobufOutput +Recommended.Proto3.JsonInput.OneofZeroUint32.JsonOutput +Recommended.Proto3.JsonInput.OneofZeroUint32.ProtobufOutput +Recommended.Proto3.JsonInput.OneofZeroUint64.JsonOutput +Recommended.Proto3.JsonInput.OneofZeroUint64.ProtobufOutput +Recommended.Proto3.JsonInput.RepeatedFieldMessageElementIsNull +Recommended.Proto3.JsonInput.RepeatedFieldPrimitiveElementIsNull +Recommended.Proto3.JsonInput.StringEndsWithEscapeChar +Recommended.Proto3.JsonInput.StringFieldSurrogateInWrongOrder +Recommended.Proto3.JsonInput.StringFieldUnpairedHighSurrogate +Recommended.Proto3.JsonInput.StringFieldUnpairedLowSurrogate +Recommended.Proto3.JsonInput.TimestampHas3FractionalDigits.Validator +Recommended.Proto3.JsonInput.TimestampHas6FractionalDigits.Validator +Recommended.Proto3.JsonInput.TimestampHas9FractionalDigits.Validator +Recommended.Proto3.JsonInput.TimestampHasZeroFractionalDigit.Validator +Recommended.Proto3.JsonInput.TimestampZeroNormalized.Validator +Recommended.Proto3.JsonInput.Uint64FieldBeString.Validator +Recommended.Proto3.ProtobufInput.OneofZeroBool.JsonOutput +Recommended.Proto3.ProtobufInput.OneofZeroBool.ProtobufOutput +Recommended.Proto3.ProtobufInput.OneofZeroBytes.JsonOutput +Recommended.Proto3.ProtobufInput.OneofZeroBytes.ProtobufOutput +Recommended.Proto3.ProtobufInput.OneofZeroDouble.JsonOutput +Recommended.Proto3.ProtobufInput.OneofZeroDouble.ProtobufOutput +Recommended.Proto3.ProtobufInput.OneofZeroEnum.JsonOutput +Recommended.Proto3.ProtobufInput.OneofZeroEnum.ProtobufOutput +Recommended.Proto3.ProtobufInput.OneofZeroFloat.JsonOutput +Recommended.Proto3.ProtobufInput.OneofZeroFloat.ProtobufOutput +Recommended.Proto3.ProtobufInput.OneofZeroString.JsonOutput +Recommended.Proto3.ProtobufInput.OneofZeroString.ProtobufOutput +Recommended.Proto3.ProtobufInput.OneofZeroUint32.JsonOutput +Recommended.Proto3.ProtobufInput.OneofZeroUint32.ProtobufOutput +Recommended.Proto3.ProtobufInput.OneofZeroUint64.JsonOutput +Recommended.Proto3.ProtobufInput.OneofZeroUint64.ProtobufOutput Required.DurationProtoInputTooLarge.JsonOutput Required.DurationProtoInputTooSmall.JsonOutput -Required.JsonInput.AllFieldAcceptNull.ProtobufOutput -Required.JsonInput.Any.JsonOutput -Required.JsonInput.Any.ProtobufOutput -Required.JsonInput.AnyNested.JsonOutput -Required.JsonInput.AnyNested.ProtobufOutput -Required.JsonInput.AnyUnorderedTypeTag.JsonOutput -Required.JsonInput.AnyUnorderedTypeTag.ProtobufOutput -Required.JsonInput.AnyWithDuration.JsonOutput -Required.JsonInput.AnyWithDuration.ProtobufOutput -Required.JsonInput.AnyWithFieldMask.JsonOutput -Required.JsonInput.AnyWithFieldMask.ProtobufOutput -Required.JsonInput.AnyWithInt32ValueWrapper.JsonOutput -Required.JsonInput.AnyWithInt32ValueWrapper.ProtobufOutput -Required.JsonInput.AnyWithStruct.JsonOutput -Required.JsonInput.AnyWithStruct.ProtobufOutput -Required.JsonInput.AnyWithTimestamp.JsonOutput -Required.JsonInput.AnyWithTimestamp.ProtobufOutput -Required.JsonInput.AnyWithValueForInteger.JsonOutput -Required.JsonInput.AnyWithValueForInteger.ProtobufOutput -Required.JsonInput.AnyWithValueForJsonObject.JsonOutput -Required.JsonInput.AnyWithValueForJsonObject.ProtobufOutput -Required.JsonInput.BoolFieldFalse.ProtobufOutput -Required.JsonInput.BoolMapField.JsonOutput -Required.JsonInput.DoubleFieldInfinity.JsonOutput -Required.JsonInput.DoubleFieldInfinity.ProtobufOutput -Required.JsonInput.DoubleFieldMaxNegativeValue.JsonOutput -Required.JsonInput.DoubleFieldMaxNegativeValue.ProtobufOutput -Required.JsonInput.DoubleFieldMaxPositiveValue.JsonOutput -Required.JsonInput.DoubleFieldMaxPositiveValue.ProtobufOutput -Required.JsonInput.DoubleFieldMinNegativeValue.JsonOutput -Required.JsonInput.DoubleFieldMinNegativeValue.ProtobufOutput -Required.JsonInput.DoubleFieldMinPositiveValue.JsonOutput -Required.JsonInput.DoubleFieldMinPositiveValue.ProtobufOutput -Required.JsonInput.DoubleFieldNan.JsonOutput -Required.JsonInput.DoubleFieldNan.ProtobufOutput -Required.JsonInput.DoubleFieldNegativeInfinity.JsonOutput -Required.JsonInput.DoubleFieldNegativeInfinity.ProtobufOutput -Required.JsonInput.DoubleFieldQuotedValue.JsonOutput -Required.JsonInput.DoubleFieldQuotedValue.ProtobufOutput -Required.JsonInput.DurationMaxValue.JsonOutput -Required.JsonInput.DurationMaxValue.ProtobufOutput -Required.JsonInput.DurationMinValue.JsonOutput -Required.JsonInput.DurationMinValue.ProtobufOutput -Required.JsonInput.DurationRepeatedValue.JsonOutput -Required.JsonInput.DurationRepeatedValue.ProtobufOutput -Required.JsonInput.EnumField.ProtobufOutput -Required.JsonInput.EnumFieldNumericValueNonZero.JsonOutput -Required.JsonInput.EnumFieldNumericValueNonZero.ProtobufOutput -Required.JsonInput.EnumFieldNumericValueZero.JsonOutput -Required.JsonInput.EnumFieldNumericValueZero.ProtobufOutput -Required.JsonInput.EnumFieldUnknownValue.Validator -Required.JsonInput.FieldMask.JsonOutput -Required.JsonInput.FieldMask.ProtobufOutput -Required.JsonInput.FloatFieldInfinity.JsonOutput -Required.JsonInput.FloatFieldInfinity.ProtobufOutput -Required.JsonInput.FloatFieldNan.JsonOutput -Required.JsonInput.FloatFieldNan.ProtobufOutput -Required.JsonInput.FloatFieldNegativeInfinity.JsonOutput -Required.JsonInput.FloatFieldNegativeInfinity.ProtobufOutput -Required.JsonInput.FloatFieldQuotedValue.JsonOutput -Required.JsonInput.FloatFieldQuotedValue.ProtobufOutput -Required.JsonInput.FloatFieldTooLarge -Required.JsonInput.FloatFieldTooSmall -Required.JsonInput.Int32FieldExponentialFormat.JsonOutput -Required.JsonInput.Int32FieldExponentialFormat.ProtobufOutput -Required.JsonInput.Int32FieldFloatTrailingZero.JsonOutput -Required.JsonInput.Int32FieldFloatTrailingZero.ProtobufOutput -Required.JsonInput.Int32FieldMaxFloatValue.JsonOutput -Required.JsonInput.Int32FieldMaxFloatValue.ProtobufOutput -Required.JsonInput.Int32FieldMinFloatValue.JsonOutput -Required.JsonInput.Int32FieldMinFloatValue.ProtobufOutput -Required.JsonInput.Int32FieldStringValue.JsonOutput -Required.JsonInput.Int32FieldStringValue.ProtobufOutput -Required.JsonInput.Int32FieldStringValueEscaped.JsonOutput -Required.JsonInput.Int32FieldStringValueEscaped.ProtobufOutput -Required.JsonInput.Int64FieldMaxValue.JsonOutput -Required.JsonInput.Int64FieldMaxValue.ProtobufOutput -Required.JsonInput.Int64FieldMinValue.JsonOutput -Required.JsonInput.Int64FieldMinValue.ProtobufOutput -Required.JsonInput.MessageField.JsonOutput -Required.JsonInput.MessageField.ProtobufOutput -Required.JsonInput.OptionalBoolWrapper.JsonOutput -Required.JsonInput.OptionalBoolWrapper.ProtobufOutput -Required.JsonInput.OptionalBytesWrapper.JsonOutput -Required.JsonInput.OptionalBytesWrapper.ProtobufOutput -Required.JsonInput.OptionalDoubleWrapper.JsonOutput -Required.JsonInput.OptionalDoubleWrapper.ProtobufOutput -Required.JsonInput.OptionalFloatWrapper.JsonOutput -Required.JsonInput.OptionalFloatWrapper.ProtobufOutput -Required.JsonInput.OptionalInt32Wrapper.JsonOutput -Required.JsonInput.OptionalInt32Wrapper.ProtobufOutput -Required.JsonInput.OptionalInt64Wrapper.JsonOutput -Required.JsonInput.OptionalInt64Wrapper.ProtobufOutput -Required.JsonInput.OptionalStringWrapper.JsonOutput -Required.JsonInput.OptionalStringWrapper.ProtobufOutput -Required.JsonInput.OptionalUint32Wrapper.JsonOutput -Required.JsonInput.OptionalUint32Wrapper.ProtobufOutput -Required.JsonInput.OptionalUint64Wrapper.JsonOutput -Required.JsonInput.OptionalUint64Wrapper.ProtobufOutput -Required.JsonInput.OptionalWrapperTypesWithNonDefaultValue.JsonOutput -Required.JsonInput.OptionalWrapperTypesWithNonDefaultValue.ProtobufOutput -Required.JsonInput.RepeatedBoolWrapper.JsonOutput -Required.JsonInput.RepeatedBoolWrapper.ProtobufOutput -Required.JsonInput.RepeatedBytesWrapper.JsonOutput -Required.JsonInput.RepeatedBytesWrapper.ProtobufOutput -Required.JsonInput.RepeatedDoubleWrapper.JsonOutput -Required.JsonInput.RepeatedDoubleWrapper.ProtobufOutput -Required.JsonInput.RepeatedFieldWrongElementTypeExpectingMessagesGotInt -Required.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotInt -Required.JsonInput.RepeatedFloatWrapper.JsonOutput -Required.JsonInput.RepeatedFloatWrapper.ProtobufOutput -Required.JsonInput.RepeatedInt32Wrapper.JsonOutput -Required.JsonInput.RepeatedInt32Wrapper.ProtobufOutput -Required.JsonInput.RepeatedInt64Wrapper.JsonOutput -Required.JsonInput.RepeatedInt64Wrapper.ProtobufOutput -Required.JsonInput.RepeatedStringWrapper.JsonOutput -Required.JsonInput.RepeatedStringWrapper.ProtobufOutput -Required.JsonInput.RepeatedUint32Wrapper.JsonOutput -Required.JsonInput.RepeatedUint32Wrapper.ProtobufOutput -Required.JsonInput.RepeatedUint64Wrapper.JsonOutput -Required.JsonInput.RepeatedUint64Wrapper.ProtobufOutput -Required.JsonInput.StringFieldEscape.JsonOutput -Required.JsonInput.StringFieldEscape.ProtobufOutput -Required.JsonInput.StringFieldNotAString -Required.JsonInput.StringFieldSurrogatePair.JsonOutput -Required.JsonInput.StringFieldSurrogatePair.ProtobufOutput -Required.JsonInput.StringFieldUnicodeEscape.JsonOutput -Required.JsonInput.StringFieldUnicodeEscape.ProtobufOutput -Required.JsonInput.StringFieldUnicodeEscapeWithLowercaseHexLetters.JsonOutput -Required.JsonInput.StringFieldUnicodeEscapeWithLowercaseHexLetters.ProtobufOutput -Required.JsonInput.Struct.JsonOutput -Required.JsonInput.Struct.ProtobufOutput -Required.JsonInput.TimestampMaxValue.JsonOutput -Required.JsonInput.TimestampMaxValue.ProtobufOutput -Required.JsonInput.TimestampMinValue.JsonOutput -Required.JsonInput.TimestampMinValue.ProtobufOutput -Required.JsonInput.TimestampRepeatedValue.JsonOutput -Required.JsonInput.TimestampRepeatedValue.ProtobufOutput -Required.JsonInput.TimestampWithNegativeOffset.JsonOutput -Required.JsonInput.TimestampWithNegativeOffset.ProtobufOutput -Required.JsonInput.TimestampWithPositiveOffset.JsonOutput -Required.JsonInput.TimestampWithPositiveOffset.ProtobufOutput -Required.JsonInput.Uint32FieldMaxFloatValue.JsonOutput -Required.JsonInput.Uint32FieldMaxFloatValue.ProtobufOutput -Required.JsonInput.Uint64FieldMaxValue.JsonOutput -Required.JsonInput.Uint64FieldMaxValue.ProtobufOutput -Required.JsonInput.ValueAcceptBool.JsonOutput -Required.JsonInput.ValueAcceptBool.ProtobufOutput -Required.JsonInput.ValueAcceptFloat.JsonOutput -Required.JsonInput.ValueAcceptFloat.ProtobufOutput -Required.JsonInput.ValueAcceptInteger.JsonOutput -Required.JsonInput.ValueAcceptInteger.ProtobufOutput -Required.JsonInput.ValueAcceptList.JsonOutput -Required.JsonInput.ValueAcceptList.ProtobufOutput -Required.JsonInput.ValueAcceptNull.JsonOutput -Required.JsonInput.ValueAcceptNull.ProtobufOutput -Required.JsonInput.ValueAcceptObject.JsonOutput -Required.JsonInput.ValueAcceptObject.ProtobufOutput -Required.JsonInput.ValueAcceptString.JsonOutput -Required.JsonInput.ValueAcceptString.ProtobufOutput -Required.JsonInput.WrapperTypesWithNullValue.ProtobufOutput -Required.ProtobufInput.DoubleFieldNormalizeQuietNan.JsonOutput -Required.ProtobufInput.DoubleFieldNormalizeSignalingNan.JsonOutput -Required.ProtobufInput.FloatFieldNormalizeQuietNan.JsonOutput -Required.ProtobufInput.FloatFieldNormalizeSignalingNan.JsonOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.FIXED32.ProtobufOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.FIXED64.ProtobufOutput -Required.ProtobufInput.RepeatedScalarSelectsLast.UINT64.ProtobufOutput +Required.Proto3.JsonInput.AllFieldAcceptNull.ProtobufOutput +Required.Proto3.JsonInput.Any.JsonOutput +Required.Proto3.JsonInput.Any.ProtobufOutput +Required.Proto3.JsonInput.AnyNested.JsonOutput +Required.Proto3.JsonInput.AnyNested.ProtobufOutput +Required.Proto3.JsonInput.AnyUnorderedTypeTag.JsonOutput +Required.Proto3.JsonInput.AnyUnorderedTypeTag.ProtobufOutput +Required.Proto3.JsonInput.AnyWithDuration.JsonOutput +Required.Proto3.JsonInput.AnyWithDuration.ProtobufOutput +Required.Proto3.JsonInput.AnyWithFieldMask.JsonOutput +Required.Proto3.JsonInput.AnyWithFieldMask.ProtobufOutput +Required.Proto3.JsonInput.AnyWithInt32ValueWrapper.JsonOutput +Required.Proto3.JsonInput.AnyWithInt32ValueWrapper.ProtobufOutput +Required.Proto3.JsonInput.AnyWithStruct.JsonOutput +Required.Proto3.JsonInput.AnyWithStruct.ProtobufOutput +Required.Proto3.JsonInput.AnyWithTimestamp.JsonOutput +Required.Proto3.JsonInput.AnyWithTimestamp.ProtobufOutput +Required.Proto3.JsonInput.AnyWithValueForInteger.JsonOutput +Required.Proto3.JsonInput.AnyWithValueForInteger.ProtobufOutput +Required.Proto3.JsonInput.AnyWithValueForJsonObject.JsonOutput +Required.Proto3.JsonInput.AnyWithValueForJsonObject.ProtobufOutput +Required.Proto3.JsonInput.BoolFieldFalse.ProtobufOutput +Required.Proto3.JsonInput.BoolMapField.JsonOutput +Required.Proto3.JsonInput.DoubleFieldInfinity.JsonOutput +Required.Proto3.JsonInput.DoubleFieldInfinity.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldMaxNegativeValue.JsonOutput +Required.Proto3.JsonInput.DoubleFieldMaxNegativeValue.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldMaxPositiveValue.JsonOutput +Required.Proto3.JsonInput.DoubleFieldMaxPositiveValue.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldMinNegativeValue.JsonOutput +Required.Proto3.JsonInput.DoubleFieldMinNegativeValue.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldMinPositiveValue.JsonOutput +Required.Proto3.JsonInput.DoubleFieldMinPositiveValue.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldNan.JsonOutput +Required.Proto3.JsonInput.DoubleFieldNan.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldNegativeInfinity.JsonOutput +Required.Proto3.JsonInput.DoubleFieldNegativeInfinity.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldQuotedValue.JsonOutput +Required.Proto3.JsonInput.DoubleFieldQuotedValue.ProtobufOutput +Required.Proto3.JsonInput.DurationMaxValue.JsonOutput +Required.Proto3.JsonInput.DurationMaxValue.ProtobufOutput +Required.Proto3.JsonInput.DurationMinValue.JsonOutput +Required.Proto3.JsonInput.DurationMinValue.ProtobufOutput +Required.Proto3.JsonInput.DurationRepeatedValue.JsonOutput +Required.Proto3.JsonInput.DurationRepeatedValue.ProtobufOutput +Required.Proto3.JsonInput.EnumField.ProtobufOutput +Required.Proto3.JsonInput.EnumFieldNumericValueNonZero.JsonOutput +Required.Proto3.JsonInput.EnumFieldNumericValueNonZero.ProtobufOutput +Required.Proto3.JsonInput.EnumFieldNumericValueZero.JsonOutput +Required.Proto3.JsonInput.EnumFieldNumericValueZero.ProtobufOutput +Required.Proto3.JsonInput.EnumFieldUnknownValue.Validator +Required.Proto3.JsonInput.FieldMask.JsonOutput +Required.Proto3.JsonInput.FieldMask.ProtobufOutput +Required.Proto3.JsonInput.FloatFieldInfinity.JsonOutput +Required.Proto3.JsonInput.FloatFieldInfinity.ProtobufOutput +Required.Proto3.JsonInput.FloatFieldNan.JsonOutput +Required.Proto3.JsonInput.FloatFieldNan.ProtobufOutput +Required.Proto3.JsonInput.FloatFieldNegativeInfinity.JsonOutput +Required.Proto3.JsonInput.FloatFieldNegativeInfinity.ProtobufOutput +Required.Proto3.JsonInput.FloatFieldQuotedValue.JsonOutput +Required.Proto3.JsonInput.FloatFieldQuotedValue.ProtobufOutput +Required.Proto3.JsonInput.FloatFieldTooLarge +Required.Proto3.JsonInput.FloatFieldTooSmall +Required.Proto3.JsonInput.Int32FieldExponentialFormat.JsonOutput +Required.Proto3.JsonInput.Int32FieldExponentialFormat.ProtobufOutput +Required.Proto3.JsonInput.Int32FieldFloatTrailingZero.JsonOutput +Required.Proto3.JsonInput.Int32FieldFloatTrailingZero.ProtobufOutput +Required.Proto3.JsonInput.Int32FieldMaxFloatValue.JsonOutput +Required.Proto3.JsonInput.Int32FieldMaxFloatValue.ProtobufOutput +Required.Proto3.JsonInput.Int32FieldMinFloatValue.JsonOutput +Required.Proto3.JsonInput.Int32FieldMinFloatValue.ProtobufOutput +Required.Proto3.JsonInput.Int32FieldStringValue.JsonOutput +Required.Proto3.JsonInput.Int32FieldStringValue.ProtobufOutput +Required.Proto3.JsonInput.Int32FieldStringValueEscaped.JsonOutput +Required.Proto3.JsonInput.Int32FieldStringValueEscaped.ProtobufOutput +Required.Proto3.JsonInput.Int64FieldMaxValue.JsonOutput +Required.Proto3.JsonInput.Int64FieldMaxValue.ProtobufOutput +Required.Proto3.JsonInput.Int64FieldMinValue.JsonOutput +Required.Proto3.JsonInput.Int64FieldMinValue.ProtobufOutput +Required.Proto3.JsonInput.MessageField.JsonOutput +Required.Proto3.JsonInput.MessageField.ProtobufOutput +Required.Proto3.JsonInput.OptionalBoolWrapper.JsonOutput +Required.Proto3.JsonInput.OptionalBoolWrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalBytesWrapper.JsonOutput +Required.Proto3.JsonInput.OptionalBytesWrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalDoubleWrapper.JsonOutput +Required.Proto3.JsonInput.OptionalDoubleWrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalFloatWrapper.JsonOutput +Required.Proto3.JsonInput.OptionalFloatWrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalInt32Wrapper.JsonOutput +Required.Proto3.JsonInput.OptionalInt32Wrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalInt64Wrapper.JsonOutput +Required.Proto3.JsonInput.OptionalInt64Wrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalStringWrapper.JsonOutput +Required.Proto3.JsonInput.OptionalStringWrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalUint32Wrapper.JsonOutput +Required.Proto3.JsonInput.OptionalUint32Wrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalUint64Wrapper.JsonOutput +Required.Proto3.JsonInput.OptionalUint64Wrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalWrapperTypesWithNonDefaultValue.JsonOutput +Required.Proto3.JsonInput.OptionalWrapperTypesWithNonDefaultValue.ProtobufOutput +Required.Proto3.JsonInput.RepeatedBoolWrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedBoolWrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedBytesWrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedBytesWrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedDoubleWrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedDoubleWrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingMessagesGotInt +Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotInt +Required.Proto3.JsonInput.RepeatedFloatWrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedFloatWrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedInt32Wrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedInt32Wrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedInt64Wrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedInt64Wrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedStringWrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedStringWrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedUint32Wrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedUint32Wrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedUint64Wrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedUint64Wrapper.ProtobufOutput +Required.Proto3.JsonInput.StringFieldEscape.JsonOutput +Required.Proto3.JsonInput.StringFieldEscape.ProtobufOutput +Required.Proto3.JsonInput.StringFieldNotAString +Required.Proto3.JsonInput.StringFieldSurrogatePair.JsonOutput +Required.Proto3.JsonInput.StringFieldSurrogatePair.ProtobufOutput +Required.Proto3.JsonInput.StringFieldUnicodeEscape.JsonOutput +Required.Proto3.JsonInput.StringFieldUnicodeEscape.ProtobufOutput +Required.Proto3.JsonInput.StringFieldUnicodeEscapeWithLowercaseHexLetters.JsonOutput +Required.Proto3.JsonInput.StringFieldUnicodeEscapeWithLowercaseHexLetters.ProtobufOutput +Required.Proto3.JsonInput.Struct.JsonOutput +Required.Proto3.JsonInput.Struct.ProtobufOutput +Required.Proto3.JsonInput.TimestampMaxValue.JsonOutput +Required.Proto3.JsonInput.TimestampMaxValue.ProtobufOutput +Required.Proto3.JsonInput.TimestampMinValue.JsonOutput +Required.Proto3.JsonInput.TimestampMinValue.ProtobufOutput +Required.Proto3.JsonInput.TimestampRepeatedValue.JsonOutput +Required.Proto3.JsonInput.TimestampRepeatedValue.ProtobufOutput +Required.Proto3.JsonInput.TimestampWithNegativeOffset.JsonOutput +Required.Proto3.JsonInput.TimestampWithNegativeOffset.ProtobufOutput +Required.Proto3.JsonInput.TimestampWithPositiveOffset.JsonOutput +Required.Proto3.JsonInput.TimestampWithPositiveOffset.ProtobufOutput +Required.Proto3.JsonInput.Uint32FieldMaxFloatValue.JsonOutput +Required.Proto3.JsonInput.Uint32FieldMaxFloatValue.ProtobufOutput +Required.Proto3.JsonInput.Uint64FieldMaxValue.JsonOutput +Required.Proto3.JsonInput.Uint64FieldMaxValue.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptBool.JsonOutput +Required.Proto3.JsonInput.ValueAcceptBool.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptFloat.JsonOutput +Required.Proto3.JsonInput.ValueAcceptFloat.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptInteger.JsonOutput +Required.Proto3.JsonInput.ValueAcceptInteger.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptList.JsonOutput +Required.Proto3.JsonInput.ValueAcceptList.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptNull.JsonOutput +Required.Proto3.JsonInput.ValueAcceptNull.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptObject.JsonOutput +Required.Proto3.JsonInput.ValueAcceptObject.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptString.JsonOutput +Required.Proto3.JsonInput.ValueAcceptString.ProtobufOutput +Required.Proto3.JsonInput.WrapperTypesWithNullValue.ProtobufOutput +Required.Proto3.ProtobufInput.DoubleFieldNormalizeQuietNan.JsonOutput +Required.Proto3.ProtobufInput.DoubleFieldNormalizeSignalingNan.JsonOutput +Required.Proto3.ProtobufInput.FloatFieldNormalizeQuietNan.JsonOutput +Required.Proto3.ProtobufInput.FloatFieldNormalizeSignalingNan.JsonOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.FIXED32.ProtobufOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.FIXED64.ProtobufOutput +Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.UINT64.ProtobufOutput Required.TimestampProtoInputTooLarge.JsonOutput Required.TimestampProtoInputTooSmall.JsonOutput +Recommended.Proto3.ProtobufInput.OneofZeroMessageSetTwice.JsonOutput diff --git a/conformance/failure_list_python.txt b/conformance/failure_list_python.txt index 965b8212..7b010178 100644 --- a/conformance/failure_list_python.txt +++ b/conformance/failure_list_python.txt @@ -1,17 +1,21 @@ -Recommended.JsonInput.DoubleFieldInfinityNotQuoted -Recommended.JsonInput.DoubleFieldNanNotQuoted -Recommended.JsonInput.DoubleFieldNegativeInfinityNotQuoted -Recommended.JsonInput.FloatFieldInfinityNotQuoted -Recommended.JsonInput.FloatFieldNanNotQuoted -Recommended.JsonInput.FloatFieldNegativeInfinityNotQuoted -Required.JsonInput.BytesFieldInvalidBase64Characters -Required.JsonInput.DoubleFieldTooSmall -Required.JsonInput.EnumFieldUnknownValue.Validator -Required.JsonInput.FloatFieldTooLarge -Required.JsonInput.FloatFieldTooSmall -Required.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotBool -Required.JsonInput.TimestampJsonInputLowercaseT -Required.ProtobufInput.IllegalZeroFieldNum_Case_0 -Required.ProtobufInput.IllegalZeroFieldNum_Case_1 -Required.ProtobufInput.IllegalZeroFieldNum_Case_2 -Required.ProtobufInput.IllegalZeroFieldNum_Case_3 +Recommended.Proto3.JsonInput.DoubleFieldInfinityNotQuoted +Recommended.Proto3.JsonInput.DoubleFieldNanNotQuoted +Recommended.Proto3.JsonInput.DoubleFieldNegativeInfinityNotQuoted +Recommended.Proto3.JsonInput.FloatFieldInfinityNotQuoted +Recommended.Proto3.JsonInput.FloatFieldNanNotQuoted +Recommended.Proto3.JsonInput.FloatFieldNegativeInfinityNotQuoted +Required.Proto3.JsonInput.BytesFieldInvalidBase64Characters +Required.Proto3.JsonInput.DoubleFieldTooSmall +Required.Proto3.JsonInput.EnumFieldUnknownValue.Validator +Required.Proto3.JsonInput.FloatFieldTooLarge +Required.Proto3.JsonInput.FloatFieldTooSmall +Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotBool +Required.Proto3.JsonInput.TimestampJsonInputLowercaseT +Required.Proto2.ProtobufInput.IllegalZeroFieldNum_Case_0 +Required.Proto2.ProtobufInput.IllegalZeroFieldNum_Case_1 +Required.Proto2.ProtobufInput.IllegalZeroFieldNum_Case_2 +Required.Proto2.ProtobufInput.IllegalZeroFieldNum_Case_3 +Required.Proto3.ProtobufInput.IllegalZeroFieldNum_Case_0 +Required.Proto3.ProtobufInput.IllegalZeroFieldNum_Case_1 +Required.Proto3.ProtobufInput.IllegalZeroFieldNum_Case_2 +Required.Proto3.ProtobufInput.IllegalZeroFieldNum_Case_3 diff --git a/conformance/failure_list_python_cpp.txt b/conformance/failure_list_python_cpp.txt index 92404d2f..ab946d9d 100644 --- a/conformance/failure_list_python_cpp.txt +++ b/conformance/failure_list_python_cpp.txt @@ -7,32 +7,48 @@ # TODO(haberman): insert links to corresponding bugs tracking the issue. # Should we use GitHub issues or the Google-internal bug tracker? -Recommended.JsonInput.DoubleFieldInfinityNotQuoted -Recommended.JsonInput.DoubleFieldNanNotQuoted -Recommended.JsonInput.DoubleFieldNegativeInfinityNotQuoted -Recommended.JsonInput.FloatFieldInfinityNotQuoted -Recommended.JsonInput.FloatFieldNanNotQuoted -Recommended.JsonInput.FloatFieldNegativeInfinityNotQuoted -Required.JsonInput.BytesFieldInvalidBase64Characters -Required.JsonInput.DoubleFieldTooSmall -Required.JsonInput.EnumFieldUnknownValue.Validator -Required.JsonInput.FloatFieldTooLarge -Required.JsonInput.FloatFieldTooSmall -Required.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotBool -Required.JsonInput.TimestampJsonInputLowercaseT -Required.ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.MESSAGE -Required.ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.MESSAGE -Required.ProtobufInput.PrematureEofInPackedField.BOOL -Required.ProtobufInput.PrematureEofInPackedField.DOUBLE -Required.ProtobufInput.PrematureEofInPackedField.ENUM -Required.ProtobufInput.PrematureEofInPackedField.FIXED32 -Required.ProtobufInput.PrematureEofInPackedField.FIXED64 -Required.ProtobufInput.PrematureEofInPackedField.FLOAT -Required.ProtobufInput.PrematureEofInPackedField.INT32 -Required.ProtobufInput.PrematureEofInPackedField.INT64 -Required.ProtobufInput.PrematureEofInPackedField.SFIXED32 -Required.ProtobufInput.PrematureEofInPackedField.SFIXED64 -Required.ProtobufInput.PrematureEofInPackedField.SINT32 -Required.ProtobufInput.PrematureEofInPackedField.SINT64 -Required.ProtobufInput.PrematureEofInPackedField.UINT32 -Required.ProtobufInput.PrematureEofInPackedField.UINT64 +Recommended.Proto3.JsonInput.DoubleFieldInfinityNotQuoted +Recommended.Proto3.JsonInput.DoubleFieldNanNotQuoted +Recommended.Proto3.JsonInput.DoubleFieldNegativeInfinityNotQuoted +Recommended.Proto3.JsonInput.FloatFieldInfinityNotQuoted +Recommended.Proto3.JsonInput.FloatFieldNanNotQuoted +Recommended.Proto3.JsonInput.FloatFieldNegativeInfinityNotQuoted +Required.Proto3.JsonInput.BytesFieldInvalidBase64Characters +Required.Proto3.JsonInput.DoubleFieldTooSmall +Required.Proto3.JsonInput.EnumFieldUnknownValue.Validator +Required.Proto3.JsonInput.FloatFieldTooLarge +Required.Proto3.JsonInput.FloatFieldTooSmall +Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotBool +Required.Proto3.JsonInput.TimestampJsonInputLowercaseT +Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.MESSAGE +Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.MESSAGE +Required.Proto3.ProtobufInput.PrematureEofInPackedField.BOOL +Required.Proto3.ProtobufInput.PrematureEofInPackedField.DOUBLE +Required.Proto3.ProtobufInput.PrematureEofInPackedField.ENUM +Required.Proto3.ProtobufInput.PrematureEofInPackedField.FIXED32 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.FIXED64 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.FLOAT +Required.Proto3.ProtobufInput.PrematureEofInPackedField.INT32 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.INT64 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.SFIXED32 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.SFIXED64 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.SINT32 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.SINT64 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.UINT32 +Required.Proto3.ProtobufInput.PrematureEofInPackedField.UINT64 +Required.Proto2.ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.MESSAGE +Required.Proto2.ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.MESSAGE +Required.Proto2.ProtobufInput.PrematureEofInPackedField.BOOL +Required.Proto2.ProtobufInput.PrematureEofInPackedField.DOUBLE +Required.Proto2.ProtobufInput.PrematureEofInPackedField.ENUM +Required.Proto2.ProtobufInput.PrematureEofInPackedField.FIXED32 +Required.Proto2.ProtobufInput.PrematureEofInPackedField.FIXED64 +Required.Proto2.ProtobufInput.PrematureEofInPackedField.FLOAT +Required.Proto2.ProtobufInput.PrematureEofInPackedField.INT32 +Required.Proto2.ProtobufInput.PrematureEofInPackedField.INT64 +Required.Proto2.ProtobufInput.PrematureEofInPackedField.SFIXED32 +Required.Proto2.ProtobufInput.PrematureEofInPackedField.SFIXED64 +Required.Proto2.ProtobufInput.PrematureEofInPackedField.SINT32 +Required.Proto2.ProtobufInput.PrematureEofInPackedField.SINT64 +Required.Proto2.ProtobufInput.PrematureEofInPackedField.UINT32 +Required.Proto2.ProtobufInput.PrematureEofInPackedField.UINT64 diff --git a/conformance/failure_list_ruby.txt b/conformance/failure_list_ruby.txt index d899ee40..a8d2e3f5 100644 --- a/conformance/failure_list_ruby.txt +++ b/conformance/failure_list_ruby.txt @@ -1,135 +1,135 @@ Recommended.FieldMaskNumbersDontRoundTrip.JsonOutput Recommended.FieldMaskPathsDontRoundTrip.JsonOutput Recommended.FieldMaskTooManyUnderscore.JsonOutput -Recommended.JsonInput.DurationHas3FractionalDigits.Validator -Recommended.JsonInput.DurationHas6FractionalDigits.Validator -Recommended.JsonInput.DurationHas9FractionalDigits.Validator -Recommended.JsonInput.DurationHasZeroFractionalDigit.Validator -Recommended.JsonInput.Int64FieldBeString.Validator -Recommended.JsonInput.MapFieldValueIsNull -Recommended.JsonInput.RepeatedFieldMessageElementIsNull -Recommended.JsonInput.RepeatedFieldPrimitiveElementIsNull -Recommended.JsonInput.StringEndsWithEscapeChar -Recommended.JsonInput.StringFieldSurrogateInWrongOrder -Recommended.JsonInput.StringFieldUnpairedHighSurrogate -Recommended.JsonInput.StringFieldUnpairedLowSurrogate -Recommended.JsonInput.TimestampHas3FractionalDigits.Validator -Recommended.JsonInput.TimestampHas6FractionalDigits.Validator -Recommended.JsonInput.TimestampHas9FractionalDigits.Validator -Recommended.JsonInput.TimestampHasZeroFractionalDigit.Validator -Recommended.JsonInput.TimestampZeroNormalized.Validator -Recommended.JsonInput.Uint64FieldBeString.Validator +Recommended.Proto3.JsonInput.DurationHas3FractionalDigits.Validator +Recommended.Proto3.JsonInput.DurationHas6FractionalDigits.Validator +Recommended.Proto3.JsonInput.DurationHas9FractionalDigits.Validator +Recommended.Proto3.JsonInput.DurationHasZeroFractionalDigit.Validator +Recommended.Proto3.JsonInput.Int64FieldBeString.Validator +Recommended.Proto3.JsonInput.MapFieldValueIsNull +Recommended.Proto3.JsonInput.RepeatedFieldMessageElementIsNull +Recommended.Proto3.JsonInput.RepeatedFieldPrimitiveElementIsNull +Recommended.Proto3.JsonInput.StringEndsWithEscapeChar +Recommended.Proto3.JsonInput.StringFieldSurrogateInWrongOrder +Recommended.Proto3.JsonInput.StringFieldUnpairedHighSurrogate +Recommended.Proto3.JsonInput.StringFieldUnpairedLowSurrogate +Recommended.Proto3.JsonInput.TimestampHas3FractionalDigits.Validator +Recommended.Proto3.JsonInput.TimestampHas6FractionalDigits.Validator +Recommended.Proto3.JsonInput.TimestampHas9FractionalDigits.Validator +Recommended.Proto3.JsonInput.TimestampHasZeroFractionalDigit.Validator +Recommended.Proto3.JsonInput.TimestampZeroNormalized.Validator +Recommended.Proto3.JsonInput.Uint64FieldBeString.Validator Required.DurationProtoInputTooLarge.JsonOutput Required.DurationProtoInputTooSmall.JsonOutput -Required.JsonInput.Any.JsonOutput -Required.JsonInput.Any.ProtobufOutput -Required.JsonInput.AnyNested.JsonOutput -Required.JsonInput.AnyNested.ProtobufOutput -Required.JsonInput.AnyUnorderedTypeTag.JsonOutput -Required.JsonInput.AnyUnorderedTypeTag.ProtobufOutput -Required.JsonInput.AnyWithDuration.JsonOutput -Required.JsonInput.AnyWithDuration.ProtobufOutput -Required.JsonInput.AnyWithFieldMask.JsonOutput -Required.JsonInput.AnyWithFieldMask.ProtobufOutput -Required.JsonInput.AnyWithInt32ValueWrapper.JsonOutput -Required.JsonInput.AnyWithInt32ValueWrapper.ProtobufOutput -Required.JsonInput.AnyWithStruct.JsonOutput -Required.JsonInput.AnyWithStruct.ProtobufOutput -Required.JsonInput.AnyWithTimestamp.JsonOutput -Required.JsonInput.AnyWithTimestamp.ProtobufOutput -Required.JsonInput.AnyWithValueForInteger.JsonOutput -Required.JsonInput.AnyWithValueForInteger.ProtobufOutput -Required.JsonInput.AnyWithValueForJsonObject.JsonOutput -Required.JsonInput.AnyWithValueForJsonObject.ProtobufOutput -Required.JsonInput.DoubleFieldMaxNegativeValue.JsonOutput -Required.JsonInput.DoubleFieldMaxNegativeValue.ProtobufOutput -Required.JsonInput.DoubleFieldMinPositiveValue.JsonOutput -Required.JsonInput.DoubleFieldMinPositiveValue.ProtobufOutput -Required.JsonInput.DoubleFieldNan.JsonOutput -Required.JsonInput.DurationMaxValue.JsonOutput -Required.JsonInput.DurationMaxValue.ProtobufOutput -Required.JsonInput.DurationMinValue.JsonOutput -Required.JsonInput.DurationMinValue.ProtobufOutput -Required.JsonInput.DurationRepeatedValue.JsonOutput -Required.JsonInput.DurationRepeatedValue.ProtobufOutput -Required.JsonInput.FieldMask.JsonOutput -Required.JsonInput.FieldMask.ProtobufOutput -Required.JsonInput.FloatFieldInfinity.JsonOutput -Required.JsonInput.FloatFieldNan.JsonOutput -Required.JsonInput.FloatFieldNegativeInfinity.JsonOutput -Required.JsonInput.FloatFieldTooLarge -Required.JsonInput.FloatFieldTooSmall -Required.JsonInput.OneofFieldDuplicate -Required.JsonInput.OptionalBoolWrapper.JsonOutput -Required.JsonInput.OptionalBoolWrapper.ProtobufOutput -Required.JsonInput.OptionalBytesWrapper.JsonOutput -Required.JsonInput.OptionalBytesWrapper.ProtobufOutput -Required.JsonInput.OptionalDoubleWrapper.JsonOutput -Required.JsonInput.OptionalDoubleWrapper.ProtobufOutput -Required.JsonInput.OptionalFloatWrapper.JsonOutput -Required.JsonInput.OptionalFloatWrapper.ProtobufOutput -Required.JsonInput.OptionalInt32Wrapper.JsonOutput -Required.JsonInput.OptionalInt32Wrapper.ProtobufOutput -Required.JsonInput.OptionalInt64Wrapper.JsonOutput -Required.JsonInput.OptionalInt64Wrapper.ProtobufOutput -Required.JsonInput.OptionalStringWrapper.JsonOutput -Required.JsonInput.OptionalStringWrapper.ProtobufOutput -Required.JsonInput.OptionalUint32Wrapper.JsonOutput -Required.JsonInput.OptionalUint32Wrapper.ProtobufOutput -Required.JsonInput.OptionalUint64Wrapper.JsonOutput -Required.JsonInput.OptionalUint64Wrapper.ProtobufOutput -Required.JsonInput.OptionalWrapperTypesWithNonDefaultValue.JsonOutput -Required.JsonInput.OptionalWrapperTypesWithNonDefaultValue.ProtobufOutput -Required.JsonInput.RepeatedBoolWrapper.JsonOutput -Required.JsonInput.RepeatedBoolWrapper.ProtobufOutput -Required.JsonInput.RepeatedBytesWrapper.JsonOutput -Required.JsonInput.RepeatedBytesWrapper.ProtobufOutput -Required.JsonInput.RepeatedDoubleWrapper.JsonOutput -Required.JsonInput.RepeatedDoubleWrapper.ProtobufOutput -Required.JsonInput.RepeatedFloatWrapper.JsonOutput -Required.JsonInput.RepeatedFloatWrapper.ProtobufOutput -Required.JsonInput.RepeatedInt32Wrapper.JsonOutput -Required.JsonInput.RepeatedInt32Wrapper.ProtobufOutput -Required.JsonInput.RepeatedInt64Wrapper.JsonOutput -Required.JsonInput.RepeatedInt64Wrapper.ProtobufOutput -Required.JsonInput.RepeatedStringWrapper.JsonOutput -Required.JsonInput.RepeatedStringWrapper.ProtobufOutput -Required.JsonInput.RepeatedUint32Wrapper.JsonOutput -Required.JsonInput.RepeatedUint32Wrapper.ProtobufOutput -Required.JsonInput.RepeatedUint64Wrapper.JsonOutput -Required.JsonInput.RepeatedUint64Wrapper.ProtobufOutput -Required.JsonInput.StringFieldSurrogatePair.JsonOutput -Required.JsonInput.StringFieldSurrogatePair.ProtobufOutput -Required.JsonInput.Struct.JsonOutput -Required.JsonInput.Struct.ProtobufOutput -Required.JsonInput.TimestampMaxValue.JsonOutput -Required.JsonInput.TimestampMaxValue.ProtobufOutput -Required.JsonInput.TimestampMinValue.JsonOutput -Required.JsonInput.TimestampMinValue.ProtobufOutput -Required.JsonInput.TimestampRepeatedValue.JsonOutput -Required.JsonInput.TimestampRepeatedValue.ProtobufOutput -Required.JsonInput.TimestampWithNegativeOffset.JsonOutput -Required.JsonInput.TimestampWithNegativeOffset.ProtobufOutput -Required.JsonInput.TimestampWithPositiveOffset.JsonOutput -Required.JsonInput.TimestampWithPositiveOffset.ProtobufOutput -Required.JsonInput.ValueAcceptBool.JsonOutput -Required.JsonInput.ValueAcceptBool.ProtobufOutput -Required.JsonInput.ValueAcceptFloat.JsonOutput -Required.JsonInput.ValueAcceptFloat.ProtobufOutput -Required.JsonInput.ValueAcceptInteger.JsonOutput -Required.JsonInput.ValueAcceptInteger.ProtobufOutput -Required.JsonInput.ValueAcceptList.JsonOutput -Required.JsonInput.ValueAcceptList.ProtobufOutput -Required.JsonInput.ValueAcceptNull.JsonOutput -Required.JsonInput.ValueAcceptNull.ProtobufOutput -Required.JsonInput.ValueAcceptObject.JsonOutput -Required.JsonInput.ValueAcceptObject.ProtobufOutput -Required.JsonInput.ValueAcceptString.JsonOutput -Required.JsonInput.ValueAcceptString.ProtobufOutput -Required.ProtobufInput.DoubleFieldNormalizeQuietNan.JsonOutput -Required.ProtobufInput.DoubleFieldNormalizeSignalingNan.JsonOutput -Required.ProtobufInput.FloatFieldNormalizeQuietNan.JsonOutput -Required.ProtobufInput.FloatFieldNormalizeSignalingNan.JsonOutput -Required.ProtobufInput.ValidDataRepeated.FLOAT.JsonOutput +Required.Proto3.JsonInput.Any.JsonOutput +Required.Proto3.JsonInput.Any.ProtobufOutput +Required.Proto3.JsonInput.AnyNested.JsonOutput +Required.Proto3.JsonInput.AnyNested.ProtobufOutput +Required.Proto3.JsonInput.AnyUnorderedTypeTag.JsonOutput +Required.Proto3.JsonInput.AnyUnorderedTypeTag.ProtobufOutput +Required.Proto3.JsonInput.AnyWithDuration.JsonOutput +Required.Proto3.JsonInput.AnyWithDuration.ProtobufOutput +Required.Proto3.JsonInput.AnyWithFieldMask.JsonOutput +Required.Proto3.JsonInput.AnyWithFieldMask.ProtobufOutput +Required.Proto3.JsonInput.AnyWithInt32ValueWrapper.JsonOutput +Required.Proto3.JsonInput.AnyWithInt32ValueWrapper.ProtobufOutput +Required.Proto3.JsonInput.AnyWithStruct.JsonOutput +Required.Proto3.JsonInput.AnyWithStruct.ProtobufOutput +Required.Proto3.JsonInput.AnyWithTimestamp.JsonOutput +Required.Proto3.JsonInput.AnyWithTimestamp.ProtobufOutput +Required.Proto3.JsonInput.AnyWithValueForInteger.JsonOutput +Required.Proto3.JsonInput.AnyWithValueForInteger.ProtobufOutput +Required.Proto3.JsonInput.AnyWithValueForJsonObject.JsonOutput +Required.Proto3.JsonInput.AnyWithValueForJsonObject.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldMaxNegativeValue.JsonOutput +Required.Proto3.JsonInput.DoubleFieldMaxNegativeValue.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldMinPositiveValue.JsonOutput +Required.Proto3.JsonInput.DoubleFieldMinPositiveValue.ProtobufOutput +Required.Proto3.JsonInput.DoubleFieldNan.JsonOutput +Required.Proto3.JsonInput.DurationMaxValue.JsonOutput +Required.Proto3.JsonInput.DurationMaxValue.ProtobufOutput +Required.Proto3.JsonInput.DurationMinValue.JsonOutput +Required.Proto3.JsonInput.DurationMinValue.ProtobufOutput +Required.Proto3.JsonInput.DurationRepeatedValue.JsonOutput +Required.Proto3.JsonInput.DurationRepeatedValue.ProtobufOutput +Required.Proto3.JsonInput.FieldMask.JsonOutput +Required.Proto3.JsonInput.FieldMask.ProtobufOutput +Required.Proto3.JsonInput.FloatFieldInfinity.JsonOutput +Required.Proto3.JsonInput.FloatFieldNan.JsonOutput +Required.Proto3.JsonInput.FloatFieldNegativeInfinity.JsonOutput +Required.Proto3.JsonInput.FloatFieldTooLarge +Required.Proto3.JsonInput.FloatFieldTooSmall +Required.Proto3.JsonInput.OneofFieldDuplicate +Required.Proto3.JsonInput.OptionalBoolWrapper.JsonOutput +Required.Proto3.JsonInput.OptionalBoolWrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalBytesWrapper.JsonOutput +Required.Proto3.JsonInput.OptionalBytesWrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalDoubleWrapper.JsonOutput +Required.Proto3.JsonInput.OptionalDoubleWrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalFloatWrapper.JsonOutput +Required.Proto3.JsonInput.OptionalFloatWrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalInt32Wrapper.JsonOutput +Required.Proto3.JsonInput.OptionalInt32Wrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalInt64Wrapper.JsonOutput +Required.Proto3.JsonInput.OptionalInt64Wrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalStringWrapper.JsonOutput +Required.Proto3.JsonInput.OptionalStringWrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalUint32Wrapper.JsonOutput +Required.Proto3.JsonInput.OptionalUint32Wrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalUint64Wrapper.JsonOutput +Required.Proto3.JsonInput.OptionalUint64Wrapper.ProtobufOutput +Required.Proto3.JsonInput.OptionalWrapperTypesWithNonDefaultValue.JsonOutput +Required.Proto3.JsonInput.OptionalWrapperTypesWithNonDefaultValue.ProtobufOutput +Required.Proto3.JsonInput.RepeatedBoolWrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedBoolWrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedBytesWrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedBytesWrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedDoubleWrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedDoubleWrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedFloatWrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedFloatWrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedInt32Wrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedInt32Wrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedInt64Wrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedInt64Wrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedStringWrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedStringWrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedUint32Wrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedUint32Wrapper.ProtobufOutput +Required.Proto3.JsonInput.RepeatedUint64Wrapper.JsonOutput +Required.Proto3.JsonInput.RepeatedUint64Wrapper.ProtobufOutput +Required.Proto3.JsonInput.StringFieldSurrogatePair.JsonOutput +Required.Proto3.JsonInput.StringFieldSurrogatePair.ProtobufOutput +Required.Proto3.JsonInput.Struct.JsonOutput +Required.Proto3.JsonInput.Struct.ProtobufOutput +Required.Proto3.JsonInput.TimestampMaxValue.JsonOutput +Required.Proto3.JsonInput.TimestampMaxValue.ProtobufOutput +Required.Proto3.JsonInput.TimestampMinValue.JsonOutput +Required.Proto3.JsonInput.TimestampMinValue.ProtobufOutput +Required.Proto3.JsonInput.TimestampRepeatedValue.JsonOutput +Required.Proto3.JsonInput.TimestampRepeatedValue.ProtobufOutput +Required.Proto3.JsonInput.TimestampWithNegativeOffset.JsonOutput +Required.Proto3.JsonInput.TimestampWithNegativeOffset.ProtobufOutput +Required.Proto3.JsonInput.TimestampWithPositiveOffset.JsonOutput +Required.Proto3.JsonInput.TimestampWithPositiveOffset.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptBool.JsonOutput +Required.Proto3.JsonInput.ValueAcceptBool.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptFloat.JsonOutput +Required.Proto3.JsonInput.ValueAcceptFloat.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptInteger.JsonOutput +Required.Proto3.JsonInput.ValueAcceptInteger.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptList.JsonOutput +Required.Proto3.JsonInput.ValueAcceptList.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptNull.JsonOutput +Required.Proto3.JsonInput.ValueAcceptNull.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptObject.JsonOutput +Required.Proto3.JsonInput.ValueAcceptObject.ProtobufOutput +Required.Proto3.JsonInput.ValueAcceptString.JsonOutput +Required.Proto3.JsonInput.ValueAcceptString.ProtobufOutput +Required.Proto3.ProtobufInput.DoubleFieldNormalizeQuietNan.JsonOutput +Required.Proto3.ProtobufInput.DoubleFieldNormalizeSignalingNan.JsonOutput +Required.Proto3.ProtobufInput.FloatFieldNormalizeQuietNan.JsonOutput +Required.Proto3.ProtobufInput.FloatFieldNormalizeSignalingNan.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.JsonOutput Required.TimestampProtoInputTooLarge.JsonOutput Required.TimestampProtoInputTooSmall.JsonOutput diff --git a/csharp/src/Google.Protobuf.Conformance/Program.cs b/csharp/src/Google.Protobuf.Conformance/Program.cs index 2f30036c..96dc354e 100644 --- a/csharp/src/Google.Protobuf.Conformance/Program.cs +++ b/csharp/src/Google.Protobuf.Conformance/Program.cs @@ -48,7 +48,7 @@ namespace Google.Protobuf.Conformance // This way we get the binary streams instead of readers/writers. var input = new BinaryReader(Console.OpenStandardInput()); var output = new BinaryWriter(Console.OpenStandardOutput()); - var typeRegistry = TypeRegistry.FromMessages(ProtobufTestMessages.Proto3.TestAllTypes.Descriptor); + var typeRegistry = TypeRegistry.FromMessages(ProtobufTestMessages.Proto3.TestAllTypesProto3.Descriptor); int count = 0; while (RunTest(input, output, typeRegistry)) @@ -81,20 +81,20 @@ namespace Google.Protobuf.Conformance private static ConformanceResponse PerformRequest(ConformanceRequest request, TypeRegistry typeRegistry) { - ProtobufTestMessages.Proto3.TestAllTypes message; + ProtobufTestMessages.Proto3.TestAllTypesProto3 message; try { switch (request.PayloadCase) { case ConformanceRequest.PayloadOneofCase.JsonPayload: var parser = new JsonParser(new JsonParser.Settings(20, typeRegistry)); - message = parser.Parse(request.JsonPayload); + message = parser.Parse(request.JsonPayload); break; case ConformanceRequest.PayloadOneofCase.ProtobufPayload: { - if (request.MessageType.Equals("protobuf_test_messages.proto3.TestAllTypes")) + if (request.MessageType.Equals("protobuf_test_messages.proto3.TestAllTypesProto3")) { - message = ProtobufTestMessages.Proto3.TestAllTypes.Parser.ParseFrom(request.ProtobufPayload); + message = ProtobufTestMessages.Proto3.TestAllTypesProto3.Parser.ParseFrom(request.ProtobufPayload); } else if (request.MessageType.Equals("protobuf_test_messages.proto2.TestAllTypesProto2")) { diff --git a/src/google/protobuf/test_messages_proto2.proto b/src/google/protobuf/test_messages_proto2.proto index 58fb0060..cbe0d170 100644 --- a/src/google/protobuf/test_messages_proto2.proto +++ b/src/google/protobuf/test_messages_proto2.proto @@ -213,4 +213,4 @@ enum ForeignEnum { extend TestAllTypesProto2 { optional int32 extension_int32 = 120; -} \ No newline at end of file +} diff --git a/src/google/protobuf/test_messages_proto3.proto b/src/google/protobuf/test_messages_proto3.proto index 79230334..abf73427 100644 --- a/src/google/protobuf/test_messages_proto3.proto +++ b/src/google/protobuf/test_messages_proto3.proto @@ -59,10 +59,10 @@ option cc_enable_arenas = true; // submessages of this message. So for example, a fuzz test of TestAllTypes // could trigger bugs that occur in any message type in this file. We verify // this stays true in a unit test. -message TestAllTypes { +message TestAllTypesProto3 { message NestedMessage { int32 a = 1; - TestAllTypes corecursive = 2; + TestAllTypesProto3 corecursive = 2; } enum NestedEnum { @@ -98,7 +98,7 @@ message TestAllTypes { string optional_string_piece = 24 [ctype=STRING_PIECE]; string optional_cord = 25 [ctype=CORD]; - TestAllTypes recursive_message = 27; + TestAllTypesProto3 recursive_message = 27; // Repeated repeated int32 repeated_int32 = 31; -- cgit v1.2.3 From 5085102d96ce1e0b50c0c8a906217fdb5ec4a387 Mon Sep 17 00:00:00 2001 From: Yilun Chong Date: Fri, 30 Jun 2017 17:23:10 -0700 Subject: remove backup files --- conformance/conformance_objc.m~ | 188 --------------------------------------- conformance/conformance_php.php~ | 119 ------------------------- conformance/conformance_ruby.rb~ | 131 --------------------------- 3 files changed, 438 deletions(-) delete mode 100644 conformance/conformance_objc.m~ delete mode 100755 conformance/conformance_php.php~ delete mode 100755 conformance/conformance_ruby.rb~ (limited to 'conformance') diff --git a/conformance/conformance_objc.m~ b/conformance/conformance_objc.m~ deleted file mode 100644 index ba1c946f..00000000 --- a/conformance/conformance_objc.m~ +++ /dev/null @@ -1,188 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2015 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "Conformance.pbobjc.h" -#import "google/protobuf/TestMessagesProto3.pbobjc.h" - -static void Die(NSString *format, ...) __dead2; - -static BOOL verbose = NO; -static int32_t testCount = 0; - -static void Die(NSString *format, ...) { - va_list args; - va_start(args, format); - NSString *msg = [[NSString alloc] initWithFormat:format arguments:args]; - NSLog(@"%@", msg); - va_end(args); - [msg release]; - exit(66); -} - -static NSData *CheckedReadDataOfLength(NSFileHandle *handle, NSUInteger numBytes) { - NSData *data = [handle readDataOfLength:numBytes]; - NSUInteger dataLen = data.length; - if (dataLen == 0) { - return nil; // EOF. - } - if (dataLen != numBytes) { - Die(@"Failed to read the request length (%d), only got: %@", - numBytes, data); - } - return data; -} - -static ConformanceResponse *DoTest(ConformanceRequest *request) { - ConformanceResponse *response = [ConformanceResponse message]; - TestAllTypesProto3 *testMessage = nil; - - switch (request.payloadOneOfCase) { - case ConformanceRequest_Payload_OneOfCase_GPBUnsetOneOfCase: - Die(@"Request didn't have a payload: %@", request); - break; - - case ConformanceRequest_Payload_OneOfCase_ProtobufPayload: { - if ([request.messageType isEqualToString:@"protobuf_test_messages.proto3.TestAllTypesProto3"]) { - NSError *error = nil; - testMessage = [TestAllTypesProto3 parseFromData:request.protobufPayload - error:&error]; - if (!testMessage) { - response.parseError = - [NSString stringWithFormat:@"Parse error: %@", error]; - } - } else if ([request.messageType isEqualToString:@"protobuf_test_messages.proto2.TestAllTypesProto2"]) { - response.skipped = @"ObjC doesn't support proto2"; - break; - } else { - Die(@"Protobuf request doesn't have specific payload type"); - break; - } - break; - } - - case ConformanceRequest_Payload_OneOfCase_JsonPayload: - response.skipped = @"ObjC doesn't support parsing JSON"; - break; - } - - if (testMessage) { - switch (request.requestedOutputFormat) { - case WireFormat_GPBUnrecognizedEnumeratorValue: - case WireFormat_Unspecified: - Die(@"Unrecognized/unspecified output format: %@", request); - break; - - case WireFormat_Protobuf: - response.protobufPayload = testMessage.data; - if (!response.protobufPayload) { - response.serializeError = - [NSString stringWithFormat:@"Failed to make data from: %@", testMessage]; - } - break; - - case WireFormat_Json: - response.skipped = @"ObjC doesn't support generating JSON"; - break; - } - } - - return response; -} - -static uint32_t UInt32FromLittleEndianData(NSData *data) { - if (data.length != sizeof(uint32_t)) { - Die(@"Data not the right size for uint32_t: %@", data); - } - uint32_t value; - memcpy(&value, data.bytes, sizeof(uint32_t)); - return CFSwapInt32LittleToHost(value); -} - -static NSData *UInt32ToLittleEndianData(uint32_t num) { - uint32_t value = CFSwapInt32HostToLittle(num); - return [NSData dataWithBytes:&value length:sizeof(uint32_t)]; -} - -static BOOL DoTestIo(NSFileHandle *input, NSFileHandle *output) { - // See conformance_test_runner.cc for the wire format. - NSData *data = CheckedReadDataOfLength(input, sizeof(uint32_t)); - if (!data) { - // EOF. - return NO; - } - uint32_t numBytes = UInt32FromLittleEndianData(data); - data = CheckedReadDataOfLength(input, numBytes); - if (!data) { - Die(@"Failed to read request"); - } - - NSError *error = nil; - ConformanceRequest *request = [ConformanceRequest parseFromData:data - error:&error]; - if (!request) { - Die(@"Failed to parse the message data: %@", error); - } - - ConformanceResponse *response = DoTest(request); - if (!response) { - Die(@"Failed to make a reply from %@", request); - } - - data = response.data; - [output writeData:UInt32ToLittleEndianData((int32_t)data.length)]; - [output writeData:data]; - - if (verbose) { - NSLog(@"Request: %@", request); - NSLog(@"Response: %@", response); - } - - ++testCount; - return YES; -} - -int main(int argc, const char *argv[]) { - @autoreleasepool { - NSFileHandle *input = [[NSFileHandle fileHandleWithStandardInput] retain]; - NSFileHandle *output = [[NSFileHandle fileHandleWithStandardOutput] retain]; - - BOOL notDone = YES; - while (notDone) { - @autoreleasepool { - notDone = DoTestIo(input, output); - } - } - - NSLog(@"Received EOF from test runner after %d tests, exiting.", testCount); - } - return 0; -} diff --git a/conformance/conformance_php.php~ b/conformance/conformance_php.php~ deleted file mode 100755 index ca2292ad..00000000 --- a/conformance/conformance_php.php~ +++ /dev/null @@ -1,119 +0,0 @@ -getPayload() == "protobuf_payload") { - if ($request->getMessageType() == "protobuf_test_messages.proto3.TestAllTypes") { - try { - $test_message->mergeFromString($request->getProtobufPayload()); - } catch (Exception $e) { - $response->setParseError($e->getMessage()); - return $response; - } - } elseif ($request->getMessageType() == "protobuf_test_messages.proto2.TestAllTypesProto2") { - $response->setSkipped("PHP doesn't support proto2"); - return $response; - } else { - trigger_error("Protobuf request doesn't have specific payload type", E_USER_ERROR); - } - } elseif ($request->getPayload() == "json_payload") { - try { - $test_message->jsonDecode($request->getJsonPayload()); - } catch (Exception $e) { - $response->setParseError($e->getMessage()); - return $response; - } - } else { - trigger_error("Request didn't have payload.", E_USER_ERROR); - } - - if ($request->getRequestedOutputFormat() == WireFormat::UNSPECIFIED) { - trigger_error("Unspecified output format.", E_USER_ERROR); - } elseif ($request->getRequestedOutputFormat() == WireFormat::PROTOBUF) { - $response->setProtobufPayload($test_message->serializeToString()); - } elseif ($request->getRequestedOutputFormat() == WireFormat::JSON) { - $response->setJsonPayload($test_message->jsonEncode()); - } - - return $response; -} - -function doTestIO() -{ - $length_bytes = fread(STDIN, 4); - if (strlen($length_bytes) == 0) { - return false; # EOF - } elseif (strlen($length_bytes) != 4) { - trigger_error("I/O error", E_USER_ERROR); - } - - $length = unpack("V", $length_bytes)[1]; - $serialized_request = fread(STDIN, $length); - if (strlen($serialized_request) != $length) { - trigger_error("I/O error", E_USER_ERROR); - } - - $request = new \Conformance\ConformanceRequest(); - $request->mergeFromString($serialized_request); - - $response = doTest($request); - - $serialized_response = $response->serializeToString(); - fwrite(STDOUT, pack("V", strlen($serialized_response))); - fwrite(STDOUT, $serialized_response); - - $GLOBALS['test_count'] += 1; - - return true; -} - -while(true){ - if (!doTestIO()) { - fprintf(STDERR, - "conformance_php: received EOF from test runner " + - "after %d tests, exiting\n", $test_count); - exit; - } -} diff --git a/conformance/conformance_ruby.rb~ b/conformance/conformance_ruby.rb~ deleted file mode 100755 index df63bf7c..00000000 --- a/conformance/conformance_ruby.rb~ +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/env ruby -# -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# https://developers.google.com/protocol-buffers/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -require 'conformance_pb' -require 'google/protobuf/test_messages_proto3_pb' - -$test_count = 0 -$verbose = false - -def do_test(request) - test_message = ProtobufTestMessages::Proto3::TestAllTypesProto3.new - response = Conformance::ConformanceResponse.new - - begin - case request.payload - when :protobuf_payload - if request.message_type.eql?('protobuf_test_messages.proto3.TestAllTypesProto3') - begin - test_message = ProtobufTestMessages::Proto3::TestAllTypesProto3.decode( - request.protobuf_payload) - rescue Google::Protobuf::ParseError => err - response.parse_error = err.message.encode('utf-8') - return response - end - elsif request.message_type.eql?('protobuf_test_messages.proto2.TestAllTypesProto2') - response.skipped = "Ruby doesn't support proto2" - return response - else - fail "Protobuf request doesn't have specific payload type" - end - - when :json_payload - begin - test_message = ProtobufTestMessages::Proto3::TestAllTypesProto3.decode_json( - request.json_payload) - rescue Google::Protobuf::ParseError => err - response.parse_error = err.message.encode('utf-8') - return response - end - - when nil - fail "Request didn't have payload" - end - - case request.requested_output_format - when :UNSPECIFIED - fail 'Unspecified output format' - - when :PROTOBUF - response.protobuf_payload = test_message.to_proto - - when :JSON - response.json_payload = test_message.to_json - - when nil - fail "Request didn't have requested output format" - end - rescue StandardError => err - response.runtime_error = err.message.encode('utf-8') - end - - response -end - -# Returns true if the test ran successfully, false on legitimate EOF. -# If EOF is encountered in an unexpected place, raises IOError. -def do_test_io - length_bytes = STDIN.read(4) - return false if length_bytes.nil? - - length = length_bytes.unpack('V').first - serialized_request = STDIN.read(length) - if serialized_request.nil? || serialized_request.length != length - fail IOError - end - - request = Conformance::ConformanceRequest.decode(serialized_request) - - response = do_test(request) - - serialized_response = Conformance::ConformanceResponse.encode(response) - STDOUT.write([serialized_response.length].pack('V')) - STDOUT.write(serialized_response) - STDOUT.flush - - if $verbose - STDERR.puts("conformance_ruby: request=#{request.to_json}, " \ - "response=#{response.to_json}\n") - end - - $test_count += 1 - - true -end - -loop do - unless do_test_io - STDERR.puts('conformance_ruby: received EOF from test runner ' \ - "after #{$test_count} tests, exiting") - break - end -end -- cgit v1.2.3 From 726ba33d98cd06c268f88b7dedf2a9a7916d978d Mon Sep 17 00:00:00 2001 From: Yilun Chong Date: Fri, 30 Jun 2017 17:34:58 -0700 Subject: changed php's failing list --- conformance/failure_list_php.txt | 513 +------------------------------------ conformance/failure_list_php_c.txt | 32 +-- 2 files changed, 11 insertions(+), 534 deletions(-) (limited to 'conformance') diff --git a/conformance/failure_list_php.txt b/conformance/failure_list_php.txt index c7898bda..ab9413bf 100644 --- a/conformance/failure_list_php.txt +++ b/conformance/failure_list_php.txt @@ -1,117 +1,17 @@ Recommended.FieldMaskNumbersDontRoundTrip.JsonOutput Recommended.FieldMaskPathsDontRoundTrip.JsonOutput Recommended.FieldMaskTooManyUnderscore.JsonOutput -Recommended.Proto3.JsonInput.BoolFieldAllCapitalFalse -Recommended.Proto3.JsonInput.BoolFieldAllCapitalTrue -Recommended.Proto3.JsonInput.BoolFieldCamelCaseFalse -Recommended.Proto3.JsonInput.BoolFieldCamelCaseTrue -Recommended.Proto3.JsonInput.BoolFieldDoubleQuotedFalse -Recommended.Proto3.JsonInput.BoolFieldDoubleQuotedTrue -Recommended.Proto3.JsonInput.BoolFieldIntegerOne -Recommended.Proto3.JsonInput.BoolFieldIntegerZero -Recommended.Proto3.JsonInput.BoolMapFieldKeyNotQuoted -Recommended.Proto3.JsonInput.DoubleFieldInfinityNotQuoted -Recommended.Proto3.JsonInput.DoubleFieldNanNotQuoted -Recommended.Proto3.JsonInput.DoubleFieldNegativeInfinityNotQuoted Recommended.Proto3.JsonInput.DurationHas3FractionalDigits.Validator Recommended.Proto3.JsonInput.DurationHas6FractionalDigits.Validator Recommended.Proto3.JsonInput.DurationHas9FractionalDigits.Validator Recommended.Proto3.JsonInput.DurationHasZeroFractionalDigit.Validator -Recommended.Proto3.JsonInput.FieldMaskInvalidCharacter -Recommended.Proto3.JsonInput.FieldNameDuplicate -Recommended.Proto3.JsonInput.FieldNameDuplicateDifferentCasing1 -Recommended.Proto3.JsonInput.FieldNameDuplicateDifferentCasing2 -Recommended.Proto3.JsonInput.FieldNameNotQuoted -Recommended.Proto3.JsonInput.FieldNameWithDoubleUnderscores.JsonOutput -Recommended.Proto3.JsonInput.FieldNameWithDoubleUnderscores.ProtobufOutput -Recommended.Proto3.JsonInput.FieldNameWithDoubleUnderscores.Validator -Recommended.Proto3.JsonInput.FloatFieldInfinityNotQuoted -Recommended.Proto3.JsonInput.FloatFieldNanNotQuoted -Recommended.Proto3.JsonInput.FloatFieldNegativeInfinityNotQuoted -Recommended.Proto3.JsonInput.Int32MapFieldKeyNotQuoted -Recommended.Proto3.JsonInput.Int64FieldBeString.Validator -Recommended.Proto3.JsonInput.Int64MapFieldKeyNotQuoted -Recommended.Proto3.JsonInput.JsonWithComments -Recommended.Proto3.JsonInput.MapFieldKeyIsNull -Recommended.Proto3.JsonInput.MapFieldValueIsNull -Recommended.Proto3.JsonInput.MissingCommaMultiline -Recommended.Proto3.JsonInput.MissingCommaOneLine -Recommended.Proto3.JsonInput.MultilineNoSpaces.JsonOutput -Recommended.Proto3.JsonInput.MultilineNoSpaces.ProtobufOutput -Recommended.Proto3.JsonInput.MultilineWithSpaces.JsonOutput -Recommended.Proto3.JsonInput.MultilineWithSpaces.ProtobufOutput -Recommended.Proto3.JsonInput.OneLineNoSpaces.JsonOutput -Recommended.Proto3.JsonInput.OneLineNoSpaces.ProtobufOutput -Recommended.Proto3.JsonInput.OneLineWithSpaces.JsonOutput -Recommended.Proto3.JsonInput.OneLineWithSpaces.ProtobufOutput -Recommended.Proto3.JsonInput.OneofZeroBool.JsonOutput -Recommended.Proto3.JsonInput.OneofZeroBool.ProtobufOutput -Recommended.Proto3.JsonInput.OneofZeroBytes.JsonOutput -Recommended.Proto3.JsonInput.OneofZeroBytes.ProtobufOutput -Recommended.Proto3.JsonInput.OneofZeroDouble.JsonOutput -Recommended.Proto3.JsonInput.OneofZeroDouble.ProtobufOutput -Recommended.Proto3.JsonInput.OneofZeroEnum.JsonOutput -Recommended.Proto3.JsonInput.OneofZeroEnum.ProtobufOutput -Recommended.Proto3.JsonInput.OneofZeroFloat.JsonOutput -Recommended.Proto3.JsonInput.OneofZeroFloat.ProtobufOutput -Recommended.Proto3.JsonInput.OneofZeroMessage.JsonOutput -Recommended.Proto3.JsonInput.OneofZeroMessage.ProtobufOutput -Recommended.Proto3.JsonInput.OneofZeroString.JsonOutput -Recommended.Proto3.JsonInput.OneofZeroString.ProtobufOutput -Recommended.Proto3.JsonInput.OneofZeroUint32.JsonOutput -Recommended.Proto3.JsonInput.OneofZeroUint32.ProtobufOutput -Recommended.Proto3.JsonInput.OneofZeroUint64.JsonOutput -Recommended.Proto3.JsonInput.OneofZeroUint64.ProtobufOutput -Recommended.Proto3.JsonInput.RepeatedFieldMessageElementIsNull -Recommended.Proto3.JsonInput.RepeatedFieldPrimitiveElementIsNull -Recommended.Proto3.JsonInput.RepeatedFieldTrailingComma -Recommended.Proto3.JsonInput.RepeatedFieldTrailingCommaWithNewlines -Recommended.Proto3.JsonInput.RepeatedFieldTrailingCommaWithSpace -Recommended.Proto3.JsonInput.RepeatedFieldTrailingCommaWithSpaceCommaSpace -Recommended.Proto3.JsonInput.StringEndsWithEscapeChar -Recommended.Proto3.JsonInput.StringFieldInvalidEscape -Recommended.Proto3.JsonInput.StringFieldSingleQuoteBoth -Recommended.Proto3.JsonInput.StringFieldSingleQuoteKey -Recommended.Proto3.JsonInput.StringFieldSingleQuoteValue -Recommended.Proto3.JsonInput.StringFieldSurrogateInWrongOrder -Recommended.Proto3.JsonInput.StringFieldUnpairedHighSurrogate -Recommended.Proto3.JsonInput.StringFieldUnpairedLowSurrogate -Recommended.Proto3.JsonInput.StringFieldUnterminatedEscape -Recommended.Proto3.JsonInput.StringFieldUppercaseEscapeLetter Recommended.Proto3.JsonInput.TimestampHas3FractionalDigits.Validator Recommended.Proto3.JsonInput.TimestampHas6FractionalDigits.Validator Recommended.Proto3.JsonInput.TimestampHas9FractionalDigits.Validator Recommended.Proto3.JsonInput.TimestampHasZeroFractionalDigit.Validator Recommended.Proto3.JsonInput.TimestampZeroNormalized.Validator -Recommended.Proto3.JsonInput.TrailingCommaInAnObject -Recommended.Proto3.JsonInput.TrailingCommaInAnObjectWithNewlines -Recommended.Proto3.JsonInput.TrailingCommaInAnObjectWithSpace -Recommended.Proto3.JsonInput.TrailingCommaInAnObjectWithSpaceCommaSpace -Recommended.Proto3.JsonInput.Uint32MapFieldKeyNotQuoted -Recommended.Proto3.JsonInput.Uint64FieldBeString.Validator -Recommended.Proto3.JsonInput.Uint64MapFieldKeyNotQuoted -Recommended.Proto3.ProtobufInput.OneofZeroBool.JsonOutput -Recommended.Proto3.ProtobufInput.OneofZeroBool.ProtobufOutput -Recommended.Proto3.ProtobufInput.OneofZeroBytes.JsonOutput -Recommended.Proto3.ProtobufInput.OneofZeroBytes.ProtobufOutput -Recommended.Proto3.ProtobufInput.OneofZeroDouble.JsonOutput -Recommended.Proto3.ProtobufInput.OneofZeroDouble.ProtobufOutput -Recommended.Proto3.ProtobufInput.OneofZeroEnum.JsonOutput -Recommended.Proto3.ProtobufInput.OneofZeroEnum.ProtobufOutput -Recommended.Proto3.ProtobufInput.OneofZeroFloat.JsonOutput -Recommended.Proto3.ProtobufInput.OneofZeroFloat.ProtobufOutput -Recommended.Proto3.ProtobufInput.OneofZeroMessage.JsonOutput -Recommended.Proto3.ProtobufInput.OneofZeroMessage.ProtobufOutput -Recommended.Proto3.ProtobufInput.OneofZeroString.JsonOutput -Recommended.Proto3.ProtobufInput.OneofZeroString.ProtobufOutput -Recommended.Proto3.ProtobufInput.OneofZeroUint32.JsonOutput -Recommended.Proto3.ProtobufInput.OneofZeroUint32.ProtobufOutput -Recommended.Proto3.ProtobufInput.OneofZeroUint64.JsonOutput -Recommended.Proto3.ProtobufInput.OneofZeroUint64.ProtobufOutput Required.DurationProtoInputTooLarge.JsonOutput Required.DurationProtoInputTooSmall.JsonOutput -Required.Proto3.JsonInput.AllFieldAcceptNull.JsonOutput -Required.Proto3.JsonInput.AllFieldAcceptNull.ProtobufOutput Required.Proto3.JsonInput.Any.JsonOutput Required.Proto3.JsonInput.Any.ProtobufOutput Required.Proto3.JsonInput.AnyNested.JsonOutput @@ -132,141 +32,14 @@ Required.Proto3.JsonInput.AnyWithValueForInteger.JsonOutput Required.Proto3.JsonInput.AnyWithValueForInteger.ProtobufOutput Required.Proto3.JsonInput.AnyWithValueForJsonObject.JsonOutput Required.Proto3.JsonInput.AnyWithValueForJsonObject.ProtobufOutput -Required.Proto3.JsonInput.BoolFieldFalse.JsonOutput -Required.Proto3.JsonInput.BoolFieldFalse.ProtobufOutput -Required.Proto3.JsonInput.BoolFieldTrue.JsonOutput -Required.Proto3.JsonInput.BoolFieldTrue.ProtobufOutput -Required.Proto3.JsonInput.BoolMapEscapedKey.JsonOutput -Required.Proto3.JsonInput.BoolMapEscapedKey.ProtobufOutput -Required.Proto3.JsonInput.BoolMapField.JsonOutput -Required.Proto3.JsonInput.BoolMapField.ProtobufOutput -Required.Proto3.JsonInput.BytesField.JsonOutput -Required.Proto3.JsonInput.BytesField.ProtobufOutput -Required.Proto3.JsonInput.BytesFieldInvalidBase64Characters -Required.Proto3.JsonInput.BytesRepeatedField.JsonOutput -Required.Proto3.JsonInput.BytesRepeatedField.ProtobufOutput -Required.Proto3.JsonInput.DoubleFieldInfinity.JsonOutput -Required.Proto3.JsonInput.DoubleFieldInfinity.ProtobufOutput -Required.Proto3.JsonInput.DoubleFieldMaxNegativeValue.JsonOutput -Required.Proto3.JsonInput.DoubleFieldMaxNegativeValue.ProtobufOutput -Required.Proto3.JsonInput.DoubleFieldMaxPositiveValue.JsonOutput -Required.Proto3.JsonInput.DoubleFieldMaxPositiveValue.ProtobufOutput -Required.Proto3.JsonInput.DoubleFieldMinNegativeValue.JsonOutput -Required.Proto3.JsonInput.DoubleFieldMinNegativeValue.ProtobufOutput -Required.Proto3.JsonInput.DoubleFieldMinPositiveValue.JsonOutput -Required.Proto3.JsonInput.DoubleFieldMinPositiveValue.ProtobufOutput -Required.Proto3.JsonInput.DoubleFieldNan.JsonOutput -Required.Proto3.JsonInput.DoubleFieldNan.ProtobufOutput -Required.Proto3.JsonInput.DoubleFieldNegativeInfinity.JsonOutput -Required.Proto3.JsonInput.DoubleFieldNegativeInfinity.ProtobufOutput -Required.Proto3.JsonInput.DoubleFieldQuotedValue.JsonOutput -Required.Proto3.JsonInput.DoubleFieldQuotedValue.ProtobufOutput -Required.Proto3.JsonInput.DoubleFieldTooLarge -Required.Proto3.JsonInput.DoubleFieldTooSmall -Required.Proto3.JsonInput.DurationJsonInputTooLarge -Required.Proto3.JsonInput.DurationJsonInputTooSmall Required.Proto3.JsonInput.DurationMaxValue.JsonOutput Required.Proto3.JsonInput.DurationMaxValue.ProtobufOutput Required.Proto3.JsonInput.DurationMinValue.JsonOutput Required.Proto3.JsonInput.DurationMinValue.ProtobufOutput -Required.Proto3.JsonInput.DurationMissingS Required.Proto3.JsonInput.DurationRepeatedValue.JsonOutput Required.Proto3.JsonInput.DurationRepeatedValue.ProtobufOutput -Required.Proto3.JsonInput.EnumField.JsonOutput -Required.Proto3.JsonInput.EnumField.ProtobufOutput -Required.Proto3.JsonInput.EnumFieldNotQuoted -Required.Proto3.JsonInput.EnumFieldNumericValueNonZero.JsonOutput -Required.Proto3.JsonInput.EnumFieldNumericValueNonZero.ProtobufOutput -Required.Proto3.JsonInput.EnumFieldNumericValueZero.JsonOutput -Required.Proto3.JsonInput.EnumFieldNumericValueZero.ProtobufOutput -Required.Proto3.JsonInput.EnumFieldUnknownValue.Validator -Required.Proto3.JsonInput.EnumRepeatedField.JsonOutput -Required.Proto3.JsonInput.EnumRepeatedField.ProtobufOutput Required.Proto3.JsonInput.FieldMask.JsonOutput Required.Proto3.JsonInput.FieldMask.ProtobufOutput -Required.Proto3.JsonInput.FieldNameEscaped.JsonOutput -Required.Proto3.JsonInput.FieldNameEscaped.ProtobufOutput -Required.Proto3.JsonInput.FieldNameInLowerCamelCase.Validator -Required.Proto3.JsonInput.FieldNameInSnakeCase.JsonOutput -Required.Proto3.JsonInput.FieldNameInSnakeCase.ProtobufOutput -Required.Proto3.JsonInput.FieldNameWithMixedCases.JsonOutput -Required.Proto3.JsonInput.FieldNameWithMixedCases.ProtobufOutput -Required.Proto3.JsonInput.FieldNameWithMixedCases.Validator -Required.Proto3.JsonInput.FieldNameWithNumbers.JsonOutput -Required.Proto3.JsonInput.FieldNameWithNumbers.ProtobufOutput -Required.Proto3.JsonInput.FieldNameWithNumbers.Validator -Required.Proto3.JsonInput.FloatFieldInfinity.JsonOutput -Required.Proto3.JsonInput.FloatFieldInfinity.ProtobufOutput -Required.Proto3.JsonInput.FloatFieldMaxNegativeValue.JsonOutput -Required.Proto3.JsonInput.FloatFieldMaxNegativeValue.ProtobufOutput -Required.Proto3.JsonInput.FloatFieldMaxPositiveValue.JsonOutput -Required.Proto3.JsonInput.FloatFieldMaxPositiveValue.ProtobufOutput -Required.Proto3.JsonInput.FloatFieldMinNegativeValue.JsonOutput -Required.Proto3.JsonInput.FloatFieldMinNegativeValue.ProtobufOutput -Required.Proto3.JsonInput.FloatFieldMinPositiveValue.JsonOutput -Required.Proto3.JsonInput.FloatFieldMinPositiveValue.ProtobufOutput -Required.Proto3.JsonInput.FloatFieldNan.JsonOutput -Required.Proto3.JsonInput.FloatFieldNan.ProtobufOutput -Required.Proto3.JsonInput.FloatFieldNegativeInfinity.JsonOutput -Required.Proto3.JsonInput.FloatFieldNegativeInfinity.ProtobufOutput -Required.Proto3.JsonInput.FloatFieldQuotedValue.JsonOutput -Required.Proto3.JsonInput.FloatFieldQuotedValue.ProtobufOutput -Required.Proto3.JsonInput.FloatFieldTooLarge -Required.Proto3.JsonInput.FloatFieldTooSmall -Required.Proto3.JsonInput.HelloWorld.JsonOutput -Required.Proto3.JsonInput.HelloWorld.ProtobufOutput -Required.Proto3.JsonInput.Int32FieldExponentialFormat.JsonOutput -Required.Proto3.JsonInput.Int32FieldExponentialFormat.ProtobufOutput -Required.Proto3.JsonInput.Int32FieldFloatTrailingZero.JsonOutput -Required.Proto3.JsonInput.Int32FieldFloatTrailingZero.ProtobufOutput -Required.Proto3.JsonInput.Int32FieldLeadingSpace -Required.Proto3.JsonInput.Int32FieldLeadingZero -Required.Proto3.JsonInput.Int32FieldMaxFloatValue.JsonOutput -Required.Proto3.JsonInput.Int32FieldMaxFloatValue.ProtobufOutput -Required.Proto3.JsonInput.Int32FieldMaxValue.JsonOutput -Required.Proto3.JsonInput.Int32FieldMaxValue.ProtobufOutput -Required.Proto3.JsonInput.Int32FieldMinFloatValue.JsonOutput -Required.Proto3.JsonInput.Int32FieldMinFloatValue.ProtobufOutput -Required.Proto3.JsonInput.Int32FieldMinValue.JsonOutput -Required.Proto3.JsonInput.Int32FieldMinValue.ProtobufOutput -Required.Proto3.JsonInput.Int32FieldNegativeWithLeadingZero -Required.Proto3.JsonInput.Int32FieldNotInteger -Required.Proto3.JsonInput.Int32FieldNotNumber -Required.Proto3.JsonInput.Int32FieldPlusSign -Required.Proto3.JsonInput.Int32FieldStringValue.JsonOutput -Required.Proto3.JsonInput.Int32FieldStringValue.ProtobufOutput -Required.Proto3.JsonInput.Int32FieldStringValueEscaped.JsonOutput -Required.Proto3.JsonInput.Int32FieldStringValueEscaped.ProtobufOutput -Required.Proto3.JsonInput.Int32FieldTooLarge -Required.Proto3.JsonInput.Int32FieldTooSmall -Required.Proto3.JsonInput.Int32FieldTrailingSpace -Required.Proto3.JsonInput.Int32MapEscapedKey.JsonOutput -Required.Proto3.JsonInput.Int32MapEscapedKey.ProtobufOutput -Required.Proto3.JsonInput.Int32MapField.JsonOutput -Required.Proto3.JsonInput.Int32MapField.ProtobufOutput -Required.Proto3.JsonInput.Int64FieldMaxValue.JsonOutput -Required.Proto3.JsonInput.Int64FieldMaxValue.ProtobufOutput -Required.Proto3.JsonInput.Int64FieldMaxValueNotQuoted.JsonOutput -Required.Proto3.JsonInput.Int64FieldMaxValueNotQuoted.ProtobufOutput -Required.Proto3.JsonInput.Int64FieldMinValue.JsonOutput -Required.Proto3.JsonInput.Int64FieldMinValue.ProtobufOutput -Required.Proto3.JsonInput.Int64FieldMinValueNotQuoted.JsonOutput -Required.Proto3.JsonInput.Int64FieldMinValueNotQuoted.ProtobufOutput -Required.Proto3.JsonInput.Int64FieldNotInteger -Required.Proto3.JsonInput.Int64FieldNotNumber -Required.Proto3.JsonInput.Int64FieldTooLarge -Required.Proto3.JsonInput.Int64FieldTooSmall -Required.Proto3.JsonInput.Int64MapEscapedKey.JsonOutput -Required.Proto3.JsonInput.Int64MapEscapedKey.ProtobufOutput -Required.Proto3.JsonInput.Int64MapField.JsonOutput -Required.Proto3.JsonInput.Int64MapField.ProtobufOutput -Required.Proto3.JsonInput.MessageField.JsonOutput -Required.Proto3.JsonInput.MessageField.ProtobufOutput -Required.Proto3.JsonInput.MessageMapField.JsonOutput -Required.Proto3.JsonInput.MessageMapField.ProtobufOutput -Required.Proto3.JsonInput.MessageRepeatedField.JsonOutput -Required.Proto3.JsonInput.MessageRepeatedField.ProtobufOutput -Required.Proto3.JsonInput.OneofFieldDuplicate Required.Proto3.JsonInput.OptionalBoolWrapper.JsonOutput Required.Proto3.JsonInput.OptionalBoolWrapper.ProtobufOutput Required.Proto3.JsonInput.OptionalBytesWrapper.JsonOutput @@ -287,25 +60,12 @@ Required.Proto3.JsonInput.OptionalUint64Wrapper.JsonOutput Required.Proto3.JsonInput.OptionalUint64Wrapper.ProtobufOutput Required.Proto3.JsonInput.OptionalWrapperTypesWithNonDefaultValue.JsonOutput Required.Proto3.JsonInput.OptionalWrapperTypesWithNonDefaultValue.ProtobufOutput -Required.Proto3.JsonInput.OriginalProtoFieldName.JsonOutput -Required.Proto3.JsonInput.OriginalProtoFieldName.ProtobufOutput -Required.Proto3.JsonInput.PrimitiveRepeatedField.JsonOutput -Required.Proto3.JsonInput.PrimitiveRepeatedField.ProtobufOutput Required.Proto3.JsonInput.RepeatedBoolWrapper.JsonOutput Required.Proto3.JsonInput.RepeatedBoolWrapper.ProtobufOutput Required.Proto3.JsonInput.RepeatedBytesWrapper.JsonOutput Required.Proto3.JsonInput.RepeatedBytesWrapper.ProtobufOutput Required.Proto3.JsonInput.RepeatedDoubleWrapper.JsonOutput Required.Proto3.JsonInput.RepeatedDoubleWrapper.ProtobufOutput -Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotBool -Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotMessage -Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingIntegersGotString -Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingMessagesGotBool -Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingMessagesGotInt -Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingMessagesGotString -Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotBool -Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotInt -Required.Proto3.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotMessage Required.Proto3.JsonInput.RepeatedFloatWrapper.JsonOutput Required.Proto3.JsonInput.RepeatedFloatWrapper.ProtobufOutput Required.Proto3.JsonInput.RepeatedInt32Wrapper.JsonOutput @@ -318,29 +78,8 @@ Required.Proto3.JsonInput.RepeatedUint32Wrapper.JsonOutput Required.Proto3.JsonInput.RepeatedUint32Wrapper.ProtobufOutput Required.Proto3.JsonInput.RepeatedUint64Wrapper.JsonOutput Required.Proto3.JsonInput.RepeatedUint64Wrapper.ProtobufOutput -Required.Proto3.JsonInput.StringField.JsonOutput -Required.Proto3.JsonInput.StringField.ProtobufOutput -Required.Proto3.JsonInput.StringFieldEscape.JsonOutput -Required.Proto3.JsonInput.StringFieldEscape.ProtobufOutput -Required.Proto3.JsonInput.StringFieldNotAString -Required.Proto3.JsonInput.StringFieldSurrogatePair.JsonOutput -Required.Proto3.JsonInput.StringFieldSurrogatePair.ProtobufOutput -Required.Proto3.JsonInput.StringFieldUnicode.JsonOutput -Required.Proto3.JsonInput.StringFieldUnicode.ProtobufOutput -Required.Proto3.JsonInput.StringFieldUnicodeEscape.JsonOutput -Required.Proto3.JsonInput.StringFieldUnicodeEscape.ProtobufOutput -Required.Proto3.JsonInput.StringFieldUnicodeEscapeWithLowercaseHexLetters.JsonOutput -Required.Proto3.JsonInput.StringFieldUnicodeEscapeWithLowercaseHexLetters.ProtobufOutput -Required.Proto3.JsonInput.StringRepeatedField.JsonOutput -Required.Proto3.JsonInput.StringRepeatedField.ProtobufOutput Required.Proto3.JsonInput.Struct.JsonOutput Required.Proto3.JsonInput.Struct.ProtobufOutput -Required.Proto3.JsonInput.TimestampJsonInputLowercaseT -Required.Proto3.JsonInput.TimestampJsonInputLowercaseZ -Required.Proto3.JsonInput.TimestampJsonInputMissingT -Required.Proto3.JsonInput.TimestampJsonInputMissingZ -Required.Proto3.JsonInput.TimestampJsonInputTooLarge -Required.Proto3.JsonInput.TimestampJsonInputTooSmall Required.Proto3.JsonInput.TimestampMaxValue.JsonOutput Required.Proto3.JsonInput.TimestampMaxValue.ProtobufOutput Required.Proto3.JsonInput.TimestampMinValue.JsonOutput @@ -351,24 +90,6 @@ Required.Proto3.JsonInput.TimestampWithNegativeOffset.JsonOutput Required.Proto3.JsonInput.TimestampWithNegativeOffset.ProtobufOutput Required.Proto3.JsonInput.TimestampWithPositiveOffset.JsonOutput Required.Proto3.JsonInput.TimestampWithPositiveOffset.ProtobufOutput -Required.Proto3.JsonInput.Uint32FieldMaxFloatValue.JsonOutput -Required.Proto3.JsonInput.Uint32FieldMaxFloatValue.ProtobufOutput -Required.Proto3.JsonInput.Uint32FieldMaxValue.JsonOutput -Required.Proto3.JsonInput.Uint32FieldMaxValue.ProtobufOutput -Required.Proto3.JsonInput.Uint32FieldNotInteger -Required.Proto3.JsonInput.Uint32FieldNotNumber -Required.Proto3.JsonInput.Uint32FieldTooLarge -Required.Proto3.JsonInput.Uint32MapField.JsonOutput -Required.Proto3.JsonInput.Uint32MapField.ProtobufOutput -Required.Proto3.JsonInput.Uint64FieldMaxValue.JsonOutput -Required.Proto3.JsonInput.Uint64FieldMaxValue.ProtobufOutput -Required.Proto3.JsonInput.Uint64FieldMaxValueNotQuoted.JsonOutput -Required.Proto3.JsonInput.Uint64FieldMaxValueNotQuoted.ProtobufOutput -Required.Proto3.JsonInput.Uint64FieldNotInteger -Required.Proto3.JsonInput.Uint64FieldNotNumber -Required.Proto3.JsonInput.Uint64FieldTooLarge -Required.Proto3.JsonInput.Uint64MapField.JsonOutput -Required.Proto3.JsonInput.Uint64MapField.ProtobufOutput Required.Proto3.JsonInput.ValueAcceptBool.JsonOutput Required.Proto3.JsonInput.ValueAcceptBool.ProtobufOutput Required.Proto3.JsonInput.ValueAcceptFloat.JsonOutput @@ -383,230 +104,16 @@ Required.Proto3.JsonInput.ValueAcceptObject.JsonOutput Required.Proto3.JsonInput.ValueAcceptObject.ProtobufOutput Required.Proto3.JsonInput.ValueAcceptString.JsonOutput Required.Proto3.JsonInput.ValueAcceptString.ProtobufOutput -Required.Proto3.JsonInput.WrapperTypesWithNullValue.JsonOutput -Required.Proto3.JsonInput.WrapperTypesWithNullValue.ProtobufOutput -Required.Proto3.ProtobufInput.DoubleFieldNormalizeQuietNan.JsonOutput -Required.Proto3.ProtobufInput.DoubleFieldNormalizeSignalingNan.JsonOutput -Required.Proto3.ProtobufInput.FloatFieldNormalizeQuietNan.JsonOutput -Required.Proto3.ProtobufInput.FloatFieldNormalizeSignalingNan.JsonOutput -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.BOOL -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.BYTES -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.DOUBLE -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.ENUM -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.FIXED32 -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.FIXED64 -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.FLOAT -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.INT32 -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.INT64 -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.MESSAGE -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.SFIXED32 -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.SFIXED64 -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.SINT32 -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.SINT64 -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.STRING -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.UINT32 -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownNonRepeatedValue.UINT64 -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.BOOL -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.BYTES -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.DOUBLE -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.ENUM -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.FIXED32 -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.FIXED64 -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.FLOAT -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.INT32 -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.INT64 -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.MESSAGE -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.SFIXED32 -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.SFIXED64 -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.SINT32 -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.SINT64 -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.STRING -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.UINT32 -Required.Proto3.ProtobufInput.PrematureEofBeforeKnownRepeatedValue.UINT64 -Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.BOOL -Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.BYTES -Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.DOUBLE -Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.ENUM -Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.FIXED32 -Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.FIXED64 -Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.FLOAT -Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.INT32 -Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.INT64 -Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.MESSAGE -Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.SFIXED32 -Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.SFIXED64 -Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.SINT32 -Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.SINT64 -Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.STRING -Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.UINT32 -Required.Proto3.ProtobufInput.PrematureEofBeforeUnknownValue.UINT64 -Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.BYTES -Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.MESSAGE -Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForKnownNonRepeatedValue.STRING -Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.BYTES -Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.MESSAGE -Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForKnownRepeatedValue.STRING -Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForUnknownValue.BYTES -Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForUnknownValue.MESSAGE -Required.Proto3.ProtobufInput.PrematureEofInDelimitedDataForUnknownValue.STRING -Required.Proto3.ProtobufInput.PrematureEofInPackedField.BOOL -Required.Proto3.ProtobufInput.PrematureEofInPackedField.DOUBLE -Required.Proto3.ProtobufInput.PrematureEofInPackedField.ENUM -Required.Proto3.ProtobufInput.PrematureEofInPackedField.FIXED32 -Required.Proto3.ProtobufInput.PrematureEofInPackedField.FIXED64 -Required.Proto3.ProtobufInput.PrematureEofInPackedField.FLOAT -Required.Proto3.ProtobufInput.PrematureEofInPackedField.INT32 -Required.Proto3.ProtobufInput.PrematureEofInPackedField.INT64 -Required.Proto3.ProtobufInput.PrematureEofInPackedField.SFIXED32 -Required.Proto3.ProtobufInput.PrematureEofInPackedField.SFIXED64 -Required.Proto3.ProtobufInput.PrematureEofInPackedField.SINT32 -Required.Proto3.ProtobufInput.PrematureEofInPackedField.SINT64 -Required.Proto3.ProtobufInput.PrematureEofInPackedField.UINT32 -Required.Proto3.ProtobufInput.PrematureEofInPackedField.UINT64 -Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.BOOL -Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.DOUBLE -Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.ENUM -Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.FIXED32 -Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.FIXED64 -Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.FLOAT -Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.INT32 -Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.INT64 -Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.SFIXED32 -Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.SFIXED64 -Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.SINT32 -Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.SINT64 -Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.UINT32 -Required.Proto3.ProtobufInput.PrematureEofInPackedFieldValue.UINT64 -Required.Proto3.ProtobufInput.PrematureEofInSubmessageValue.MESSAGE -Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.BOOL -Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.BYTES -Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.DOUBLE -Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.ENUM -Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.FIXED32 -Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.FIXED64 -Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.FLOAT -Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.INT32 -Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.INT64 -Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.MESSAGE -Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.SFIXED32 -Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.SFIXED64 -Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.SINT32 -Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.SINT64 -Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.STRING -Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.UINT32 -Required.Proto3.ProtobufInput.PrematureEofInsideKnownNonRepeatedValue.UINT64 -Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.BOOL -Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.BYTES -Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.DOUBLE -Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.ENUM -Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.FIXED32 -Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.FIXED64 -Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.FLOAT -Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.INT32 -Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.INT64 -Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.MESSAGE -Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.SFIXED32 -Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.SFIXED64 -Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.SINT32 -Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.SINT64 -Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.STRING -Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.UINT32 -Required.Proto3.ProtobufInput.PrematureEofInsideKnownRepeatedValue.UINT64 -Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.BOOL -Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.BYTES -Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.DOUBLE -Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.ENUM -Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.FIXED32 -Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.FIXED64 -Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.FLOAT -Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.INT32 -Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.INT64 -Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.MESSAGE -Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.SFIXED32 -Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.SFIXED64 -Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.SINT32 -Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.SINT64 -Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.STRING -Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.UINT32 -Required.Proto3.ProtobufInput.PrematureEofInsideUnknownValue.UINT64 -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.BOOL.JsonOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.BOOL.ProtobufOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.DOUBLE.JsonOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.DOUBLE.ProtobufOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.FIXED32.JsonOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.FIXED32.ProtobufOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.FIXED64.JsonOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.FIXED64.ProtobufOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.FLOAT.JsonOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.FLOAT.ProtobufOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.INT32.JsonOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.INT32.ProtobufOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.INT64.JsonOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.INT64.ProtobufOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.SFIXED32.JsonOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.SFIXED32.ProtobufOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.SFIXED64.JsonOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.SFIXED64.ProtobufOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.SINT32.JsonOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.SINT32.ProtobufOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.SINT64.JsonOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.SINT64.ProtobufOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.UINT32.JsonOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.UINT32.ProtobufOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.UINT64.JsonOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.UINT64.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.BOOL.JsonOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.BOOL.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.JsonOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.JsonOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.FIXED32.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.JsonOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.FIXED64.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.JsonOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.INT32.JsonOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.INT32.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.INT64.JsonOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.INT64.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.JsonOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.SFIXED32.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.JsonOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.SFIXED64.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.SINT32.JsonOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.SINT32.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.SINT64.JsonOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.SINT64.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.UINT32.JsonOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.UINT32.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.UINT64.JsonOutput -Required.Proto3.ProtobufInput.ValidDataRepeated.UINT64.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataScalar.BOOL.JsonOutput -Required.Proto3.ProtobufInput.ValidDataScalar.BOOL.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataScalar.DOUBLE.JsonOutput -Required.Proto3.ProtobufInput.ValidDataScalar.DOUBLE.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataScalar.FIXED32.JsonOutput -Required.Proto3.ProtobufInput.ValidDataScalar.FIXED32.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataScalar.FIXED64.JsonOutput -Required.Proto3.ProtobufInput.ValidDataScalar.FIXED64.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataScalar.FLOAT.JsonOutput -Required.Proto3.ProtobufInput.ValidDataScalar.FLOAT.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataScalar.INT32.JsonOutput -Required.Proto3.ProtobufInput.ValidDataScalar.INT32.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataScalar.INT64.JsonOutput -Required.Proto3.ProtobufInput.ValidDataScalar.INT64.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataScalar.SFIXED32.JsonOutput -Required.Proto3.ProtobufInput.ValidDataScalar.SFIXED32.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataScalar.SFIXED64.JsonOutput -Required.Proto3.ProtobufInput.ValidDataScalar.SFIXED64.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataScalar.SINT32.JsonOutput -Required.Proto3.ProtobufInput.ValidDataScalar.SINT32.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataScalar.SINT64.JsonOutput -Required.Proto3.ProtobufInput.ValidDataScalar.SINT64.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataScalar.UINT32.JsonOutput -Required.Proto3.ProtobufInput.ValidDataScalar.UINT32.ProtobufOutput -Required.Proto3.ProtobufInput.ValidDataScalar.UINT64.JsonOutput -Required.Proto3.ProtobufInput.ValidDataScalar.UINT64.ProtobufOutput Required.TimestampProtoInputTooLarge.JsonOutput Required.TimestampProtoInputTooSmall.JsonOutput +Required.Proto3.JsonInput.FloatFieldTooLarge +Required.Proto3.JsonInput.FloatFieldTooSmall +Required.Proto3.JsonInput.DoubleFieldTooSmall +Required.Proto3.JsonInput.Int32FieldNotInteger +Required.Proto3.JsonInput.Int64FieldNotInteger +Required.Proto3.JsonInput.Uint32FieldNotInteger +Required.Proto3.JsonInput.Uint64FieldNotInteger +Required.Proto3.JsonInput.Int32FieldLeadingSpace +Required.Proto3.JsonInput.OneofFieldDuplicate +Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.JsonOutput Recommended.Proto3.ProtobufInput.OneofZeroMessageSetTwice.JsonOutput diff --git a/conformance/failure_list_php_c.txt b/conformance/failure_list_php_c.txt index 0fb8e949..2d23da16 100644 --- a/conformance/failure_list_php_c.txt +++ b/conformance/failure_list_php_c.txt @@ -9,22 +9,10 @@ Recommended.Proto3.JsonInput.DurationHas9FractionalDigits.Validator Recommended.Proto3.JsonInput.DurationHasZeroFractionalDigit.Validator Recommended.Proto3.JsonInput.Int64FieldBeString.Validator Recommended.Proto3.JsonInput.MapFieldValueIsNull -Recommended.Proto3.JsonInput.OneofZeroBool.JsonOutput -Recommended.Proto3.JsonInput.OneofZeroBool.ProtobufOutput Recommended.Proto3.JsonInput.OneofZeroBytes.JsonOutput Recommended.Proto3.JsonInput.OneofZeroBytes.ProtobufOutput -Recommended.Proto3.JsonInput.OneofZeroDouble.JsonOutput -Recommended.Proto3.JsonInput.OneofZeroDouble.ProtobufOutput -Recommended.Proto3.JsonInput.OneofZeroEnum.JsonOutput -Recommended.Proto3.JsonInput.OneofZeroEnum.ProtobufOutput -Recommended.Proto3.JsonInput.OneofZeroFloat.JsonOutput -Recommended.Proto3.JsonInput.OneofZeroFloat.ProtobufOutput Recommended.Proto3.JsonInput.OneofZeroString.JsonOutput Recommended.Proto3.JsonInput.OneofZeroString.ProtobufOutput -Recommended.Proto3.JsonInput.OneofZeroUint32.JsonOutput -Recommended.Proto3.JsonInput.OneofZeroUint32.ProtobufOutput -Recommended.Proto3.JsonInput.OneofZeroUint64.JsonOutput -Recommended.Proto3.JsonInput.OneofZeroUint64.ProtobufOutput Recommended.Proto3.JsonInput.RepeatedFieldMessageElementIsNull Recommended.Proto3.JsonInput.RepeatedFieldPrimitiveElementIsNull Recommended.Proto3.JsonInput.StringEndsWithEscapeChar @@ -37,25 +25,12 @@ Recommended.Proto3.JsonInput.TimestampHas9FractionalDigits.Validator Recommended.Proto3.JsonInput.TimestampHasZeroFractionalDigit.Validator Recommended.Proto3.JsonInput.TimestampZeroNormalized.Validator Recommended.Proto3.JsonInput.Uint64FieldBeString.Validator -Recommended.Proto3.ProtobufInput.OneofZeroBool.JsonOutput -Recommended.Proto3.ProtobufInput.OneofZeroBool.ProtobufOutput Recommended.Proto3.ProtobufInput.OneofZeroBytes.JsonOutput Recommended.Proto3.ProtobufInput.OneofZeroBytes.ProtobufOutput -Recommended.Proto3.ProtobufInput.OneofZeroDouble.JsonOutput -Recommended.Proto3.ProtobufInput.OneofZeroDouble.ProtobufOutput -Recommended.Proto3.ProtobufInput.OneofZeroEnum.JsonOutput -Recommended.Proto3.ProtobufInput.OneofZeroEnum.ProtobufOutput -Recommended.Proto3.ProtobufInput.OneofZeroFloat.JsonOutput -Recommended.Proto3.ProtobufInput.OneofZeroFloat.ProtobufOutput Recommended.Proto3.ProtobufInput.OneofZeroString.JsonOutput Recommended.Proto3.ProtobufInput.OneofZeroString.ProtobufOutput -Recommended.Proto3.ProtobufInput.OneofZeroUint32.JsonOutput -Recommended.Proto3.ProtobufInput.OneofZeroUint32.ProtobufOutput -Recommended.Proto3.ProtobufInput.OneofZeroUint64.JsonOutput -Recommended.Proto3.ProtobufInput.OneofZeroUint64.ProtobufOutput Required.DurationProtoInputTooLarge.JsonOutput Required.DurationProtoInputTooSmall.JsonOutput -Required.Proto3.JsonInput.AllFieldAcceptNull.ProtobufOutput Required.Proto3.JsonInput.Any.JsonOutput Required.Proto3.JsonInput.Any.ProtobufOutput Required.Proto3.JsonInput.AnyNested.JsonOutput @@ -76,7 +51,6 @@ Required.Proto3.JsonInput.AnyWithValueForInteger.JsonOutput Required.Proto3.JsonInput.AnyWithValueForInteger.ProtobufOutput Required.Proto3.JsonInput.AnyWithValueForJsonObject.JsonOutput Required.Proto3.JsonInput.AnyWithValueForJsonObject.ProtobufOutput -Required.Proto3.JsonInput.BoolFieldFalse.ProtobufOutput Required.Proto3.JsonInput.BoolMapField.JsonOutput Required.Proto3.JsonInput.DoubleFieldInfinity.JsonOutput Required.Proto3.JsonInput.DoubleFieldInfinity.ProtobufOutput @@ -100,7 +74,6 @@ Required.Proto3.JsonInput.DurationMinValue.JsonOutput Required.Proto3.JsonInput.DurationMinValue.ProtobufOutput Required.Proto3.JsonInput.DurationRepeatedValue.JsonOutput Required.Proto3.JsonInput.DurationRepeatedValue.ProtobufOutput -Required.Proto3.JsonInput.EnumField.ProtobufOutput Required.Proto3.JsonInput.EnumFieldNumericValueNonZero.JsonOutput Required.Proto3.JsonInput.EnumFieldNumericValueNonZero.ProtobufOutput Required.Proto3.JsonInput.EnumFieldNumericValueZero.JsonOutput @@ -215,14 +188,11 @@ Required.Proto3.JsonInput.ValueAcceptObject.JsonOutput Required.Proto3.JsonInput.ValueAcceptObject.ProtobufOutput Required.Proto3.JsonInput.ValueAcceptString.JsonOutput Required.Proto3.JsonInput.ValueAcceptString.ProtobufOutput -Required.Proto3.JsonInput.WrapperTypesWithNullValue.ProtobufOutput Required.Proto3.ProtobufInput.DoubleFieldNormalizeQuietNan.JsonOutput Required.Proto3.ProtobufInput.DoubleFieldNormalizeSignalingNan.JsonOutput Required.Proto3.ProtobufInput.FloatFieldNormalizeQuietNan.JsonOutput Required.Proto3.ProtobufInput.FloatFieldNormalizeSignalingNan.JsonOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.FIXED32.ProtobufOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.FIXED64.ProtobufOutput -Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.UINT64.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.JsonOutput Required.TimestampProtoInputTooLarge.JsonOutput Required.TimestampProtoInputTooSmall.JsonOutput Recommended.Proto3.ProtobufInput.OneofZeroMessageSetTwice.JsonOutput -- cgit v1.2.3 From cbf7dfb3233925639de99c2e3aea4c4676e886ad Mon Sep 17 00:00:00 2001 From: Yilun Chong Date: Wed, 5 Jul 2017 09:48:40 -0700 Subject: fix php failing list and csharp generated proto --- conformance/failure_list_php.txt | 1 - conformance/failure_list_php_c.txt | 1 - csharp/src/Google.Protobuf.Conformance/Program.cs~ | 155 ++++++++ .../TestProtos/TestMessagesProto3.cs | 426 +++++++++++---------- 4 files changed, 370 insertions(+), 213 deletions(-) create mode 100644 csharp/src/Google.Protobuf.Conformance/Program.cs~ (limited to 'conformance') diff --git a/conformance/failure_list_php.txt b/conformance/failure_list_php.txt index ab9413bf..e06d07a1 100644 --- a/conformance/failure_list_php.txt +++ b/conformance/failure_list_php.txt @@ -116,4 +116,3 @@ Required.Proto3.JsonInput.Uint64FieldNotInteger Required.Proto3.JsonInput.Int32FieldLeadingSpace Required.Proto3.JsonInput.OneofFieldDuplicate Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.JsonOutput -Recommended.Proto3.ProtobufInput.OneofZeroMessageSetTwice.JsonOutput diff --git a/conformance/failure_list_php_c.txt b/conformance/failure_list_php_c.txt index 2d23da16..2e378842 100644 --- a/conformance/failure_list_php_c.txt +++ b/conformance/failure_list_php_c.txt @@ -195,4 +195,3 @@ Required.Proto3.ProtobufInput.FloatFieldNormalizeSignalingNan.JsonOutput Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.JsonOutput Required.TimestampProtoInputTooLarge.JsonOutput Required.TimestampProtoInputTooSmall.JsonOutput -Recommended.Proto3.ProtobufInput.OneofZeroMessageSetTwice.JsonOutput diff --git a/csharp/src/Google.Protobuf.Conformance/Program.cs~ b/csharp/src/Google.Protobuf.Conformance/Program.cs~ new file mode 100644 index 00000000..96dc354e --- /dev/null +++ b/csharp/src/Google.Protobuf.Conformance/Program.cs~ @@ -0,0 +1,155 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2015 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#endregion + +using Conformance; +using Google.Protobuf.Reflection; +using System; +using System.IO; + +namespace Google.Protobuf.Conformance +{ + /// + /// Conformance tests. The test runner will provide JSON or proto data on stdin, + /// and this program will produce its output on stdout. + /// + class Program + { + private static void Main(string[] args) + { + // This way we get the binary streams instead of readers/writers. + var input = new BinaryReader(Console.OpenStandardInput()); + var output = new BinaryWriter(Console.OpenStandardOutput()); + var typeRegistry = TypeRegistry.FromMessages(ProtobufTestMessages.Proto3.TestAllTypesProto3.Descriptor); + + int count = 0; + while (RunTest(input, output, typeRegistry)) + { + count++; + } + Console.Error.WriteLine("Received EOF after {0} tests", count); + } + + private static bool RunTest(BinaryReader input, BinaryWriter output, TypeRegistry typeRegistry) + { + int? size = ReadInt32(input); + if (size == null) + { + return false; + } + byte[] inputData = input.ReadBytes(size.Value); + if (inputData.Length != size.Value) + { + throw new EndOfStreamException("Read " + inputData.Length + " bytes of data when expecting " + size); + } + ConformanceRequest request = ConformanceRequest.Parser.ParseFrom(inputData); + ConformanceResponse response = PerformRequest(request, typeRegistry); + byte[] outputData = response.ToByteArray(); + output.Write(outputData.Length); + output.Write(outputData); + // Ready for another test... + return true; + } + + private static ConformanceResponse PerformRequest(ConformanceRequest request, TypeRegistry typeRegistry) + { + ProtobufTestMessages.Proto3.TestAllTypesProto3 message; + try + { + switch (request.PayloadCase) + { + case ConformanceRequest.PayloadOneofCase.JsonPayload: + var parser = new JsonParser(new JsonParser.Settings(20, typeRegistry)); + message = parser.Parse(request.JsonPayload); + break; + case ConformanceRequest.PayloadOneofCase.ProtobufPayload: + { + if (request.MessageType.Equals("protobuf_test_messages.proto3.TestAllTypesProto3")) + { + message = ProtobufTestMessages.Proto3.TestAllTypesProto3.Parser.ParseFrom(request.ProtobufPayload); + } + else if (request.MessageType.Equals("protobuf_test_messages.proto2.TestAllTypesProto2")) + { + return new ConformanceResponse { Skipped = "CSharp doesn't support proto2" }; + } + else + { + throw new Exception(" Protobuf request doesn't have specific payload type"); + } + break; + } + default: + throw new Exception("Unsupported request payload: " + request.PayloadCase); + } + } + catch (InvalidProtocolBufferException e) + { + return new ConformanceResponse { ParseError = e.Message }; + } + catch (InvalidJsonException e) + { + return new ConformanceResponse { ParseError = e.Message }; + } + try + { + switch (request.RequestedOutputFormat) + { + case global::Conformance.WireFormat.Json: + var formatter = new JsonFormatter(new JsonFormatter.Settings(false, typeRegistry)); + return new ConformanceResponse { JsonPayload = formatter.Format(message) }; + case global::Conformance.WireFormat.Protobuf: + return new ConformanceResponse { ProtobufPayload = message.ToByteString() }; + default: + throw new Exception("Unsupported request output format: " + request.PayloadCase); + } + } + catch (InvalidOperationException e) + { + return new ConformanceResponse { SerializeError = e.Message }; + } + } + + private static int? ReadInt32(BinaryReader input) + { + byte[] bytes = input.ReadBytes(4); + if (bytes.Length == 0) + { + // Cleanly reached the end of the stream + return null; + } + if (bytes.Length != 4) + { + throw new EndOfStreamException("Read " + bytes.Length + " bytes of size when expecting 4"); + } + return bytes[0] | (bytes[1] << 8) | (bytes[2] << 16) | (bytes[3] << 24); + } + } +} diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs b/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs index fbeb512a..076afb3b 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs +++ b/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs @@ -27,168 +27,172 @@ namespace ProtobufTestMessages.Proto3 { "dWYvYW55LnByb3RvGh5nb29nbGUvcHJvdG9idWYvZHVyYXRpb24ucHJvdG8a", "IGdvb2dsZS9wcm90b2J1Zi9maWVsZF9tYXNrLnByb3RvGhxnb29nbGUvcHJv", "dG9idWYvc3RydWN0LnByb3RvGh9nb29nbGUvcHJvdG9idWYvdGltZXN0YW1w", - "LnByb3RvGh5nb29nbGUvcHJvdG9idWYvd3JhcHBlcnMucHJvdG8i+DkKDFRl", - "c3RBbGxUeXBlcxIWCg5vcHRpb25hbF9pbnQzMhgBIAEoBRIWCg5vcHRpb25h", - "bF9pbnQ2NBgCIAEoAxIXCg9vcHRpb25hbF91aW50MzIYAyABKA0SFwoPb3B0", - "aW9uYWxfdWludDY0GAQgASgEEhcKD29wdGlvbmFsX3NpbnQzMhgFIAEoERIX", - "Cg9vcHRpb25hbF9zaW50NjQYBiABKBISGAoQb3B0aW9uYWxfZml4ZWQzMhgH", - "IAEoBxIYChBvcHRpb25hbF9maXhlZDY0GAggASgGEhkKEW9wdGlvbmFsX3Nm", - "aXhlZDMyGAkgASgPEhkKEW9wdGlvbmFsX3NmaXhlZDY0GAogASgQEhYKDm9w", - "dGlvbmFsX2Zsb2F0GAsgASgCEhcKD29wdGlvbmFsX2RvdWJsZRgMIAEoARIV", - "Cg1vcHRpb25hbF9ib29sGA0gASgIEhcKD29wdGlvbmFsX3N0cmluZxgOIAEo", - "CRIWCg5vcHRpb25hbF9ieXRlcxgPIAEoDBJaChdvcHRpb25hbF9uZXN0ZWRf", - "bWVzc2FnZRgSIAEoCzI5LnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8z", - "LlRlc3RBbGxUeXBlcy5OZXN0ZWRNZXNzYWdlEk8KGG9wdGlvbmFsX2ZvcmVp", - "Z25fbWVzc2FnZRgTIAEoCzItLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJv", - "dG8zLkZvcmVpZ25NZXNzYWdlElQKFG9wdGlvbmFsX25lc3RlZF9lbnVtGBUg", - "ASgOMjYucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzMuVGVzdEFsbFR5", - "cGVzLk5lc3RlZEVudW0SSQoVb3B0aW9uYWxfZm9yZWlnbl9lbnVtGBYgASgO", - "MioucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzMuRm9yZWlnbkVudW0S", - "IQoVb3B0aW9uYWxfc3RyaW5nX3BpZWNlGBggASgJQgIIAhIZCg1vcHRpb25h", - "bF9jb3JkGBkgASgJQgIIARJGChFyZWN1cnNpdmVfbWVzc2FnZRgbIAEoCzIr", - "LnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zLlRlc3RBbGxUeXBlcxIW", - "Cg5yZXBlYXRlZF9pbnQzMhgfIAMoBRIWCg5yZXBlYXRlZF9pbnQ2NBggIAMo", - "AxIXCg9yZXBlYXRlZF91aW50MzIYISADKA0SFwoPcmVwZWF0ZWRfdWludDY0", - "GCIgAygEEhcKD3JlcGVhdGVkX3NpbnQzMhgjIAMoERIXCg9yZXBlYXRlZF9z", - "aW50NjQYJCADKBISGAoQcmVwZWF0ZWRfZml4ZWQzMhglIAMoBxIYChByZXBl", - "YXRlZF9maXhlZDY0GCYgAygGEhkKEXJlcGVhdGVkX3NmaXhlZDMyGCcgAygP", - "EhkKEXJlcGVhdGVkX3NmaXhlZDY0GCggAygQEhYKDnJlcGVhdGVkX2Zsb2F0", - "GCkgAygCEhcKD3JlcGVhdGVkX2RvdWJsZRgqIAMoARIVCg1yZXBlYXRlZF9i", - "b29sGCsgAygIEhcKD3JlcGVhdGVkX3N0cmluZxgsIAMoCRIWCg5yZXBlYXRl", - "ZF9ieXRlcxgtIAMoDBJaChdyZXBlYXRlZF9uZXN0ZWRfbWVzc2FnZRgwIAMo", - "CzI5LnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zLlRlc3RBbGxUeXBl", - "cy5OZXN0ZWRNZXNzYWdlEk8KGHJlcGVhdGVkX2ZvcmVpZ25fbWVzc2FnZRgx", - "IAMoCzItLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zLkZvcmVpZ25N", - "ZXNzYWdlElQKFHJlcGVhdGVkX25lc3RlZF9lbnVtGDMgAygOMjYucHJvdG9i", - "dWZfdGVzdF9tZXNzYWdlcy5wcm90bzMuVGVzdEFsbFR5cGVzLk5lc3RlZEVu", - "dW0SSQoVcmVwZWF0ZWRfZm9yZWlnbl9lbnVtGDQgAygOMioucHJvdG9idWZf", - "dGVzdF9tZXNzYWdlcy5wcm90bzMuRm9yZWlnbkVudW0SIQoVcmVwZWF0ZWRf", - "c3RyaW5nX3BpZWNlGDYgAygJQgIIAhIZCg1yZXBlYXRlZF9jb3JkGDcgAygJ", - "QgIIARJXCg9tYXBfaW50MzJfaW50MzIYOCADKAsyPi5wcm90b2J1Zl90ZXN0", - "X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXMuTWFwSW50MzJJbnQzMkVu", - "dHJ5ElcKD21hcF9pbnQ2NF9pbnQ2NBg5IAMoCzI+LnByb3RvYnVmX3Rlc3Rf", - "bWVzc2FnZXMucHJvdG8zLlRlc3RBbGxUeXBlcy5NYXBJbnQ2NEludDY0RW50", - "cnkSWwoRbWFwX3VpbnQzMl91aW50MzIYOiADKAsyQC5wcm90b2J1Zl90ZXN0", - "X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXMuTWFwVWludDMyVWludDMy", - "RW50cnkSWwoRbWFwX3VpbnQ2NF91aW50NjQYOyADKAsyQC5wcm90b2J1Zl90", - "ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXMuTWFwVWludDY0VWlu", - "dDY0RW50cnkSWwoRbWFwX3NpbnQzMl9zaW50MzIYPCADKAsyQC5wcm90b2J1", - "Zl90ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXMuTWFwU2ludDMy", - "U2ludDMyRW50cnkSWwoRbWFwX3NpbnQ2NF9zaW50NjQYPSADKAsyQC5wcm90", - "b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXMuTWFwU2lu", - "dDY0U2ludDY0RW50cnkSXwoTbWFwX2ZpeGVkMzJfZml4ZWQzMhg+IAMoCzJC", - "LnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zLlRlc3RBbGxUeXBlcy5N", - "YXBGaXhlZDMyRml4ZWQzMkVudHJ5El8KE21hcF9maXhlZDY0X2ZpeGVkNjQY", - "PyADKAsyQi5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxs", - "VHlwZXMuTWFwRml4ZWQ2NEZpeGVkNjRFbnRyeRJjChVtYXBfc2ZpeGVkMzJf", - "c2ZpeGVkMzIYQCADKAsyRC5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3Rv", - "My5UZXN0QWxsVHlwZXMuTWFwU2ZpeGVkMzJTZml4ZWQzMkVudHJ5EmMKFW1h", - "cF9zZml4ZWQ2NF9zZml4ZWQ2NBhBIAMoCzJELnByb3RvYnVmX3Rlc3RfbWVz", - "c2FnZXMucHJvdG8zLlRlc3RBbGxUeXBlcy5NYXBTZml4ZWQ2NFNmaXhlZDY0", - "RW50cnkSVwoPbWFwX2ludDMyX2Zsb2F0GEIgAygLMj4ucHJvdG9idWZfdGVz", - "dF9tZXNzYWdlcy5wcm90bzMuVGVzdEFsbFR5cGVzLk1hcEludDMyRmxvYXRF", - "bnRyeRJZChBtYXBfaW50MzJfZG91YmxlGEMgAygLMj8ucHJvdG9idWZfdGVz", - "dF9tZXNzYWdlcy5wcm90bzMuVGVzdEFsbFR5cGVzLk1hcEludDMyRG91Ymxl", - "RW50cnkSUwoNbWFwX2Jvb2xfYm9vbBhEIAMoCzI8LnByb3RvYnVmX3Rlc3Rf", - "bWVzc2FnZXMucHJvdG8zLlRlc3RBbGxUeXBlcy5NYXBCb29sQm9vbEVudHJ5", - "ElsKEW1hcF9zdHJpbmdfc3RyaW5nGEUgAygLMkAucHJvdG9idWZfdGVzdF9t", - "ZXNzYWdlcy5wcm90bzMuVGVzdEFsbFR5cGVzLk1hcFN0cmluZ1N0cmluZ0Vu", - "dHJ5ElkKEG1hcF9zdHJpbmdfYnl0ZXMYRiADKAsyPy5wcm90b2J1Zl90ZXN0", - "X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXMuTWFwU3RyaW5nQnl0ZXNF", - "bnRyeRJqChltYXBfc3RyaW5nX25lc3RlZF9tZXNzYWdlGEcgAygLMkcucHJv", - "dG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzMuVGVzdEFsbFR5cGVzLk1hcFN0", - "cmluZ05lc3RlZE1lc3NhZ2VFbnRyeRJsChptYXBfc3RyaW5nX2ZvcmVpZ25f", - "bWVzc2FnZRhIIAMoCzJILnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8z", - "LlRlc3RBbGxUeXBlcy5NYXBTdHJpbmdGb3JlaWduTWVzc2FnZUVudHJ5EmQK", - "Fm1hcF9zdHJpbmdfbmVzdGVkX2VudW0YSSADKAsyRC5wcm90b2J1Zl90ZXN0", - "X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXMuTWFwU3RyaW5nTmVzdGVk", - "RW51bUVudHJ5EmYKF21hcF9zdHJpbmdfZm9yZWlnbl9lbnVtGEogAygLMkUu", - "cHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzMuVGVzdEFsbFR5cGVzLk1h", - "cFN0cmluZ0ZvcmVpZ25FbnVtRW50cnkSFgoMb25lb2ZfdWludDMyGG8gASgN", - "SAASWQoUb25lb2ZfbmVzdGVkX21lc3NhZ2UYcCABKAsyOS5wcm90b2J1Zl90", - "ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXMuTmVzdGVkTWVzc2Fn", - "ZUgAEhYKDG9uZW9mX3N0cmluZxhxIAEoCUgAEhUKC29uZW9mX2J5dGVzGHIg", - "ASgMSAASFAoKb25lb2ZfYm9vbBhzIAEoCEgAEhYKDG9uZW9mX3VpbnQ2NBh0", - "IAEoBEgAEhUKC29uZW9mX2Zsb2F0GHUgASgCSAASFgoMb25lb2ZfZG91Ymxl", - "GHYgASgBSAASTAoKb25lb2ZfZW51bRh3IAEoDjI2LnByb3RvYnVmX3Rlc3Rf", - "bWVzc2FnZXMucHJvdG8zLlRlc3RBbGxUeXBlcy5OZXN0ZWRFbnVtSAASOgoV", - "b3B0aW9uYWxfYm9vbF93cmFwcGVyGMkBIAEoCzIaLmdvb2dsZS5wcm90b2J1", - "Zi5Cb29sVmFsdWUSPAoWb3B0aW9uYWxfaW50MzJfd3JhcHBlchjKASABKAsy", - "Gy5nb29nbGUucHJvdG9idWYuSW50MzJWYWx1ZRI8ChZvcHRpb25hbF9pbnQ2", - "NF93cmFwcGVyGMsBIAEoCzIbLmdvb2dsZS5wcm90b2J1Zi5JbnQ2NFZhbHVl", - "Ej4KF29wdGlvbmFsX3VpbnQzMl93cmFwcGVyGMwBIAEoCzIcLmdvb2dsZS5w", - "cm90b2J1Zi5VSW50MzJWYWx1ZRI+ChdvcHRpb25hbF91aW50NjRfd3JhcHBl", - "chjNASABKAsyHC5nb29nbGUucHJvdG9idWYuVUludDY0VmFsdWUSPAoWb3B0", - "aW9uYWxfZmxvYXRfd3JhcHBlchjOASABKAsyGy5nb29nbGUucHJvdG9idWYu", - "RmxvYXRWYWx1ZRI+ChdvcHRpb25hbF9kb3VibGVfd3JhcHBlchjPASABKAsy", - "HC5nb29nbGUucHJvdG9idWYuRG91YmxlVmFsdWUSPgoXb3B0aW9uYWxfc3Ry", - "aW5nX3dyYXBwZXIY0AEgASgLMhwuZ29vZ2xlLnByb3RvYnVmLlN0cmluZ1Zh", - "bHVlEjwKFm9wdGlvbmFsX2J5dGVzX3dyYXBwZXIY0QEgASgLMhsuZ29vZ2xl", - "LnByb3RvYnVmLkJ5dGVzVmFsdWUSOgoVcmVwZWF0ZWRfYm9vbF93cmFwcGVy", - "GNMBIAMoCzIaLmdvb2dsZS5wcm90b2J1Zi5Cb29sVmFsdWUSPAoWcmVwZWF0", - "ZWRfaW50MzJfd3JhcHBlchjUASADKAsyGy5nb29nbGUucHJvdG9idWYuSW50", - "MzJWYWx1ZRI8ChZyZXBlYXRlZF9pbnQ2NF93cmFwcGVyGNUBIAMoCzIbLmdv", - "b2dsZS5wcm90b2J1Zi5JbnQ2NFZhbHVlEj4KF3JlcGVhdGVkX3VpbnQzMl93", - "cmFwcGVyGNYBIAMoCzIcLmdvb2dsZS5wcm90b2J1Zi5VSW50MzJWYWx1ZRI+", - "ChdyZXBlYXRlZF91aW50NjRfd3JhcHBlchjXASADKAsyHC5nb29nbGUucHJv", - "dG9idWYuVUludDY0VmFsdWUSPAoWcmVwZWF0ZWRfZmxvYXRfd3JhcHBlchjY", - "ASADKAsyGy5nb29nbGUucHJvdG9idWYuRmxvYXRWYWx1ZRI+ChdyZXBlYXRl", - "ZF9kb3VibGVfd3JhcHBlchjZASADKAsyHC5nb29nbGUucHJvdG9idWYuRG91", - "YmxlVmFsdWUSPgoXcmVwZWF0ZWRfc3RyaW5nX3dyYXBwZXIY2gEgAygLMhwu", - "Z29vZ2xlLnByb3RvYnVmLlN0cmluZ1ZhbHVlEjwKFnJlcGVhdGVkX2J5dGVz", - "X3dyYXBwZXIY2wEgAygLMhsuZ29vZ2xlLnByb3RvYnVmLkJ5dGVzVmFsdWUS", - "NQoRb3B0aW9uYWxfZHVyYXRpb24YrQIgASgLMhkuZ29vZ2xlLnByb3RvYnVm", - "LkR1cmF0aW9uEjcKEm9wdGlvbmFsX3RpbWVzdGFtcBiuAiABKAsyGi5nb29n", - "bGUucHJvdG9idWYuVGltZXN0YW1wEjgKE29wdGlvbmFsX2ZpZWxkX21hc2sY", - "rwIgASgLMhouZ29vZ2xlLnByb3RvYnVmLkZpZWxkTWFzaxIxCg9vcHRpb25h", - "bF9zdHJ1Y3QYsAIgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdBIrCgxv", - "cHRpb25hbF9hbnkYsQIgASgLMhQuZ29vZ2xlLnByb3RvYnVmLkFueRIvCg5v", - "cHRpb25hbF92YWx1ZRiyAiABKAsyFi5nb29nbGUucHJvdG9idWYuVmFsdWUS", - "NQoRcmVwZWF0ZWRfZHVyYXRpb24YtwIgAygLMhkuZ29vZ2xlLnByb3RvYnVm", - "LkR1cmF0aW9uEjcKEnJlcGVhdGVkX3RpbWVzdGFtcBi4AiADKAsyGi5nb29n", - "bGUucHJvdG9idWYuVGltZXN0YW1wEjcKEnJlcGVhdGVkX2ZpZWxkbWFzaxi5", - "AiADKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrEjEKD3JlcGVhdGVk", - "X3N0cnVjdBjEAiADKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0EisKDHJl", - "cGVhdGVkX2FueRi7AiADKAsyFC5nb29nbGUucHJvdG9idWYuQW55Ei8KDnJl", - "cGVhdGVkX3ZhbHVlGLwCIAMoCzIWLmdvb2dsZS5wcm90b2J1Zi5WYWx1ZRIT", - "CgpmaWVsZG5hbWUxGJEDIAEoBRIUCgtmaWVsZF9uYW1lMhiSAyABKAUSFQoM", - "X2ZpZWxkX25hbWUzGJMDIAEoBRIWCg1maWVsZF9fbmFtZTRfGJQDIAEoBRIU", - "CgtmaWVsZDBuYW1lNRiVAyABKAUSFgoNZmllbGRfMF9uYW1lNhiWAyABKAUS", - "EwoKZmllbGROYW1lNxiXAyABKAUSEwoKRmllbGROYW1lOBiYAyABKAUSFAoL", - "ZmllbGRfTmFtZTkYmQMgASgFEhUKDEZpZWxkX05hbWUxMBiaAyABKAUSFQoM", - "RklFTERfTkFNRTExGJsDIAEoBRIVCgxGSUVMRF9uYW1lMTIYnAMgASgFEhcK", - "Dl9fZmllbGRfbmFtZTEzGJ0DIAEoBRIXCg5fX0ZpZWxkX25hbWUxNBieAyAB", - "KAUSFgoNZmllbGRfX25hbWUxNRifAyABKAUSFgoNZmllbGRfX05hbWUxNhig", - "AyABKAUSFwoOZmllbGRfbmFtZTE3X18YoQMgASgFEhcKDkZpZWxkX25hbWUx", - "OF9fGKIDIAEoBRpcCg1OZXN0ZWRNZXNzYWdlEgkKAWEYASABKAUSQAoLY29y", - "ZWN1cnNpdmUYAiABKAsyKy5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3Rv", - "My5UZXN0QWxsVHlwZXMaNAoSTWFwSW50MzJJbnQzMkVudHJ5EgsKA2tleRgB", - "IAEoBRINCgV2YWx1ZRgCIAEoBToCOAEaNAoSTWFwSW50NjRJbnQ2NEVudHJ5", - "EgsKA2tleRgBIAEoAxINCgV2YWx1ZRgCIAEoAzoCOAEaNgoUTWFwVWludDMy", - "VWludDMyRW50cnkSCwoDa2V5GAEgASgNEg0KBXZhbHVlGAIgASgNOgI4ARo2", - "ChRNYXBVaW50NjRVaW50NjRFbnRyeRILCgNrZXkYASABKAQSDQoFdmFsdWUY", - "AiABKAQ6AjgBGjYKFE1hcFNpbnQzMlNpbnQzMkVudHJ5EgsKA2tleRgBIAEo", - "ERINCgV2YWx1ZRgCIAEoEToCOAEaNgoUTWFwU2ludDY0U2ludDY0RW50cnkS", - "CwoDa2V5GAEgASgSEg0KBXZhbHVlGAIgASgSOgI4ARo4ChZNYXBGaXhlZDMy", - "Rml4ZWQzMkVudHJ5EgsKA2tleRgBIAEoBxINCgV2YWx1ZRgCIAEoBzoCOAEa", - "OAoWTWFwRml4ZWQ2NEZpeGVkNjRFbnRyeRILCgNrZXkYASABKAYSDQoFdmFs", - "dWUYAiABKAY6AjgBGjoKGE1hcFNmaXhlZDMyU2ZpeGVkMzJFbnRyeRILCgNr", - "ZXkYASABKA8SDQoFdmFsdWUYAiABKA86AjgBGjoKGE1hcFNmaXhlZDY0U2Zp", - "eGVkNjRFbnRyeRILCgNrZXkYASABKBASDQoFdmFsdWUYAiABKBA6AjgBGjQK", - "Ek1hcEludDMyRmxvYXRFbnRyeRILCgNrZXkYASABKAUSDQoFdmFsdWUYAiAB", - "KAI6AjgBGjUKE01hcEludDMyRG91YmxlRW50cnkSCwoDa2V5GAEgASgFEg0K", - "BXZhbHVlGAIgASgBOgI4ARoyChBNYXBCb29sQm9vbEVudHJ5EgsKA2tleRgB", - "IAEoCBINCgV2YWx1ZRgCIAEoCDoCOAEaNgoUTWFwU3RyaW5nU3RyaW5nRW50", - "cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4ARo1ChNNYXBTdHJp", - "bmdCeXRlc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoDDoCOAEa", - "eAobTWFwU3RyaW5nTmVzdGVkTWVzc2FnZUVudHJ5EgsKA2tleRgBIAEoCRJI", - "CgV2YWx1ZRgCIAEoCzI5LnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8z", - "LlRlc3RBbGxUeXBlcy5OZXN0ZWRNZXNzYWdlOgI4ARptChxNYXBTdHJpbmdG", - "b3JlaWduTWVzc2FnZUVudHJ5EgsKA2tleRgBIAEoCRI8CgV2YWx1ZRgCIAEo", - "CzItLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zLkZvcmVpZ25NZXNz", - "YWdlOgI4ARpyChhNYXBTdHJpbmdOZXN0ZWRFbnVtRW50cnkSCwoDa2V5GAEg", - "ASgJEkUKBXZhbHVlGAIgASgOMjYucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5w", - "cm90bzMuVGVzdEFsbFR5cGVzLk5lc3RlZEVudW06AjgBGmcKGU1hcFN0cmlu", + "LnByb3RvGh5nb29nbGUvcHJvdG9idWYvd3JhcHBlcnMucHJvdG8irDsKElRl", + "c3RBbGxUeXBlc1Byb3RvMxIWCg5vcHRpb25hbF9pbnQzMhgBIAEoBRIWCg5v", + "cHRpb25hbF9pbnQ2NBgCIAEoAxIXCg9vcHRpb25hbF91aW50MzIYAyABKA0S", + "FwoPb3B0aW9uYWxfdWludDY0GAQgASgEEhcKD29wdGlvbmFsX3NpbnQzMhgF", + "IAEoERIXCg9vcHRpb25hbF9zaW50NjQYBiABKBISGAoQb3B0aW9uYWxfZml4", + "ZWQzMhgHIAEoBxIYChBvcHRpb25hbF9maXhlZDY0GAggASgGEhkKEW9wdGlv", + "bmFsX3NmaXhlZDMyGAkgASgPEhkKEW9wdGlvbmFsX3NmaXhlZDY0GAogASgQ", + "EhYKDm9wdGlvbmFsX2Zsb2F0GAsgASgCEhcKD29wdGlvbmFsX2RvdWJsZRgM", + "IAEoARIVCg1vcHRpb25hbF9ib29sGA0gASgIEhcKD29wdGlvbmFsX3N0cmlu", + "ZxgOIAEoCRIWCg5vcHRpb25hbF9ieXRlcxgPIAEoDBJgChdvcHRpb25hbF9u", + "ZXN0ZWRfbWVzc2FnZRgSIAEoCzI/LnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMu", + "cHJvdG8zLlRlc3RBbGxUeXBlc1Byb3RvMy5OZXN0ZWRNZXNzYWdlEk8KGG9w", + "dGlvbmFsX2ZvcmVpZ25fbWVzc2FnZRgTIAEoCzItLnByb3RvYnVmX3Rlc3Rf", + "bWVzc2FnZXMucHJvdG8zLkZvcmVpZ25NZXNzYWdlEloKFG9wdGlvbmFsX25l", + "c3RlZF9lbnVtGBUgASgOMjwucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90", + "bzMuVGVzdEFsbFR5cGVzUHJvdG8zLk5lc3RlZEVudW0SSQoVb3B0aW9uYWxf", + "Zm9yZWlnbl9lbnVtGBYgASgOMioucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5w", + "cm90bzMuRm9yZWlnbkVudW0SIQoVb3B0aW9uYWxfc3RyaW5nX3BpZWNlGBgg", + "ASgJQgIIAhIZCg1vcHRpb25hbF9jb3JkGBkgASgJQgIIARJMChFyZWN1cnNp", + "dmVfbWVzc2FnZRgbIAEoCzIxLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJv", + "dG8zLlRlc3RBbGxUeXBlc1Byb3RvMxIWCg5yZXBlYXRlZF9pbnQzMhgfIAMo", + "BRIWCg5yZXBlYXRlZF9pbnQ2NBggIAMoAxIXCg9yZXBlYXRlZF91aW50MzIY", + "ISADKA0SFwoPcmVwZWF0ZWRfdWludDY0GCIgAygEEhcKD3JlcGVhdGVkX3Np", + "bnQzMhgjIAMoERIXCg9yZXBlYXRlZF9zaW50NjQYJCADKBISGAoQcmVwZWF0", + "ZWRfZml4ZWQzMhglIAMoBxIYChByZXBlYXRlZF9maXhlZDY0GCYgAygGEhkK", + "EXJlcGVhdGVkX3NmaXhlZDMyGCcgAygPEhkKEXJlcGVhdGVkX3NmaXhlZDY0", + "GCggAygQEhYKDnJlcGVhdGVkX2Zsb2F0GCkgAygCEhcKD3JlcGVhdGVkX2Rv", + "dWJsZRgqIAMoARIVCg1yZXBlYXRlZF9ib29sGCsgAygIEhcKD3JlcGVhdGVk", + "X3N0cmluZxgsIAMoCRIWCg5yZXBlYXRlZF9ieXRlcxgtIAMoDBJgChdyZXBl", + "YXRlZF9uZXN0ZWRfbWVzc2FnZRgwIAMoCzI/LnByb3RvYnVmX3Rlc3RfbWVz", + "c2FnZXMucHJvdG8zLlRlc3RBbGxUeXBlc1Byb3RvMy5OZXN0ZWRNZXNzYWdl", + "Ek8KGHJlcGVhdGVkX2ZvcmVpZ25fbWVzc2FnZRgxIAMoCzItLnByb3RvYnVm", + "X3Rlc3RfbWVzc2FnZXMucHJvdG8zLkZvcmVpZ25NZXNzYWdlEloKFHJlcGVh", + "dGVkX25lc3RlZF9lbnVtGDMgAygOMjwucHJvdG9idWZfdGVzdF9tZXNzYWdl", + "cy5wcm90bzMuVGVzdEFsbFR5cGVzUHJvdG8zLk5lc3RlZEVudW0SSQoVcmVw", + "ZWF0ZWRfZm9yZWlnbl9lbnVtGDQgAygOMioucHJvdG9idWZfdGVzdF9tZXNz", + "YWdlcy5wcm90bzMuRm9yZWlnbkVudW0SIQoVcmVwZWF0ZWRfc3RyaW5nX3Bp", + "ZWNlGDYgAygJQgIIAhIZCg1yZXBlYXRlZF9jb3JkGDcgAygJQgIIARJdCg9t", + "YXBfaW50MzJfaW50MzIYOCADKAsyRC5wcm90b2J1Zl90ZXN0X21lc3NhZ2Vz", + "LnByb3RvMy5UZXN0QWxsVHlwZXNQcm90bzMuTWFwSW50MzJJbnQzMkVudHJ5", + "El0KD21hcF9pbnQ2NF9pbnQ2NBg5IAMoCzJELnByb3RvYnVmX3Rlc3RfbWVz", + "c2FnZXMucHJvdG8zLlRlc3RBbGxUeXBlc1Byb3RvMy5NYXBJbnQ2NEludDY0", + "RW50cnkSYQoRbWFwX3VpbnQzMl91aW50MzIYOiADKAsyRi5wcm90b2J1Zl90", + "ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXNQcm90bzMuTWFwVWlu", + "dDMyVWludDMyRW50cnkSYQoRbWFwX3VpbnQ2NF91aW50NjQYOyADKAsyRi5w", + "cm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXNQcm90", + "bzMuTWFwVWludDY0VWludDY0RW50cnkSYQoRbWFwX3NpbnQzMl9zaW50MzIY", + "PCADKAsyRi5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxs", + "VHlwZXNQcm90bzMuTWFwU2ludDMyU2ludDMyRW50cnkSYQoRbWFwX3NpbnQ2", + "NF9zaW50NjQYPSADKAsyRi5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3Rv", + "My5UZXN0QWxsVHlwZXNQcm90bzMuTWFwU2ludDY0U2ludDY0RW50cnkSZQoT", + "bWFwX2ZpeGVkMzJfZml4ZWQzMhg+IAMoCzJILnByb3RvYnVmX3Rlc3RfbWVz", + "c2FnZXMucHJvdG8zLlRlc3RBbGxUeXBlc1Byb3RvMy5NYXBGaXhlZDMyRml4", + "ZWQzMkVudHJ5EmUKE21hcF9maXhlZDY0X2ZpeGVkNjQYPyADKAsySC5wcm90", + "b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXNQcm90bzMu", + "TWFwRml4ZWQ2NEZpeGVkNjRFbnRyeRJpChVtYXBfc2ZpeGVkMzJfc2ZpeGVk", + "MzIYQCADKAsySi5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0", + "QWxsVHlwZXNQcm90bzMuTWFwU2ZpeGVkMzJTZml4ZWQzMkVudHJ5EmkKFW1h", + "cF9zZml4ZWQ2NF9zZml4ZWQ2NBhBIAMoCzJKLnByb3RvYnVmX3Rlc3RfbWVz", + "c2FnZXMucHJvdG8zLlRlc3RBbGxUeXBlc1Byb3RvMy5NYXBTZml4ZWQ2NFNm", + "aXhlZDY0RW50cnkSXQoPbWFwX2ludDMyX2Zsb2F0GEIgAygLMkQucHJvdG9i", + "dWZfdGVzdF9tZXNzYWdlcy5wcm90bzMuVGVzdEFsbFR5cGVzUHJvdG8zLk1h", + "cEludDMyRmxvYXRFbnRyeRJfChBtYXBfaW50MzJfZG91YmxlGEMgAygLMkUu", + "cHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzMuVGVzdEFsbFR5cGVzUHJv", + "dG8zLk1hcEludDMyRG91YmxlRW50cnkSWQoNbWFwX2Jvb2xfYm9vbBhEIAMo", + "CzJCLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zLlRlc3RBbGxUeXBl", + "c1Byb3RvMy5NYXBCb29sQm9vbEVudHJ5EmEKEW1hcF9zdHJpbmdfc3RyaW5n", + "GEUgAygLMkYucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzMuVGVzdEFs", + "bFR5cGVzUHJvdG8zLk1hcFN0cmluZ1N0cmluZ0VudHJ5El8KEG1hcF9zdHJp", + "bmdfYnl0ZXMYRiADKAsyRS5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3Rv", + "My5UZXN0QWxsVHlwZXNQcm90bzMuTWFwU3RyaW5nQnl0ZXNFbnRyeRJwChlt", + "YXBfc3RyaW5nX25lc3RlZF9tZXNzYWdlGEcgAygLMk0ucHJvdG9idWZfdGVz", + "dF9tZXNzYWdlcy5wcm90bzMuVGVzdEFsbFR5cGVzUHJvdG8zLk1hcFN0cmlu", + "Z05lc3RlZE1lc3NhZ2VFbnRyeRJyChptYXBfc3RyaW5nX2ZvcmVpZ25fbWVz", + "c2FnZRhIIAMoCzJOLnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zLlRl", + "c3RBbGxUeXBlc1Byb3RvMy5NYXBTdHJpbmdGb3JlaWduTWVzc2FnZUVudHJ5", + "EmoKFm1hcF9zdHJpbmdfbmVzdGVkX2VudW0YSSADKAsySi5wcm90b2J1Zl90", + "ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXNQcm90bzMuTWFwU3Ry", + "aW5nTmVzdGVkRW51bUVudHJ5EmwKF21hcF9zdHJpbmdfZm9yZWlnbl9lbnVt", + "GEogAygLMksucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzMuVGVzdEFs", + "bFR5cGVzUHJvdG8zLk1hcFN0cmluZ0ZvcmVpZ25FbnVtRW50cnkSFgoMb25l", + "b2ZfdWludDMyGG8gASgNSAASXwoUb25lb2ZfbmVzdGVkX21lc3NhZ2UYcCAB", + "KAsyPy5wcm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlw", + "ZXNQcm90bzMuTmVzdGVkTWVzc2FnZUgAEhYKDG9uZW9mX3N0cmluZxhxIAEo", + "CUgAEhUKC29uZW9mX2J5dGVzGHIgASgMSAASFAoKb25lb2ZfYm9vbBhzIAEo", + "CEgAEhYKDG9uZW9mX3VpbnQ2NBh0IAEoBEgAEhUKC29uZW9mX2Zsb2F0GHUg", + "ASgCSAASFgoMb25lb2ZfZG91YmxlGHYgASgBSAASUgoKb25lb2ZfZW51bRh3", + "IAEoDjI8LnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zLlRlc3RBbGxU", + "eXBlc1Byb3RvMy5OZXN0ZWRFbnVtSAASOgoVb3B0aW9uYWxfYm9vbF93cmFw", + "cGVyGMkBIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5Cb29sVmFsdWUSPAoWb3B0", + "aW9uYWxfaW50MzJfd3JhcHBlchjKASABKAsyGy5nb29nbGUucHJvdG9idWYu", + "SW50MzJWYWx1ZRI8ChZvcHRpb25hbF9pbnQ2NF93cmFwcGVyGMsBIAEoCzIb", + "Lmdvb2dsZS5wcm90b2J1Zi5JbnQ2NFZhbHVlEj4KF29wdGlvbmFsX3VpbnQz", + "Ml93cmFwcGVyGMwBIAEoCzIcLmdvb2dsZS5wcm90b2J1Zi5VSW50MzJWYWx1", + "ZRI+ChdvcHRpb25hbF91aW50NjRfd3JhcHBlchjNASABKAsyHC5nb29nbGUu", + "cHJvdG9idWYuVUludDY0VmFsdWUSPAoWb3B0aW9uYWxfZmxvYXRfd3JhcHBl", + "chjOASABKAsyGy5nb29nbGUucHJvdG9idWYuRmxvYXRWYWx1ZRI+ChdvcHRp", + "b25hbF9kb3VibGVfd3JhcHBlchjPASABKAsyHC5nb29nbGUucHJvdG9idWYu", + "RG91YmxlVmFsdWUSPgoXb3B0aW9uYWxfc3RyaW5nX3dyYXBwZXIY0AEgASgL", + "MhwuZ29vZ2xlLnByb3RvYnVmLlN0cmluZ1ZhbHVlEjwKFm9wdGlvbmFsX2J5", + "dGVzX3dyYXBwZXIY0QEgASgLMhsuZ29vZ2xlLnByb3RvYnVmLkJ5dGVzVmFs", + "dWUSOgoVcmVwZWF0ZWRfYm9vbF93cmFwcGVyGNMBIAMoCzIaLmdvb2dsZS5w", + "cm90b2J1Zi5Cb29sVmFsdWUSPAoWcmVwZWF0ZWRfaW50MzJfd3JhcHBlchjU", + "ASADKAsyGy5nb29nbGUucHJvdG9idWYuSW50MzJWYWx1ZRI8ChZyZXBlYXRl", + "ZF9pbnQ2NF93cmFwcGVyGNUBIAMoCzIbLmdvb2dsZS5wcm90b2J1Zi5JbnQ2", + "NFZhbHVlEj4KF3JlcGVhdGVkX3VpbnQzMl93cmFwcGVyGNYBIAMoCzIcLmdv", + "b2dsZS5wcm90b2J1Zi5VSW50MzJWYWx1ZRI+ChdyZXBlYXRlZF91aW50NjRf", + "d3JhcHBlchjXASADKAsyHC5nb29nbGUucHJvdG9idWYuVUludDY0VmFsdWUS", + "PAoWcmVwZWF0ZWRfZmxvYXRfd3JhcHBlchjYASADKAsyGy5nb29nbGUucHJv", + "dG9idWYuRmxvYXRWYWx1ZRI+ChdyZXBlYXRlZF9kb3VibGVfd3JhcHBlchjZ", + "ASADKAsyHC5nb29nbGUucHJvdG9idWYuRG91YmxlVmFsdWUSPgoXcmVwZWF0", + "ZWRfc3RyaW5nX3dyYXBwZXIY2gEgAygLMhwuZ29vZ2xlLnByb3RvYnVmLlN0", + "cmluZ1ZhbHVlEjwKFnJlcGVhdGVkX2J5dGVzX3dyYXBwZXIY2wEgAygLMhsu", + "Z29vZ2xlLnByb3RvYnVmLkJ5dGVzVmFsdWUSNQoRb3B0aW9uYWxfZHVyYXRp", + "b24YrQIgASgLMhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uEjcKEm9wdGlv", + "bmFsX3RpbWVzdGFtcBiuAiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0", + "YW1wEjgKE29wdGlvbmFsX2ZpZWxkX21hc2sYrwIgASgLMhouZ29vZ2xlLnBy", + "b3RvYnVmLkZpZWxkTWFzaxIxCg9vcHRpb25hbF9zdHJ1Y3QYsAIgASgLMhcu", + "Z29vZ2xlLnByb3RvYnVmLlN0cnVjdBIrCgxvcHRpb25hbF9hbnkYsQIgASgL", + "MhQuZ29vZ2xlLnByb3RvYnVmLkFueRIvCg5vcHRpb25hbF92YWx1ZRiyAiAB", + "KAsyFi5nb29nbGUucHJvdG9idWYuVmFsdWUSNQoRcmVwZWF0ZWRfZHVyYXRp", + "b24YtwIgAygLMhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uEjcKEnJlcGVh", + "dGVkX3RpbWVzdGFtcBi4AiADKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0", + "YW1wEjcKEnJlcGVhdGVkX2ZpZWxkbWFzaxi5AiADKAsyGi5nb29nbGUucHJv", + "dG9idWYuRmllbGRNYXNrEjEKD3JlcGVhdGVkX3N0cnVjdBjEAiADKAsyFy5n", + "b29nbGUucHJvdG9idWYuU3RydWN0EisKDHJlcGVhdGVkX2FueRi7AiADKAsy", + "FC5nb29nbGUucHJvdG9idWYuQW55Ei8KDnJlcGVhdGVkX3ZhbHVlGLwCIAMo", + "CzIWLmdvb2dsZS5wcm90b2J1Zi5WYWx1ZRITCgpmaWVsZG5hbWUxGJEDIAEo", + "BRIUCgtmaWVsZF9uYW1lMhiSAyABKAUSFQoMX2ZpZWxkX25hbWUzGJMDIAEo", + "BRIWCg1maWVsZF9fbmFtZTRfGJQDIAEoBRIUCgtmaWVsZDBuYW1lNRiVAyAB", + "KAUSFgoNZmllbGRfMF9uYW1lNhiWAyABKAUSEwoKZmllbGROYW1lNxiXAyAB", + "KAUSEwoKRmllbGROYW1lOBiYAyABKAUSFAoLZmllbGRfTmFtZTkYmQMgASgF", + "EhUKDEZpZWxkX05hbWUxMBiaAyABKAUSFQoMRklFTERfTkFNRTExGJsDIAEo", + "BRIVCgxGSUVMRF9uYW1lMTIYnAMgASgFEhcKDl9fZmllbGRfbmFtZTEzGJ0D", + "IAEoBRIXCg5fX0ZpZWxkX25hbWUxNBieAyABKAUSFgoNZmllbGRfX25hbWUx", + "NRifAyABKAUSFgoNZmllbGRfX05hbWUxNhigAyABKAUSFwoOZmllbGRfbmFt", + "ZTE3X18YoQMgASgFEhcKDkZpZWxkX25hbWUxOF9fGKIDIAEoBRpiCg1OZXN0", + "ZWRNZXNzYWdlEgkKAWEYASABKAUSRgoLY29yZWN1cnNpdmUYAiABKAsyMS5w", + "cm90b2J1Zl90ZXN0X21lc3NhZ2VzLnByb3RvMy5UZXN0QWxsVHlwZXNQcm90", + "bzMaNAoSTWFwSW50MzJJbnQzMkVudHJ5EgsKA2tleRgBIAEoBRINCgV2YWx1", + "ZRgCIAEoBToCOAEaNAoSTWFwSW50NjRJbnQ2NEVudHJ5EgsKA2tleRgBIAEo", + "AxINCgV2YWx1ZRgCIAEoAzoCOAEaNgoUTWFwVWludDMyVWludDMyRW50cnkS", + "CwoDa2V5GAEgASgNEg0KBXZhbHVlGAIgASgNOgI4ARo2ChRNYXBVaW50NjRV", + "aW50NjRFbnRyeRILCgNrZXkYASABKAQSDQoFdmFsdWUYAiABKAQ6AjgBGjYK", + "FE1hcFNpbnQzMlNpbnQzMkVudHJ5EgsKA2tleRgBIAEoERINCgV2YWx1ZRgC", + "IAEoEToCOAEaNgoUTWFwU2ludDY0U2ludDY0RW50cnkSCwoDa2V5GAEgASgS", + "Eg0KBXZhbHVlGAIgASgSOgI4ARo4ChZNYXBGaXhlZDMyRml4ZWQzMkVudHJ5", + "EgsKA2tleRgBIAEoBxINCgV2YWx1ZRgCIAEoBzoCOAEaOAoWTWFwRml4ZWQ2", + "NEZpeGVkNjRFbnRyeRILCgNrZXkYASABKAYSDQoFdmFsdWUYAiABKAY6AjgB", + "GjoKGE1hcFNmaXhlZDMyU2ZpeGVkMzJFbnRyeRILCgNrZXkYASABKA8SDQoF", + "dmFsdWUYAiABKA86AjgBGjoKGE1hcFNmaXhlZDY0U2ZpeGVkNjRFbnRyeRIL", + "CgNrZXkYASABKBASDQoFdmFsdWUYAiABKBA6AjgBGjQKEk1hcEludDMyRmxv", + "YXRFbnRyeRILCgNrZXkYASABKAUSDQoFdmFsdWUYAiABKAI6AjgBGjUKE01h", + "cEludDMyRG91YmxlRW50cnkSCwoDa2V5GAEgASgFEg0KBXZhbHVlGAIgASgB", + "OgI4ARoyChBNYXBCb29sQm9vbEVudHJ5EgsKA2tleRgBIAEoCBINCgV2YWx1", + "ZRgCIAEoCDoCOAEaNgoUTWFwU3RyaW5nU3RyaW5nRW50cnkSCwoDa2V5GAEg", + "ASgJEg0KBXZhbHVlGAIgASgJOgI4ARo1ChNNYXBTdHJpbmdCeXRlc0VudHJ5", + "EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoDDoCOAEafgobTWFwU3RyaW5n", + "TmVzdGVkTWVzc2FnZUVudHJ5EgsKA2tleRgBIAEoCRJOCgV2YWx1ZRgCIAEo", + "CzI/LnByb3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zLlRlc3RBbGxUeXBl", + "c1Byb3RvMy5OZXN0ZWRNZXNzYWdlOgI4ARptChxNYXBTdHJpbmdGb3JlaWdu", + "TWVzc2FnZUVudHJ5EgsKA2tleRgBIAEoCRI8CgV2YWx1ZRgCIAEoCzItLnBy", + "b3RvYnVmX3Rlc3RfbWVzc2FnZXMucHJvdG8zLkZvcmVpZ25NZXNzYWdlOgI4", + "ARp4ChhNYXBTdHJpbmdOZXN0ZWRFbnVtRW50cnkSCwoDa2V5GAEgASgJEksK", + "BXZhbHVlGAIgASgOMjwucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzMu", + "VGVzdEFsbFR5cGVzUHJvdG8zLk5lc3RlZEVudW06AjgBGmcKGU1hcFN0cmlu", "Z0ZvcmVpZ25FbnVtRW50cnkSCwoDa2V5GAEgASgJEjkKBXZhbHVlGAIgASgO", "MioucHJvdG9idWZfdGVzdF9tZXNzYWdlcy5wcm90bzMuRm9yZWlnbkVudW06", "AjgBIjkKCk5lc3RlZEVudW0SBwoDRk9PEAASBwoDQkFSEAESBwoDQkFaEAIS", @@ -200,7 +204,7 @@ namespace ProtobufTestMessages.Proto3 { descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.AnyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.DurationReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.WrappersReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::ProtobufTestMessages.Proto3.ForeignEnum), }, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto3.TestAllTypes), global::ProtobufTestMessages.Proto3.TestAllTypes.Parser, new[]{ "OptionalInt32", "OptionalInt64", "OptionalUint32", "OptionalUint64", "OptionalSint32", "OptionalSint64", "OptionalFixed32", "OptionalFixed64", "OptionalSfixed32", "OptionalSfixed64", "OptionalFloat", "OptionalDouble", "OptionalBool", "OptionalString", "OptionalBytes", "OptionalNestedMessage", "OptionalForeignMessage", "OptionalNestedEnum", "OptionalForeignEnum", "OptionalStringPiece", "OptionalCord", "RecursiveMessage", "RepeatedInt32", "RepeatedInt64", "RepeatedUint32", "RepeatedUint64", "RepeatedSint32", "RepeatedSint64", "RepeatedFixed32", "RepeatedFixed64", "RepeatedSfixed32", "RepeatedSfixed64", "RepeatedFloat", "RepeatedDouble", "RepeatedBool", "RepeatedString", "RepeatedBytes", "RepeatedNestedMessage", "RepeatedForeignMessage", "RepeatedNestedEnum", "RepeatedForeignEnum", "RepeatedStringPiece", "RepeatedCord", "MapInt32Int32", "MapInt64Int64", "MapUint32Uint32", "MapUint64Uint64", "MapSint32Sint32", "MapSint64Sint64", "MapFixed32Fixed32", "MapFixed64Fixed64", "MapSfixed32Sfixed32", "MapSfixed64Sfixed64", "MapInt32Float", "MapInt32Double", "MapBoolBool", "MapStringString", "MapStringBytes", "MapStringNestedMessage", "MapStringForeignMessage", "MapStringNestedEnum", "MapStringForeignEnum", "OneofUint32", "OneofNestedMessage", "OneofString", "OneofBytes", "OneofBool", "OneofUint64", "OneofFloat", "OneofDouble", "OneofEnum", "OptionalBoolWrapper", "OptionalInt32Wrapper", "OptionalInt64Wrapper", "OptionalUint32Wrapper", "OptionalUint64Wrapper", "OptionalFloatWrapper", "OptionalDoubleWrapper", "OptionalStringWrapper", "OptionalBytesWrapper", "RepeatedBoolWrapper", "RepeatedInt32Wrapper", "RepeatedInt64Wrapper", "RepeatedUint32Wrapper", "RepeatedUint64Wrapper", "RepeatedFloatWrapper", "RepeatedDoubleWrapper", "RepeatedStringWrapper", "RepeatedBytesWrapper", "OptionalDuration", "OptionalTimestamp", "OptionalFieldMask", "OptionalStruct", "OptionalAny", "OptionalValue", "RepeatedDuration", "RepeatedTimestamp", "RepeatedFieldmask", "RepeatedStruct", "RepeatedAny", "RepeatedValue", "Fieldname1", "FieldName2", "FieldName3", "FieldName4", "Field0Name5", "Field0Name6", "FieldName7", "FieldName8", "FieldName9", "FieldName10", "FIELDNAME11", "FIELDName12", "FieldName13", "FieldName14", "FieldName15", "FieldName16", "FieldName17", "FieldName18" }, new[]{ "OneofField" }, new[]{ typeof(global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum) }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage), global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage.Parser, new[]{ "A", "Corecursive" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto3.TestAllTypesProto3), global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Parser, new[]{ "OptionalInt32", "OptionalInt64", "OptionalUint32", "OptionalUint64", "OptionalSint32", "OptionalSint64", "OptionalFixed32", "OptionalFixed64", "OptionalSfixed32", "OptionalSfixed64", "OptionalFloat", "OptionalDouble", "OptionalBool", "OptionalString", "OptionalBytes", "OptionalNestedMessage", "OptionalForeignMessage", "OptionalNestedEnum", "OptionalForeignEnum", "OptionalStringPiece", "OptionalCord", "RecursiveMessage", "RepeatedInt32", "RepeatedInt64", "RepeatedUint32", "RepeatedUint64", "RepeatedSint32", "RepeatedSint64", "RepeatedFixed32", "RepeatedFixed64", "RepeatedSfixed32", "RepeatedSfixed64", "RepeatedFloat", "RepeatedDouble", "RepeatedBool", "RepeatedString", "RepeatedBytes", "RepeatedNestedMessage", "RepeatedForeignMessage", "RepeatedNestedEnum", "RepeatedForeignEnum", "RepeatedStringPiece", "RepeatedCord", "MapInt32Int32", "MapInt64Int64", "MapUint32Uint32", "MapUint64Uint64", "MapSint32Sint32", "MapSint64Sint64", "MapFixed32Fixed32", "MapFixed64Fixed64", "MapSfixed32Sfixed32", "MapSfixed64Sfixed64", "MapInt32Float", "MapInt32Double", "MapBoolBool", "MapStringString", "MapStringBytes", "MapStringNestedMessage", "MapStringForeignMessage", "MapStringNestedEnum", "MapStringForeignEnum", "OneofUint32", "OneofNestedMessage", "OneofString", "OneofBytes", "OneofBool", "OneofUint64", "OneofFloat", "OneofDouble", "OneofEnum", "OptionalBoolWrapper", "OptionalInt32Wrapper", "OptionalInt64Wrapper", "OptionalUint32Wrapper", "OptionalUint64Wrapper", "OptionalFloatWrapper", "OptionalDoubleWrapper", "OptionalStringWrapper", "OptionalBytesWrapper", "RepeatedBoolWrapper", "RepeatedInt32Wrapper", "RepeatedInt64Wrapper", "RepeatedUint32Wrapper", "RepeatedUint64Wrapper", "RepeatedFloatWrapper", "RepeatedDoubleWrapper", "RepeatedStringWrapper", "RepeatedBytesWrapper", "OptionalDuration", "OptionalTimestamp", "OptionalFieldMask", "OptionalStruct", "OptionalAny", "OptionalValue", "RepeatedDuration", "RepeatedTimestamp", "RepeatedFieldmask", "RepeatedStruct", "RepeatedAny", "RepeatedValue", "Fieldname1", "FieldName2", "FieldName3", "FieldName4", "Field0Name5", "Field0Name6", "FieldName7", "FieldName8", "FieldName9", "FieldName10", "FIELDNAME11", "FIELDName12", "FieldName13", "FieldName14", "FieldName15", "FieldName16", "FieldName17", "FieldName18" }, new[]{ "OneofField" }, new[]{ typeof(global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedEnum) }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedMessage), global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedMessage.Parser, new[]{ "A", "Corecursive" }, null, null, null), null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, }), new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufTestMessages.Proto3.ForeignMessage), global::ProtobufTestMessages.Proto3.ForeignMessage.Parser, new[]{ "C" }, null, null, null) })); @@ -227,10 +231,10 @@ namespace ProtobufTestMessages.Proto3 { /// could trigger bugs that occur in any message type in this file. We verify /// this stays true in a unit test. /// - public sealed partial class TestAllTypes : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestAllTypes()); + public sealed partial class TestAllTypesProto3 : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestAllTypesProto3()); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { @@ -243,14 +247,14 @@ namespace ProtobufTestMessages.Proto3 { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public TestAllTypes() { + public TestAllTypesProto3() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public TestAllTypes(TestAllTypes other) : this() { + public TestAllTypesProto3(TestAllTypesProto3 other) : this() { optionalInt32_ = other.optionalInt32_; optionalInt64_ = other.optionalInt64_; optionalUint32_ = other.optionalUint32_; @@ -394,8 +398,8 @@ namespace ProtobufTestMessages.Proto3 { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public TestAllTypes Clone() { - return new TestAllTypes(this); + public TestAllTypesProto3 Clone() { + return new TestAllTypesProto3(this); } /// Field number for the "optional_int32" field. @@ -568,9 +572,9 @@ namespace ProtobufTestMessages.Proto3 { /// Field number for the "optional_nested_message" field. public const int OptionalNestedMessageFieldNumber = 18; - private global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage optionalNestedMessage_; + private global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedMessage optionalNestedMessage_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage OptionalNestedMessage { + public global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedMessage OptionalNestedMessage { get { return optionalNestedMessage_; } set { optionalNestedMessage_ = value; @@ -590,9 +594,9 @@ namespace ProtobufTestMessages.Proto3 { /// Field number for the "optional_nested_enum" field. public const int OptionalNestedEnumFieldNumber = 21; - private global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum optionalNestedEnum_ = 0; + private global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedEnum optionalNestedEnum_ = 0; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum OptionalNestedEnum { + public global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedEnum OptionalNestedEnum { get { return optionalNestedEnum_; } set { optionalNestedEnum_ = value; @@ -634,9 +638,9 @@ namespace ProtobufTestMessages.Proto3 { /// Field number for the "recursive_message" field. public const int RecursiveMessageFieldNumber = 27; - private global::ProtobufTestMessages.Proto3.TestAllTypes recursiveMessage_; + private global::ProtobufTestMessages.Proto3.TestAllTypesProto3 recursiveMessage_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::ProtobufTestMessages.Proto3.TestAllTypes RecursiveMessage { + public global::ProtobufTestMessages.Proto3.TestAllTypesProto3 RecursiveMessage { get { return recursiveMessage_; } set { recursiveMessage_ = value; @@ -798,11 +802,11 @@ namespace ProtobufTestMessages.Proto3 { /// Field number for the "repeated_nested_message" field. public const int RepeatedNestedMessageFieldNumber = 48; - private static readonly pb::FieldCodec _repeated_repeatedNestedMessage_codec - = pb::FieldCodec.ForMessage(386, global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage.Parser); - private readonly pbc::RepeatedField repeatedNestedMessage_ = new pbc::RepeatedField(); + private static readonly pb::FieldCodec _repeated_repeatedNestedMessage_codec + = pb::FieldCodec.ForMessage(386, global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedMessage.Parser); + private readonly pbc::RepeatedField repeatedNestedMessage_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField RepeatedNestedMessage { + public pbc::RepeatedField RepeatedNestedMessage { get { return repeatedNestedMessage_; } } @@ -818,11 +822,11 @@ namespace ProtobufTestMessages.Proto3 { /// Field number for the "repeated_nested_enum" field. public const int RepeatedNestedEnumFieldNumber = 51; - private static readonly pb::FieldCodec _repeated_repeatedNestedEnum_codec - = pb::FieldCodec.ForEnum(410, x => (int) x, x => (global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum) x); - private readonly pbc::RepeatedField repeatedNestedEnum_ = new pbc::RepeatedField(); + private static readonly pb::FieldCodec _repeated_repeatedNestedEnum_codec + = pb::FieldCodec.ForEnum(410, x => (int) x, x => (global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedEnum) x); + private readonly pbc::RepeatedField repeatedNestedEnum_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField RepeatedNestedEnum { + public pbc::RepeatedField RepeatedNestedEnum { get { return repeatedNestedEnum_; } } @@ -1011,11 +1015,11 @@ namespace ProtobufTestMessages.Proto3 { /// Field number for the "map_string_nested_message" field. public const int MapStringNestedMessageFieldNumber = 71; - private static readonly pbc::MapField.Codec _map_mapStringNestedMessage_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage.Parser), 570); - private readonly pbc::MapField mapStringNestedMessage_ = new pbc::MapField(); + private static readonly pbc::MapField.Codec _map_mapStringNestedMessage_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForMessage(18, global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedMessage.Parser), 570); + private readonly pbc::MapField mapStringNestedMessage_ = new pbc::MapField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::MapField MapStringNestedMessage { + public pbc::MapField MapStringNestedMessage { get { return mapStringNestedMessage_; } } @@ -1031,11 +1035,11 @@ namespace ProtobufTestMessages.Proto3 { /// Field number for the "map_string_nested_enum" field. public const int MapStringNestedEnumFieldNumber = 73; - private static readonly pbc::MapField.Codec _map_mapStringNestedEnum_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum) x), 586); - private readonly pbc::MapField mapStringNestedEnum_ = new pbc::MapField(); + private static readonly pbc::MapField.Codec _map_mapStringNestedEnum_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedEnum) x), 586); + private readonly pbc::MapField mapStringNestedEnum_ = new pbc::MapField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::MapField MapStringNestedEnum { + public pbc::MapField MapStringNestedEnum { get { return mapStringNestedEnum_; } } @@ -1063,8 +1067,8 @@ namespace ProtobufTestMessages.Proto3 { /// Field number for the "oneof_nested_message" field. public const int OneofNestedMessageFieldNumber = 112; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage OneofNestedMessage { - get { return oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage ? (global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage) oneofField_ : null; } + public global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedMessage OneofNestedMessage { + get { return oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage ? (global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedMessage) oneofField_ : null; } set { oneofField_ = value; oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.OneofNestedMessage; @@ -1140,8 +1144,8 @@ namespace ProtobufTestMessages.Proto3 { /// Field number for the "oneof_enum" field. public const int OneofEnumFieldNumber = 119; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum OneofEnum { - get { return oneofFieldCase_ == OneofFieldOneofCase.OneofEnum ? (global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum) oneofField_ : 0; } + public global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedEnum OneofEnum { + get { return oneofFieldCase_ == OneofFieldOneofCase.OneofEnum ? (global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedEnum) oneofField_ : 0; } set { oneofField_ = value; oneofFieldCase_ = OneofFieldOneofCase.OneofEnum; @@ -1705,11 +1709,11 @@ namespace ProtobufTestMessages.Proto3 { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { - return Equals(other as TestAllTypes); + return Equals(other as TestAllTypesProto3); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(TestAllTypes other) { + public bool Equals(TestAllTypesProto3 other) { if (ReferenceEquals(other, null)) { return false; } @@ -2530,7 +2534,7 @@ namespace ProtobufTestMessages.Proto3 { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(TestAllTypes other) { + public void MergeFrom(TestAllTypesProto3 other) { if (other == null) { return; } @@ -2581,7 +2585,7 @@ namespace ProtobufTestMessages.Proto3 { } if (other.optionalNestedMessage_ != null) { if (optionalNestedMessage_ == null) { - optionalNestedMessage_ = new global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage(); + optionalNestedMessage_ = new global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedMessage(); } OptionalNestedMessage.MergeFrom(other.OptionalNestedMessage); } @@ -2605,7 +2609,7 @@ namespace ProtobufTestMessages.Proto3 { } if (other.recursiveMessage_ != null) { if (recursiveMessage_ == null) { - recursiveMessage_ = new global::ProtobufTestMessages.Proto3.TestAllTypes(); + recursiveMessage_ = new global::ProtobufTestMessages.Proto3.TestAllTypesProto3(); } RecursiveMessage.MergeFrom(other.RecursiveMessage); } @@ -2901,7 +2905,7 @@ namespace ProtobufTestMessages.Proto3 { } case 146: { if (optionalNestedMessage_ == null) { - optionalNestedMessage_ = new global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage(); + optionalNestedMessage_ = new global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedMessage(); } input.ReadMessage(optionalNestedMessage_); break; @@ -2914,7 +2918,7 @@ namespace ProtobufTestMessages.Proto3 { break; } case 168: { - optionalNestedEnum_ = (global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedEnum) input.ReadEnum(); + optionalNestedEnum_ = (global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedEnum) input.ReadEnum(); break; } case 176: { @@ -2931,7 +2935,7 @@ namespace ProtobufTestMessages.Proto3 { } case 218: { if (recursiveMessage_ == null) { - recursiveMessage_ = new global::ProtobufTestMessages.Proto3.TestAllTypes(); + recursiveMessage_ = new global::ProtobufTestMessages.Proto3.TestAllTypesProto3(); } input.ReadMessage(recursiveMessage_); break; @@ -3116,7 +3120,7 @@ namespace ProtobufTestMessages.Proto3 { break; } case 898: { - global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage subBuilder = new global::ProtobufTestMessages.Proto3.TestAllTypes.Types.NestedMessage(); + global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedMessage subBuilder = new global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Types.NestedMessage(); if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) { subBuilder.MergeFrom(OneofNestedMessage); } @@ -3395,7 +3399,7 @@ namespace ProtobufTestMessages.Proto3 { } #region Nested types - /// Container for nested types declared in the TestAllTypes message type. + /// Container for nested types declared in the TestAllTypesProto3 message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static partial class Types { public enum NestedEnum { @@ -3415,7 +3419,7 @@ namespace ProtobufTestMessages.Proto3 { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::ProtobufTestMessages.Proto3.TestAllTypes.Descriptor.NestedTypes[0]; } + get { return global::ProtobufTestMessages.Proto3.TestAllTypesProto3.Descriptor.NestedTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -3454,9 +3458,9 @@ namespace ProtobufTestMessages.Proto3 { /// Field number for the "corecursive" field. public const int CorecursiveFieldNumber = 2; - private global::ProtobufTestMessages.Proto3.TestAllTypes corecursive_; + private global::ProtobufTestMessages.Proto3.TestAllTypesProto3 corecursive_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::ProtobufTestMessages.Proto3.TestAllTypes Corecursive { + public global::ProtobufTestMessages.Proto3.TestAllTypesProto3 Corecursive { get { return corecursive_; } set { corecursive_ = value; @@ -3528,7 +3532,7 @@ namespace ProtobufTestMessages.Proto3 { } if (other.corecursive_ != null) { if (corecursive_ == null) { - corecursive_ = new global::ProtobufTestMessages.Proto3.TestAllTypes(); + corecursive_ = new global::ProtobufTestMessages.Proto3.TestAllTypesProto3(); } Corecursive.MergeFrom(other.Corecursive); } @@ -3548,7 +3552,7 @@ namespace ProtobufTestMessages.Proto3 { } case 18: { if (corecursive_ == null) { - corecursive_ = new global::ProtobufTestMessages.Proto3.TestAllTypes(); + corecursive_ = new global::ProtobufTestMessages.Proto3.TestAllTypesProto3(); } input.ReadMessage(corecursive_); break; -- cgit v1.2.3 From 32c8ed3b44cdb26316de3400e2eaab3e8b4670ce Mon Sep 17 00:00:00 2001 From: Yilun Chong Date: Wed, 5 Jul 2017 11:07:49 -0700 Subject: change csharp failure list --- conformance/failure_list_csharp.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'conformance') diff --git a/conformance/failure_list_csharp.txt b/conformance/failure_list_csharp.txt index d215235a..55e63922 100644 --- a/conformance/failure_list_csharp.txt +++ b/conformance/failure_list_csharp.txt @@ -2,7 +2,4 @@ Required.Proto3.ProtobufInput.IllegalZeroFieldNum_Case_0 Required.Proto3.ProtobufInput.IllegalZeroFieldNum_Case_1 Required.Proto3.ProtobufInput.IllegalZeroFieldNum_Case_2 Required.Proto3.ProtobufInput.IllegalZeroFieldNum_Case_3 -Required.Proto2.ProtobufInput.IllegalZeroFieldNum_Case_0 -Required.Proto2.ProtobufInput.IllegalZeroFieldNum_Case_1 -Required.Proto2.ProtobufInput.IllegalZeroFieldNum_Case_2 -Required.Proto2.ProtobufInput.IllegalZeroFieldNum_Case_3 + -- cgit v1.2.3 From bceb830c396e3370d4cc15e0d4f96ed1819dcca9 Mon Sep 17 00:00:00 2001 From: Yilun Chong Date: Wed, 5 Jul 2017 12:15:53 -0700 Subject: add comments in makefile.am --- conformance/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'conformance') diff --git a/conformance/Makefile.am b/conformance/Makefile.am index dcd1714c..9fad5409 100644 --- a/conformance/Makefile.am +++ b/conformance/Makefile.am @@ -4,8 +4,9 @@ conformance_protoc_inputs = \ conformance.proto \ $(top_srcdir)/src/google/protobuf/test_messages_proto3.proto +# proto2 input files, should be separated with proto3, as we +# can't generate proto2 files for ruby, php and objc conformance_proto2_protoc_inputs = \ - conformance.proto \ $(top_srcdir)/src/google/protobuf/test_messages_proto2.proto well_known_type_protoc_inputs = \ -- cgit v1.2.3