diff --git a/conformance/binary_json_conformance_suite.cc b/conformance/binary_json_conformance_suite.cc index 9c34b42a0d42..4ce5379116a6 100644 --- a/conformance/binary_json_conformance_suite.cc +++ b/conformance/binary_json_conformance_suite.cc @@ -789,9 +789,18 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() { {zz64(kInt64Max), std::to_string(kInt64Max)}, {zz64(kInt64Min), std::to_string(kInt64Min)} }); + TestValidDataForType(FieldDescriptor::TYPE_STRING, { + {delim("Hello world!"), "\"Hello world!\""}, + {delim("\'\"\?\\\a\b\f\n\r\t\v"), + "\"\x27\\\"\x3F\\\\\x07\x08\x0C\\n\x0D\x09\x0B\""}, // escape + {delim("谷歌"), "\"谷歌\""}, // Google in Chinese + {delim("\u8C37\u6B4C"), "\"谷歌\""}, // unicode escape + {delim("\u8c37\u6b4c"), "\"谷歌\""}, // lowercase unicode + {delim("\xF0\x9F\x98\x81"), "\"\xF0\x9F\x98\x81\""}, // emoji: 😁 + {delim(""), "\"\""}, + }); // TODO(haberman): - // TestValidDataForType(FieldDescriptor::TYPE_STRING // TestValidDataForType(FieldDescriptor::TYPE_GROUP // TestValidDataForType(FieldDescriptor::TYPE_MESSAGE // TestValidDataForType(FieldDescriptor::TYPE_BYTES diff --git a/conformance/failure_list_php_c.txt b/conformance/failure_list_php_c.txt index 8f7af61855ec..48a08a79c033 100644 --- a/conformance/failure_list_php_c.txt +++ b/conformance/failure_list_php_c.txt @@ -42,3 +42,5 @@ Required.Proto3.ProtobufInput.FloatFieldNormalizeQuietNan.JsonOutput Required.Proto3.ProtobufInput.FloatFieldNormalizeSignalingNan.JsonOutput Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.JsonOutput Required.Proto3.JsonInput.RejectTopLevelNull +Required.Proto3.ProtobufInput.ValidDataRepeated.STRING.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.STRING.ProtobufOutput