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_test.h | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'conformance/conformance_test.h') 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_; -- cgit v1.2.3