aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-03-10 16:22:19 -0800
committerGravatar Muxi Yan <mxyan@google.com>2017-03-10 16:22:19 -0800
commit7e151845ab580a7fd5fb72922d3381034045d7b4 (patch)
tree64fb4e928b7298769d2d2ba1d20e9b74629e563d /src/objective-c/GRPCClient
parent01bbf87bf78d40c9a8287fccf7ea0d64ff5cf07c (diff)
Wrap entire GRPCCall (InternalTests) class in GRPC_TEST_OBJC
Diffstat (limited to 'src/objective-c/GRPCClient')
-rw-r--r--src/objective-c/GRPCClient/internal_testing/GRPCCall+InternalTests.h4
-rw-r--r--src/objective-c/GRPCClient/internal_testing/GRPCCall+InternalTests.m17
2 files changed, 8 insertions, 13 deletions
diff --git a/src/objective-c/GRPCClient/internal_testing/GRPCCall+InternalTests.h b/src/objective-c/GRPCClient/internal_testing/GRPCCall+InternalTests.h
index 6c12ce6355..29bd12f0cf 100644
--- a/src/objective-c/GRPCClient/internal_testing/GRPCCall+InternalTests.h
+++ b/src/objective-c/GRPCClient/internal_testing/GRPCCall+InternalTests.h
@@ -31,6 +31,8 @@
*
*/
+#ifdef GRPC_TEST_OBJC
+
#import "../GRPCCall.h"
/**
@@ -55,3 +57,5 @@
+ (NSArray *)obtainAndCleanOpBatchLog;
@end
+
+#endif
diff --git a/src/objective-c/GRPCClient/internal_testing/GRPCCall+InternalTests.m b/src/objective-c/GRPCClient/internal_testing/GRPCCall+InternalTests.m
index 43c1c07831..6371df6739 100644
--- a/src/objective-c/GRPCClient/internal_testing/GRPCCall+InternalTests.m
+++ b/src/objective-c/GRPCClient/internal_testing/GRPCCall+InternalTests.m
@@ -31,6 +31,8 @@
*
*/
+#ifdef GRPC_TEST_OBJC
+
#import "GRPCCall+InternalTests.h"
#import "../private/GRPCOpBatchLog.h"
@@ -38,24 +40,13 @@
@implementation GRPCCall (InternalTests)
+ (void)enableOpBatchLog:(BOOL)enabled {
-#ifdef GRPC_TEST_OBJC
[GRPCOpBatchLog enableOpBatchLog:enabled];
-#else
- NSLog(@"This function is for internal testing of gRPC only. "
- "It is not part of gRPC's public interface. Do not use in production. "
- "To enable, set the preprocessor flag GRPC_TEST_OBJC.");
-#endif
}
+ (NSArray *)obtainAndCleanOpBatchLog {
-#ifdef GRPC_TEST_OBJC
return [GRPCOpBatchLog obtainAndCleanOpBatchLog];
-#else
- NSLog(@"This function is for internal testing of gRPC only. "
- "It is not part of gRPC's public interface. Do not use in production. "
- "To enable, set the preprocessor flag GRPC_TEST_OBJC.");
- return nil;
-#endif
}
@end
+
+#endif