forked from twitter/elephant-bird
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request twitter#95 from rangadi/allow_enum_keys
Allow enum keys in thrift maps
- Loading branch information
Showing
4 changed files
with
52 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
namespace java com.twitter.elephantbird.thrift.test | ||
|
||
/** | ||
* various thrift classes used in unit tests | ||
*/ | ||
|
||
enum TestPhoneType { | ||
MOBILE = 0, | ||
HOME = 1, | ||
WORK = 2 | ||
} | ||
|
||
struct TestName { | ||
1: string first_name, | ||
2: string last_name | ||
} | ||
|
||
struct TestPerson { | ||
1: TestName name, | ||
2: map<TestPhoneType, string> phones, // for testing enum keys in maps. | ||
} | ||
|