aboutsummaryrefslogtreecommitdiffhomepage
path: root/conformance/conformance_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'conformance/conformance_test.cc')
-rw-r--r--conformance/conformance_test.cc24
1 files changed, 23 insertions, 1 deletions
diff --git a/conformance/conformance_test.cc b/conformance/conformance_test.cc
index 98c2eae4..22bbbfb3 100644
--- a/conformance/conformance_test.cc
+++ b/conformance/conformance_test.cc
@@ -754,7 +754,7 @@ void ConformanceTestSuite::TestValidDataForType(
}
void ConformanceTestSuite::SetFailureList(const string& filename,
- const vector<string>& failure_list) {
+ const std::vector<string>& failure_list) {
failure_list_filename_ = filename;
expected_to_fail_.clear();
std::copy(failure_list.begin(), failure_list.end(),
@@ -1910,6 +1910,10 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner,
{
TestAllTypesProto3 messageProto3;
TestAllTypesProto2 messageProto2;
+ //TODO(yilunchong): update this behavior when unknown field's behavior
+ // changed in open source. Also delete
+ // Required.Proto3.ProtobufInput.UnknownVarint.ProtobufOutput
+ // from failure list of python_cpp python java
TestUnknownMessage(messageProto3, true);
TestUnknownMessage(messageProto2, false);
}
@@ -2321,6 +2325,24 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner,
}
)");
RunValidJsonTest(
+ "ValueAcceptListWithNull", REQUIRED,
+ R"({"optionalValue": ["x", null, "y"]})",
+ R"(
+ optional_value: {
+ list_value: {
+ values: {
+ string_value: "x"
+ }
+ values: {
+ null_value: NULL_VALUE
+ }
+ values: {
+ string_value: "y"
+ }
+ }
+ }
+ )");
+ RunValidJsonTest(
"ValueAcceptObject", REQUIRED,
R"({"optionalValue": {"value": 1}})",
R"(