From 29e4fadbfb55b7c5e96a032053635451bf969ffa Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Tue, 23 Jul 2019 12:42:30 -0700 Subject: [PATCH] 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 --- conformance/binary_json_conformance_suite.cc | 6 +++++- conformance/failure_list_php_c.txt | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/conformance/binary_json_conformance_suite.cc b/conformance/binary_json_conformance_suite.cc index 4ce5379116..96012a10b0 100644 --- a/conformance/binary_json_conformance_suite.cc +++ b/conformance/binary_json_conformance_suite.cc @@ -799,11 +799,15 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() { {delim("\xF0\x9F\x98\x81"), "\"\xF0\x9F\x98\x81\""}, // emoji: 😁 {delim(""), "\"\""}, }); + TestValidDataForType(FieldDescriptor::TYPE_BYTES, { + {delim("\x01\x02"), "\"\x01\x02\""}, + {delim("\xfb"), "\"\xfb\""}, + {delim(""), "\"\""}, + }); // TODO(haberman): // TestValidDataForType(FieldDescriptor::TYPE_GROUP // TestValidDataForType(FieldDescriptor::TYPE_MESSAGE - // TestValidDataForType(FieldDescriptor::TYPE_BYTES // TestValidDataForType(FieldDescriptor::TYPE_ENUM RunValidJsonTest("HelloWorld", REQUIRED, diff --git a/conformance/failure_list_php_c.txt b/conformance/failure_list_php_c.txt index 48a08a79c0..f436365a1e 100644 --- a/conformance/failure_list_php_c.txt +++ b/conformance/failure_list_php_c.txt @@ -44,3 +44,5 @@ Required.Proto3.ProtobufInput.ValidDataRepeated.FLOAT.JsonOutput Required.Proto3.JsonInput.RejectTopLevelNull Required.Proto3.ProtobufInput.ValidDataRepeated.STRING.JsonOutput Required.Proto3.ProtobufInput.ValidDataRepeated.STRING.ProtobufOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.BYTES.JsonOutput +Required.Proto3.ProtobufInput.ValidDataRepeated.BYTES.ProtobufOutput