diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2016-04-26 19:11:14 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2016-04-26 19:11:14 -0400 |
commit | 66f074592dc343d6b4f7ad62fda5c26cccf6bf45 (patch) | |
tree | d0c0dd00376f74cf985428719766c6fcf2fdbbb5 /objectivec/Tests/GPBMessageTests.m | |
parent | 40574479978f80bd86caf44edae5b0a22d596c79 (diff) | |
parent | 18b6a321b5fd8f53e1029c436c2ad5dd2d3122df (diff) | |
download | protobuf-66f074592dc343d6b4f7ad62fda5c26cccf6bf45.tar.gz protobuf-66f074592dc343d6b4f7ad62fda5c26cccf6bf45.tar.bz2 protobuf-66f074592dc343d6b4f7ad62fda5c26cccf6bf45.zip |
Merge pull request #1454 from thomasvl/enum_defaults
Proper checking of enum with non zero default
Diffstat (limited to 'objectivec/Tests/GPBMessageTests.m')
-rw-r--r-- | objectivec/Tests/GPBMessageTests.m | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/objectivec/Tests/GPBMessageTests.m b/objectivec/Tests/GPBMessageTests.m index 43546156..0779c5ae 100644 --- a/objectivec/Tests/GPBMessageTests.m +++ b/objectivec/Tests/GPBMessageTests.m @@ -1947,4 +1947,11 @@ EnumTestMsg_MyEnum_NegTwo); } +- (void)testOneBasedEnumHolder { + // Test case for https://github.com/google/protobuf/issues/1453 + // Message with no explicit defaults, but a non zero default for an enum. + MessageWithOneBasedEnum *enumMsg = [MessageWithOneBasedEnum message]; + XCTAssertEqual(enumMsg.enumField, MessageWithOneBasedEnum_OneBasedEnum_One); +} + @end |