aboutsummaryrefslogtreecommitdiff
path: root/conformance/conformance_test.h
diff options
context:
space:
mode:
authorYilun Chong <yilunchong@google.com>2017-06-30 17:22:32 -0700
committerYilun Chong <yilunchong@google.com>2017-06-30 17:22:32 -0700
commit3adb054bbfa83530ca5a5fd54a856755fd72af83 (patch)
tree4d09a00969cdc7833dca181d6910b79f5ac877ae /conformance/conformance_test.h
parenta7d5be6a910caabc4b26d73bc5c369dbc638c4c3 (diff)
downloadprotobuf-3adb054bbfa83530ca5a5fd54a856755fd72af83.tar.gz
protobuf-3adb054bbfa83530ca5a5fd54a856755fd72af83.tar.bz2
protobuf-3adb054bbfa83530ca5a5fd54a856755fd72af83.zip
add some test proto2 supported, add js proto2 supported, fixed some error
Diffstat (limited to 'conformance/conformance_test.h')
-rw-r--r--conformance/conformance_test.h22
1 files changed, 13 insertions, 9 deletions
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 <class MessageType>
+ void TestOneofMessage (MessageType &message,
+ bool isProto3);
void TestValidDataForType(
google::protobuf::FieldDescriptor::Type,
std::vector<std::pair<std::string, std::string>> values);