From 2ff42dcf2c99105e7b550bfaccb0a42b9721138c Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Tue, 13 Dec 2016 16:31:02 -0800 Subject: Added conformance testing for binary primitive types. (#2491) This is basic and more tests will be added over time. --- conformance/conformance_test.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'conformance/conformance_test.h') diff --git a/conformance/conformance_test.h b/conformance/conformance_test.h index 2c5994b0..5f05a25b 100644 --- a/conformance/conformance_test.h +++ b/conformance/conformance_test.h @@ -175,9 +175,11 @@ class ConformanceTestSuite { ConformanceLevel level, const protobuf_test_messages::proto3::TestAllTypes& input, const string& equivalent_text_format); - void RunValidProtobufTest( - const string& test_name, - ConformanceLevel level, + void RunValidProtobufTest(const string& test_name, ConformanceLevel level, + const string& input_protobuf, + const string& equivalent_text_format); + void RunValidProtobufTestWithMessage( + const string& test_name, ConformanceLevel level, const protobuf_test_messages::proto3::TestAllTypes& input, const string& equivalent_text_format); @@ -199,6 +201,9 @@ class ConformanceTestSuite { const std::string& test_name, ConformanceLevel level); void TestPrematureEOFForType(google::protobuf::FieldDescriptor::Type type); + void TestValidDataForType( + google::protobuf::FieldDescriptor::Type, + 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