Unverified Commit 455440fc authored by Paul Yang's avatar Paul Yang Committed by GitHub

Add binary conformance test for enum fields. (#6434)

* Add binary conformance test for enum fields.

* Add failed conformance test to js failure list
parent 2c76c2c4
......@@ -804,11 +804,16 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() {
{delim("\xfb"), "\"\xfb\""},
{delim(""), "\"\""},
});
TestValidDataForType(FieldDescriptor::TYPE_ENUM, {
{varint(0), "FOO"},
{varint(1), "BAR"},
{varint(2), "BAZ"},
{varint(-1), "NEG"},
});
// TODO(haberman):
// TestValidDataForType(FieldDescriptor::TYPE_GROUP
// TestValidDataForType(FieldDescriptor::TYPE_MESSAGE
// TestValidDataForType(FieldDescriptor::TYPE_ENUM
RunValidJsonTest("HelloWorld", REQUIRED,
"{\"optionalString\":\"Hello, World!\"}",
......
......@@ -11,3 +11,4 @@ Required.Proto3.ProtobufInput.ValidDataRepeated.SINT32.ProtobufOutput
Required.Proto3.ProtobufInput.ValidDataRepeated.SINT64.ProtobufOutput
Required.Proto3.ProtobufInput.ValidDataRepeated.UINT32.ProtobufOutput
Required.Proto3.ProtobufInput.ValidDataRepeated.UINT64.ProtobufOutput
Required.Proto3.ProtobufInput.ValidDataRepeated.ENUM.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