aboutsummaryrefslogtreecommitdiff
path: root/objectivec/GPBUnknownField.m
diff options
context:
space:
mode:
authorThomas Van Lenten <thomasvl@google.com>2017-10-03 09:56:54 -0400
committerThomas Van Lenten <thomasvl@google.com>2017-10-03 11:54:44 -0400
commita274c67caf9b6f85587ac812bf6e5837280dbaef (patch)
tree4a1f50186a7c37aa45bc2076d2907ba44428774f /objectivec/GPBUnknownField.m
parent947712353848c61f10714b099d42dd5d04afb109 (diff)
downloadprotobuf-a274c67caf9b6f85587ac812bf6e5837280dbaef.tar.gz
protobuf-a274c67caf9b6f85587ac812bf6e5837280dbaef.tar.bz2
protobuf-a274c67caf9b6f85587ac812bf6e5837280dbaef.zip
Build out more complete code coverage in the tests.
Diffstat (limited to 'objectivec/GPBUnknownField.m')
-rw-r--r--objectivec/GPBUnknownField.m6
1 files changed, 4 insertions, 2 deletions
diff --git a/objectivec/GPBUnknownField.m b/objectivec/GPBUnknownField.m
index 15e0a6dc..9d5c97f3 100644
--- a/objectivec/GPBUnknownField.m
+++ b/objectivec/GPBUnknownField.m
@@ -97,6 +97,7 @@
if (self == object) return YES;
if (![object isKindOfClass:[GPBUnknownField class]]) return NO;
GPBUnknownField *field = (GPBUnknownField *)object;
+ if (number_ != field->number_) return NO;
BOOL equalVarint =
(mutableVarintList_.count == 0 && field->mutableVarintList_.count == 0) ||
[mutableVarintList_ isEqual:field->mutableVarintList_];
@@ -202,8 +203,9 @@
}
- (NSString *)description {
- NSMutableString *description = [NSMutableString
- stringWithFormat:@"<%@ %p>: Field: %d {\n", [self class], self, number_];
+ NSMutableString *description =
+ [NSMutableString stringWithFormat:@"<%@ %p>: Field: %d {\n",
+ [self class], self, number_];
[mutableVarintList_
enumerateValuesWithBlock:^(uint64_t value, NSUInteger idx, BOOL *stop) {
#pragma unused(idx, stop)