Skip to content

Commit

Permalink
Add binary conformance test case for bytes field (#6428)
Browse files Browse the repository at this point in the history
* Add binary conformance test case for bytes field

* Add failed conformance test to php's failure list
  • Loading branch information
TeBoring authored Jul 23, 2019
1 parent 180d3e3 commit 29e4fad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion conformance/binary_json_conformance_suite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions conformance/failure_list_php_c.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 29e4fad

Please sign in to comment.