Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
00b9b230
Commit
00b9b230
authored
Dec 15, 2018
by
Hao Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add conformance test for enum alias with same name but different case
parent
a6d624ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
binary_json_conformance_suite.cc
conformance/binary_json_conformance_suite.cc
+17
-0
No files found.
conformance/binary_json_conformance_suite.cc
View file @
00b9b230
...
...
@@ -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"})"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment