From 36650a07cf98ee4e734e07f2403fe5d20e300fc8 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Mon, 7 Mar 2016 12:07:03 -0500 Subject: HeaderDoc support in the library and generated sources - Convert most of the core library headers over to HeaderDoc format. - Switch the generated comments over to HeaderDoc. - Create GPBCodedOutputStream_PackagePrivate and move some things into there that should be more internal. --- objectivec/Tests/GPBCodedOuputStreamTests.m | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'objectivec/Tests') diff --git a/objectivec/Tests/GPBCodedOuputStreamTests.m b/objectivec/Tests/GPBCodedOuputStreamTests.m index 77d88033..0723b645 100644 --- a/objectivec/Tests/GPBCodedOuputStreamTests.m +++ b/objectivec/Tests/GPBCodedOuputStreamTests.m @@ -30,11 +30,30 @@ #import "GPBTestUtilities.h" -#import "GPBCodedOutputStream.h" +#import "GPBCodedOutputStream_PackagePrivate.h" #import "GPBCodedInputStream.h" #import "GPBUtilities_PackagePrivate.h" #import "google/protobuf/Unittest.pbobjc.h" +@interface GPBCodedOutputStream (InternalMethods) +// Declared in the .m file, expose for testing. +- (instancetype)initWithOutputStream:(NSOutputStream *)output + data:(NSMutableData *)data; +@end + +@interface GPBCodedOutputStream (Helper) ++ (instancetype)streamWithOutputStream:(NSOutputStream *)output + bufferSize:(size_t)bufferSize; +@end + +@implementation GPBCodedOutputStream (Helper) ++ (instancetype)streamWithOutputStream:(NSOutputStream *)output + bufferSize:(size_t)bufferSize { + NSMutableData *data = [NSMutableData dataWithLength:bufferSize]; + return [[[self alloc] initWithOutputStream:output data:data] autorelease]; +} +@end + @interface CodedOutputStreamTests : GPBTestCase @end -- cgit v1.2.3