Commit 00b9b230 authored by Hao Nguyen's avatar Hao Nguyen

Add conformance test for enum alias with same name but different case

parent a6d624ba
......@@ -1387,6 +1387,23 @@ void BinaryAndJsonConformanceSuite::RunSuiteImpl() {
R"({"optionalNestedEnum": "FOO"})",
"optional_nested_enum: FOO");
// Enum fields with alias
RunValidJsonTest(
"EnumFieldWithAlias", REQUIRED,
R"({"optionalAliasedEnum": "ALIAS_BAZ"})",
"optional_aliased_enum: ALIAS_BAZ");
RunValidJsonTest(
"EnumFieldWithAliasUseAlias", REQUIRED,
R"({"optionalAliasedEnum": "QUX"})",
"optional_aliased_enum: ALIAS_BAZ");
RunValidJsonTest(
"EnumFieldWithAliasLowerCase", REQUIRED,
R"({"optionalAliasedEnum": "qux"})",
"optional_aliased_enum: ALIAS_BAZ");
RunValidJsonTest(
"EnumFieldWithAliasDifferentCase", REQUIRED,
R"({"optionalAliasedEnum": "bAz"})",
"optional_aliased_enum: ALIAS_BAZ");
// Enum fields with alias
RunValidJsonTest(
"EnumFieldWithAlias", REQUIRED,
R"({"optionalAliasedEnum": "ALIAS_BAZ"})",
......
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