aboutsummaryrefslogtreecommitdiff
path: root/conformance/conformance_test.h
diff options
context:
space:
mode:
Diffstat (limited to 'conformance/conformance_test.h')
-rw-r--r--conformance/conformance_test.h28
1 files changed, 20 insertions, 8 deletions
diff --git a/conformance/conformance_test.h b/conformance/conformance_test.h
index 08f16b8f..5f05a25b 100644
--- a/conformance/conformance_test.h
+++ b/conformance/conformance_test.h
@@ -49,9 +49,14 @@
namespace conformance {
class ConformanceRequest;
class ConformanceResponse;
-class TestAllTypes;
} // namespace conformance
+namespace protobuf_test_messages {
+namespace proto3 {
+class TestAllTypes;
+} // namespace proto3
+} // namespace protobuf_test_messages
+
namespace google {
namespace protobuf {
@@ -165,14 +170,18 @@ class ConformanceTestSuite {
ConformanceLevel level,
const string& input_json,
const string& equivalent_text_format);
- void RunValidJsonTestWithProtobufInput(const string& test_name,
- ConformanceLevel level,
- const conformance::TestAllTypes& input,
- const string& equivalent_text_format);
- void RunValidProtobufTest(const string& test_name,
- ConformanceLevel level,
- const conformance::TestAllTypes& input,
+ void RunValidJsonTestWithProtobufInput(
+ const string& test_name,
+ ConformanceLevel level,
+ const protobuf_test_messages::proto3::TestAllTypes& input,
+ const string& equivalent_text_format);
+ 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);
typedef std::function<bool(const Json::Value&)> Validator;
void RunValidJsonTestWithValidator(const string& test_name,
@@ -192,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<std::pair<std::string, std::string>> values);
bool CheckSetEmpty(const set<string>& set_to_check,
const std::string& write_to_file, const std::string& msg);
ConformanceTestRunner* runner_;