aboutsummaryrefslogtreecommitdiff
path: root/objectivec/Tests/GPBMessageTests+Runtime.m
diff options
context:
space:
mode:
authorThomas Van Lenten <thomasvl@google.com>2015-09-29 11:41:53 -0400
committerThomas Van Lenten <thomasvl@google.com>2015-09-29 17:18:09 -0400
commit1383d53e67dac1d005fb3f8659e695b0be7e2718 (patch)
tree24b6f67087dc984bd5b1237c0e3964c34971604f /objectivec/Tests/GPBMessageTests+Runtime.m
parent0e5686a70768a289782eb1e1aa86646e56897e4d (diff)
downloadprotobuf-1383d53e67dac1d005fb3f8659e695b0be7e2718.tar.gz
protobuf-1383d53e67dac1d005fb3f8659e695b0be7e2718.tar.bz2
protobuf-1383d53e67dac1d005fb3f8659e695b0be7e2718.zip
Cleanups for newer Xcodes
- Move up to 8.4 as the high simulator (assuming Xcode 6.4). - Add cast to NSMutableDictionary so clang and resolve the selector. - Add case for the newer static analyzer so it won't trigger a false warning. - Update the "dictionary" interface to use "object" naming. Xcode 7+ has gotten more strict on the use of nonnull/nullable; combining that with the generic collection support; and the "dictionary" classes we created now collide with what the generic KeyValueCoding in the system headers triggering warnings/errors. Fix this and hopefully all future issue by renaming the methods to use "object" for the classes that have data types as objects instead of PODs. Taking this renaming hit now while ObjC is still in beta because it is a breaking change for any existing code.
Diffstat (limited to 'objectivec/Tests/GPBMessageTests+Runtime.m')
-rw-r--r--objectivec/Tests/GPBMessageTests+Runtime.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/objectivec/Tests/GPBMessageTests+Runtime.m b/objectivec/Tests/GPBMessageTests+Runtime.m
index 8942a843..e536bfec 100644
--- a/objectivec/Tests/GPBMessageTests+Runtime.m
+++ b/objectivec/Tests/GPBMessageTests+Runtime.m
@@ -2059,9 +2059,9 @@
// Ensure the messages are unique per map.
[msg1.mapInt32ForeignMessage
- enumerateKeysAndValuesUsingBlock:^(int32_t key, id value, BOOL *stop) {
+ enumerateKeysAndObjectsUsingBlock:^(int32_t key, id value, BOOL *stop) {
#pragma unused(stop)
- ForeignMessage *subMsg2 = [msg2.mapInt32ForeignMessage valueForKey:key];
+ ForeignMessage *subMsg2 = [msg2.mapInt32ForeignMessage objectForKey:key];
XCTAssertNotEqual(value, subMsg2); // Ptr compare, new object.
}];
}
@@ -2075,7 +2075,7 @@
// Add an uninitialized message.
TestRequired *subMsg = [[TestRequired alloc] init];
msg.mapField = [GPBInt32ObjectDictionary dictionary];
- [msg.mapField setValue:subMsg forKey:0];
+ [msg.mapField setObject:subMsg forKey:0];
XCTAssertFalse(msg.initialized);
// Initialize uninitialized message