aboutsummaryrefslogtreecommitdiffhomepage
path: root/objectivec/Tests/GPBCodedOuputStreamTests.m
diff options
context:
space:
mode:
authorGravatar Thomas Van Lenten <thomasvl@google.com>2016-03-07 12:07:03 -0500
committerGravatar Thomas Van Lenten <thomasvl@google.com>2016-03-07 12:07:03 -0500
commit36650a07cf98ee4e734e07f2403fe5d20e300fc8 (patch)
treeb731c6deb1d3503ba069397b6cda6fd387dce9af /objectivec/Tests/GPBCodedOuputStreamTests.m
parentf2d34086766ae33d3c945408f8dd3044921b1435 (diff)
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.
Diffstat (limited to 'objectivec/Tests/GPBCodedOuputStreamTests.m')
-rw-r--r--objectivec/Tests/GPBCodedOuputStreamTests.m21
1 files changed, 20 insertions, 1 deletions
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