Unverified Commit 29e4fadb authored by Paul Yang's avatar Paul Yang Committed by GitHub

Add binary conformance test case for bytes field (#6428)

* Add binary conformance test case for bytes field

* Add failed conformance test to php's failure list
parent 180d3e32
...@@ -799,11 +799,15 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() { ...@@ -799,11 +799,15 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() {
{delim("\xF0\x9F\x98\x81"), "\"\xF0\x9F\x98\x81\""}, // emoji: 😁 {delim("\xF0\x9F\x98\x81"), "\"\xF0\x9F\x98\x81\""}, // emoji: 😁
{delim(""), "\"\""}, {delim(""), "\"\""},
}); });
TestValidDataForType(FieldDescriptor::TYPE_BYTES, {
{delim("\x01\x02"), "\"\x01\x02\""},
{delim("\xfb"), "\"\xfb\""},
{delim(""), "\"\""},
});
// TODO(haberman): // TODO(haberman):
// TestValidDataForType(FieldDescriptor::TYPE_GROUP // TestValidDataForType(FieldDescriptor::TYPE_GROUP
// TestValidDataForType(FieldDescriptor::TYPE_MESSAGE // TestValidDataForType(FieldDescriptor::TYPE_MESSAGE
// TestValidDataForType(FieldDescriptor::TYPE_BYTES
// TestValidDataForType(FieldDescriptor::TYPE_ENUM // TestValidDataForType(FieldDescriptor::TYPE_ENUM
RunValidJsonTest("HelloWorld", REQUIRED, RunValidJsonTest("HelloWorld", REQUIRED,
......
...@@ -44,3 +44,5 @@ Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.JsonOutput ...@@ -44,3 +44,5 @@ Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.JsonOutput
Required.Proto3.JsonInput.RejectTopLevelNull Required.Proto3.JsonInput.RejectTopLevelNull
Required.Proto3.ProtobufInput.ValidDataRepeated.STRING.JsonOutput Required.Proto3.ProtobufInput.ValidDataRepeated.STRING.JsonOutput
Required.Proto3.ProtobufInput.ValidDataRepeated.STRING.ProtobufOutput Required.Proto3.ProtobufInput.ValidDataRepeated.STRING.ProtobufOutput
Required.Proto3.ProtobufInput.ValidDataRepeated.BYTES.JsonOutput
Required.Proto3.ProtobufInput.ValidDataRepeated.BYTES.ProtobufOutput
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment