aboutsummaryrefslogtreecommitdiffhomepage
path: root/objectivec/Tests/GPBTestUtilities.h
diff options
context:
space:
mode:
Diffstat (limited to 'objectivec/Tests/GPBTestUtilities.h')
-rw-r--r--objectivec/Tests/GPBTestUtilities.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/objectivec/Tests/GPBTestUtilities.h b/objectivec/Tests/GPBTestUtilities.h
index 37e30f96..6ae68c3a 100644
--- a/objectivec/Tests/GPBTestUtilities.h
+++ b/objectivec/Tests/GPBTestUtilities.h
@@ -37,6 +37,13 @@
@class TestPackedExtensions;
@class GPBExtensionRegistry;
+
+// Helper for uses of C arrays in tests cases.
+#ifndef GPBARRAYSIZE
+#define GPBARRAYSIZE(a) ((sizeof(a) / sizeof((a[0]))))
+#endif // GPBARRAYSIZE
+
+
// The number of repetitions of any repeated objects inside of test messages.
extern const uint32_t kGPBDefaultRepeatCount;