diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2017-11-15 11:52:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-15 11:52:57 -0500 |
commit | 7417755e4066ff55f064984fc718826dd5f420ab (patch) | |
tree | ae01a96be369a61c8d7213b69d6d57a2c5ebffd2 /objectivec/Tests/GPBMessageTests.m | |
parent | 6552c5af3fa067778ec5fa2b65c6b4784f79e4b6 (diff) | |
parent | 8ae6844cf468d891cbca9976dfd160bd36e42cf5 (diff) |
Merge pull request #3883 from dmaclach/map_optimizations
Reduce size of GPBDictionary by getting rid of class creation methods
Diffstat (limited to 'objectivec/Tests/GPBMessageTests.m')
-rw-r--r-- | objectivec/Tests/GPBMessageTests.m | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/objectivec/Tests/GPBMessageTests.m b/objectivec/Tests/GPBMessageTests.m index c15535c5..4d75f1e1 100644 --- a/objectivec/Tests/GPBMessageTests.m +++ b/objectivec/Tests/GPBMessageTests.m @@ -1238,7 +1238,8 @@ // with different objects that are equal). TestRecursiveMessageWithRepeatedField *message3 = [TestRecursiveMessageWithRepeatedField message]; - message3.iToI = [GPBInt32Int32Dictionary dictionaryWithInt32:10 forKey:20]; + message3.iToI = [[[GPBInt32Int32Dictionary alloc] init] autorelease]; + [message3.iToI setInt32:10 forKey:20]; message3.strToStr = [NSMutableDictionary dictionaryWithObject:@"abc" forKey:@"123"]; XCTAssertNotNil(message.iToI); @@ -1323,7 +1324,8 @@ XCTAssertFalse([message hasA]); GPBInt32Int32Dictionary *iToI = [message.a.iToI retain]; XCTAssertEqual(iToI->_autocreator, message.a); // Pointer comparision - message.a.iToI = [GPBInt32Int32Dictionary dictionaryWithInt32:6 forKey:7]; + message.a.iToI = [[[GPBInt32Int32Dictionary alloc] init] autorelease]; + [message.a.iToI setInt32:6 forKey:7]; XCTAssertTrue([message hasA]); XCTAssertNotEqual(message.a.iToI, iToI); // Pointer comparision XCTAssertNil(iToI->_autocreator); |