From 1dcc329427fd103a0abd96ab787270f5d0a31861 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Thu, 21 May 2015 17:14:52 -0400 Subject: Objective C Second Alpha Drop - Style fixups in the code. - map<> serialization fixes and more tests. - Autocreation of map<> fields (to match repeated fields). - @@protoc_insertion_point(global_scope|imports). - Fixup proto2 syntax extension support. - Move all startup code to +initialize so it happen on class usage and not app startup. - Have generated headers use forward declarations and move imports into generated code, reduces what is need at compile time to speed up compiled and avoid pointless rippling of rebuilds. --- objectivec/Tests/GPBCodedInputStreamTests.m | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'objectivec/Tests/GPBCodedInputStreamTests.m') diff --git a/objectivec/Tests/GPBCodedInputStreamTests.m b/objectivec/Tests/GPBCodedInputStreamTests.m index 0a709cbe..5f29d7c8 100644 --- a/objectivec/Tests/GPBCodedInputStreamTests.m +++ b/objectivec/Tests/GPBCodedInputStreamTests.m @@ -184,7 +184,7 @@ XCTAssertEqual(message.serializedSize, (size_t)rawBytes.length); TestAllTypes* message2 = - [TestAllTypes parseFromData:rawBytes extensionRegistry:nil]; + [TestAllTypes parseFromData:rawBytes extensionRegistry:nil error:NULL]; [self assertAllFieldsSet:message2 repeatedCount:kGPBDefaultRepeatCount]; } @@ -227,8 +227,9 @@ // reading. GPBCodedInputStream* stream = [GPBCodedInputStream streamWithData:message.data]; - TestAllTypes* message2 = - [TestAllTypes parseFromCodedInputStream:stream extensionRegistry:nil]; + TestAllTypes* message2 = [TestAllTypes parseFromCodedInputStream:stream + extensionRegistry:nil + error:NULL]; XCTAssertEqualObjects(message.optionalBytes, message2.optionalBytes); @@ -280,8 +281,9 @@ NSData* data = [rawOutput propertyForKey:NSStreamDataWrittenToMemoryStreamKey]; GPBCodedInputStream* input = [GPBCodedInputStream streamWithData:data]; - TestAllTypes* message = - [TestAllTypes parseFromCodedInputStream:input extensionRegistry:nil]; + TestAllTypes* message = [TestAllTypes parseFromCodedInputStream:input + extensionRegistry:nil + error:NULL]; // Make sure we can read string properties twice without crashing. XCTAssertEqual([message.defaultString length], (NSUInteger)0); XCTAssertEqualObjects(@"", message.defaultString); -- cgit v1.2.3