gmock-pp.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. #ifndef THIRD_PARTY_GOOGLETEST_GOOGLEMOCK_INCLUDE_GMOCK_PP_H_
  2. #define THIRD_PARTY_GOOGLETEST_GOOGLEMOCK_INCLUDE_GMOCK_PP_H_
  3. #undef GMOCK_PP_INTERNAL_USE_MSVC
  4. #if defined(__clang__)
  5. #define GMOCK_PP_INTERNAL_USE_MSVC 0
  6. #elif defined(_MSC_VER)
  7. // TODO(iserna): Also verify tradional versus comformant preprocessor.
  8. static_assert(
  9. _MSC_VER >= 1900,
  10. "MSVC version not supported. There is support for MSVC 14.0 and above.");
  11. #define GMOCK_PP_INTERNAL_USE_MSVC 1
  12. #else
  13. #define GMOCK_PP_INTERNAL_USE_MSVC 0
  14. #endif
  15. // Expands and concatenates the arguments. Constructed macros reevaluate.
  16. #define GMOCK_PP_CAT(_1, _2) GMOCK_PP_INTERNAL_CAT(_1, _2)
  17. // Expands and stringifies the only argument.
  18. #define GMOCK_PP_STRINGIZE(...) GMOCK_PP_INTERNAL_STRINGIZE(__VA_ARGS__)
  19. // Returns empty. Given a variadic number of arguments.
  20. #define GMOCK_PP_EMPTY(...)
  21. // Returns a comma. Given a variadic number of arguments.
  22. #define GMOCK_PP_COMMA(...) ,
  23. // Returns the only argument.
  24. #define GMOCK_PP_IDENTITY(_1) _1
  25. // MSVC preprocessor collapses __VA_ARGS__ in a single argument, we use a
  26. // CAT-like directive to force correct evaluation. Each macro has its own.
  27. #if GMOCK_PP_INTERNAL_USE_MSVC
  28. // Evaluates to the number of arguments after expansion.
  29. //
  30. // #define PAIR x, y
  31. //
  32. // GMOCK_PP_NARG() => 1
  33. // GMOCK_PP_NARG(x) => 1
  34. // GMOCK_PP_NARG(x, y) => 2
  35. // GMOCK_PP_NARG(PAIR) => 2
  36. //
  37. // Requires: the number of arguments after expansion is at most 15.
  38. #define GMOCK_PP_NARG(...) \
  39. GMOCK_PP_INTERNAL_NARG_CAT( \
  40. GMOCK_PP_INTERNAL_INTERNAL_16TH(__VA_ARGS__, 15, 14, 13, 12, 11, 10, 9, \
  41. 8, 7, 6, 5, 4, 3, 2, 1), )
  42. // Returns 1 if the expansion of arguments has an unprotected comma. Otherwise
  43. // returns 0. Requires no more than 15 unprotected commas.
  44. #define GMOCK_PP_HAS_COMMA(...) \
  45. GMOCK_PP_INTERNAL_HAS_COMMA_CAT( \
  46. GMOCK_PP_INTERNAL_INTERNAL_16TH(__VA_ARGS__, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
  47. 1, 1, 1, 1, 1, 0), )
  48. // Returns the first argument.
  49. #define GMOCK_PP_HEAD(...) \
  50. GMOCK_PP_INTERNAL_HEAD_CAT(GMOCK_PP_INTERNAL_HEAD(__VA_ARGS__), )
  51. // Returns the tail. A variadic list of all arguments minus the first. Requires
  52. // at least one argument.
  53. #define GMOCK_PP_TAIL(...) \
  54. GMOCK_PP_INTERNAL_TAIL_CAT(GMOCK_PP_INTERNAL_TAIL(__VA_ARGS__), )
  55. // Calls CAT(_Macro, NARG(__VA_ARGS__))(__VA_ARGS__)
  56. #define GMOCK_PP_VARIADIC_CALL(_Macro, ...) \
  57. GMOCK_PP_INTERNAL_VARIADIC_CALL_CAT( \
  58. GMOCK_PP_CAT(_Macro, GMOCK_PP_NARG(__VA_ARGS__))(__VA_ARGS__), )
  59. #else // GMOCK_PP_INTERNAL_USE_MSVC
  60. #define GMOCK_PP_NARG(...) \
  61. GMOCK_PP_INTERNAL_INTERNAL_16TH(__VA_ARGS__, 15, 14, 13, 12, 11, 10, 9, 8, \
  62. 7, 6, 5, 4, 3, 2, 1)
  63. #define GMOCK_PP_HAS_COMMA(...) \
  64. GMOCK_PP_INTERNAL_INTERNAL_16TH(__VA_ARGS__, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
  65. 1, 1, 1, 1, 0)
  66. #define GMOCK_PP_HEAD(...) GMOCK_PP_INTERNAL_HEAD(__VA_ARGS__)
  67. #define GMOCK_PP_TAIL(...) GMOCK_PP_INTERNAL_TAIL(__VA_ARGS__)
  68. #define GMOCK_PP_VARIADIC_CALL(_Macro, ...) \
  69. GMOCK_PP_CAT(_Macro, GMOCK_PP_NARG(__VA_ARGS__))(__VA_ARGS__)
  70. #endif // GMOCK_PP_INTERNAL_USE_MSVC
  71. // If the arguments after expansion have no tokens, evaluates to `1`. Otherwise
  72. // evaluates to `0`.
  73. //
  74. // Requires: * the number of arguments after expansion is at most 15.
  75. // * If the argument is a macro, it must be able to be called with one
  76. // argument.
  77. //
  78. // Implementation details:
  79. //
  80. // There is one case when it generates a compile error: if the argument is macro
  81. // that cannot be called with one argument.
  82. //
  83. // #define M(a, b) // it doesn't matter what it expands to
  84. //
  85. // // Expected: expands to `0`.
  86. // // Actual: compile error.
  87. // GMOCK_PP_IS_EMPTY(M)
  88. //
  89. // There are 4 cases tested:
  90. //
  91. // * __VA_ARGS__ possible expansion has no unparen'd commas. Expected 0.
  92. // * __VA_ARGS__ possible expansion is not enclosed in parenthesis. Expected 0.
  93. // * __VA_ARGS__ possible expansion is not a macro that ()-evaluates to a comma.
  94. // Expected 0
  95. // * __VA_ARGS__ is empty, or has unparen'd commas, or is enclosed in
  96. // parenthesis, or is a macro that ()-evaluates to comma. Expected 1.
  97. //
  98. // We trigger detection on '0001', i.e. on empty.
  99. #define GMOCK_PP_IS_EMPTY(...) \
  100. GMOCK_PP_INTERNAL_IS_EMPTY(GMOCK_PP_HAS_COMMA(__VA_ARGS__), \
  101. GMOCK_PP_HAS_COMMA(GMOCK_PP_COMMA __VA_ARGS__), \
  102. GMOCK_PP_HAS_COMMA(__VA_ARGS__()), \
  103. GMOCK_PP_HAS_COMMA(GMOCK_PP_COMMA __VA_ARGS__()))
  104. // Evaluates to _Then if _Cond is 1 and _Else if _Cond is 0.
  105. #define GMOCK_PP_IF(_Cond, _Then, _Else) \
  106. GMOCK_PP_CAT(GMOCK_PP_INTERNAL_IF_, _Cond)(_Then, _Else)
  107. // Evaluates to the number of arguments after expansion. Identifies 'empty' as
  108. // 0.
  109. //
  110. // #define PAIR x, y
  111. //
  112. // GMOCK_PP_NARG0() => 0
  113. // GMOCK_PP_NARG0(x) => 1
  114. // GMOCK_PP_NARG0(x, y) => 2
  115. // GMOCK_PP_NARG0(PAIR) => 2
  116. //
  117. // Requires: * the number of arguments after expansion is at most 15.
  118. // * If the argument is a macro, it must be able to be called with one
  119. // argument.
  120. #define GMOCK_PP_NARG0(...) \
  121. GMOCK_PP_IF(GMOCK_PP_IS_EMPTY(__VA_ARGS__), 0, GMOCK_PP_NARG(__VA_ARGS__))
  122. // Expands to 1 if the first argument starts with something in parentheses,
  123. // otherwise to 0.
  124. #define GMOCK_PP_IS_BEGIN_PARENS(...) \
  125. GMOCK_PP_INTERNAL_ALTERNATE_HEAD( \
  126. GMOCK_PP_CAT(GMOCK_PP_INTERNAL_IBP_IS_VARIADIC_R_, \
  127. GMOCK_PP_INTERNAL_IBP_IS_VARIADIC_C __VA_ARGS__))
  128. // Expands to 1 is there is only one argument and it is enclosed in parentheses.
  129. #define GMOCK_PP_IS_ENCLOSED_PARENS(...) \
  130. GMOCK_PP_IF(GMOCK_PP_IS_BEGIN_PARENS(__VA_ARGS__), \
  131. GMOCK_PP_IS_EMPTY(GMOCK_PP_EMPTY __VA_ARGS__), 0)
  132. // Remove the parens, requires GMOCK_PP_IS_ENCLOSED_PARENS(args) => 1.
  133. #define GMOCK_PP_REMOVE_PARENS(...) GMOCK_PP_INTERNAL_REMOVE_PARENS __VA_ARGS__
  134. // Expands to _Macro(0, _Data, e1) _Macro(1, _Data, e2) ... _Macro(K -1, _Data,
  135. // eK) as many of GMOCK_INTERNAL_NARG0 _Tuple.
  136. // Requires: * |_Macro| can be called with 3 arguments.
  137. // * |_Tuple| expansion has no more than 15 elements.
  138. #define GMOCK_PP_FOR_EACH(_Macro, _Data, _Tuple) \
  139. GMOCK_PP_CAT(GMOCK_PP_INTERNAL_FOR_EACH_IMPL_, GMOCK_PP_NARG0 _Tuple) \
  140. (0, _Macro, _Data, _Tuple)
  141. // Expands to _Macro(0, _Data, ) _Macro(1, _Data, ) ... _Macro(K - 1, _Data, )
  142. // Empty if _K = 0.
  143. // Requires: * |_Macro| can be called with 3 arguments.
  144. // * |_K| literal between 0 and 15
  145. #define GMOCK_PP_REPEAT(_Macro, _Data, _N) \
  146. GMOCK_PP_CAT(GMOCK_PP_INTERNAL_FOR_EACH_IMPL_, _N) \
  147. (0, _Macro, _Data, GMOCK_PP_INTENRAL_EMPTY_TUPLE)
  148. // Increments the argument, requires the argument to be between 0 and 15.
  149. #define GMOCK_PP_INC(_i) GMOCK_PP_CAT(GMOCK_PP_INTERNAL_INC_, _i)
  150. // Returns comma if _i != 0. Requires _i to be between 0 and 15.
  151. #define GMOCK_PP_COMMA_IF(_i) GMOCK_PP_CAT(GMOCK_PP_INTERNAL_COMMA_IF_, _i)
  152. // Internal details follow. Do not use any of these symbols outside of this
  153. // file or we will break your code.
  154. #define GMOCK_PP_INTENRAL_EMPTY_TUPLE (, , , , , , , , , , , , , , , )
  155. #define GMOCK_PP_INTERNAL_CAT(_1, _2) _1##_2
  156. #define GMOCK_PP_INTERNAL_STRINGIZE(...) #__VA_ARGS__
  157. #define GMOCK_PP_INTERNAL_INTERNAL_16TH(_1, _2, _3, _4, _5, _6, _7, _8, _9, \
  158. _10, _11, _12, _13, _14, _15, _16, \
  159. ...) \
  160. _16
  161. #define GMOCK_PP_INTERNAL_CAT_5(_1, _2, _3, _4, _5) _1##_2##_3##_4##_5
  162. #define GMOCK_PP_INTERNAL_IS_EMPTY(_1, _2, _3, _4) \
  163. GMOCK_PP_HAS_COMMA(GMOCK_PP_INTERNAL_CAT_5(GMOCK_PP_INTERNAL_IS_EMPTY_CASE_, \
  164. _1, _2, _3, _4))
  165. #define GMOCK_PP_INTERNAL_IS_EMPTY_CASE_0001 ,
  166. #define GMOCK_PP_INTERNAL_IF_1(_Then, _Else) _Then
  167. #define GMOCK_PP_INTERNAL_IF_0(_Then, _Else) _Else
  168. #define GMOCK_PP_INTERNAL_HEAD(_1, ...) _1
  169. #define GMOCK_PP_INTERNAL_TAIL(_1, ...) __VA_ARGS__
  170. #if GMOCK_PP_INTERNAL_USE_MSVC
  171. #define GMOCK_PP_INTERNAL_NARG_CAT(_1, _2) GMOCK_PP_INTERNAL_NARG_CAT_I(_1, _2)
  172. #define GMOCK_PP_INTERNAL_HEAD_CAT(_1, _2) GMOCK_PP_INTERNAL_HEAD_CAT_I(_1, _2)
  173. #define GMOCK_PP_INTERNAL_HAS_COMMA_CAT(_1, _2) \
  174. GMOCK_PP_INTERNAL_HAS_COMMA_CAT_I(_1, _2)
  175. #define GMOCK_PP_INTERNAL_TAIL_CAT(_1, _2) GMOCK_PP_INTERNAL_TAIL_CAT_I(_1, _2)
  176. #define GMOCK_PP_INTERNAL_VARIADIC_CALL_CAT(_1, _2) \
  177. GMOCK_PP_INTERNAL_VARIADIC_CALL_CAT_I(_1, _2)
  178. #define GMOCK_PP_INTERNAL_NARG_CAT_I(_1, _2) _1##_2
  179. #define GMOCK_PP_INTERNAL_HEAD_CAT_I(_1, _2) _1##_2
  180. #define GMOCK_PP_INTERNAL_HAS_COMMA_CAT_I(_1, _2) _1##_2
  181. #define GMOCK_PP_INTERNAL_TAIL_CAT_I(_1, _2) _1##_2
  182. #define GMOCK_PP_INTERNAL_VARIADIC_CALL_CAT_I(_1, _2) _1##_2
  183. #define GMOCK_PP_INTERNAL_ALTERNATE_HEAD(...) \
  184. GMOCK_PP_INTERNAL_ALTERNATE_HEAD_CAT(GMOCK_PP_HEAD(__VA_ARGS__), )
  185. #define GMOCK_PP_INTERNAL_ALTERNATE_HEAD_CAT(_1, _2) \
  186. GMOCK_PP_INTERNAL_ALTERNATE_HEAD_CAT_I(_1, _2)
  187. #define GMOCK_PP_INTERNAL_ALTERNATE_HEAD_CAT_I(_1, _2) _1##_2
  188. #else // GMOCK_PP_INTERNAL_USE_MSVC
  189. #define GMOCK_PP_INTERNAL_ALTERNATE_HEAD(...) GMOCK_PP_HEAD(__VA_ARGS__)
  190. #endif // GMOCK_PP_INTERNAL_USE_MSVC
  191. #define GMOCK_PP_INTERNAL_IBP_IS_VARIADIC_C(...) 1 _
  192. #define GMOCK_PP_INTERNAL_IBP_IS_VARIADIC_R_1 1,
  193. #define GMOCK_PP_INTERNAL_IBP_IS_VARIADIC_R_GMOCK_PP_INTERNAL_IBP_IS_VARIADIC_C \
  194. 0,
  195. #define GMOCK_PP_INTERNAL_REMOVE_PARENS(...) __VA_ARGS__
  196. #define GMOCK_PP_INTERNAL_INC_0 1
  197. #define GMOCK_PP_INTERNAL_INC_1 2
  198. #define GMOCK_PP_INTERNAL_INC_2 3
  199. #define GMOCK_PP_INTERNAL_INC_3 4
  200. #define GMOCK_PP_INTERNAL_INC_4 5
  201. #define GMOCK_PP_INTERNAL_INC_5 6
  202. #define GMOCK_PP_INTERNAL_INC_6 7
  203. #define GMOCK_PP_INTERNAL_INC_7 8
  204. #define GMOCK_PP_INTERNAL_INC_8 9
  205. #define GMOCK_PP_INTERNAL_INC_9 10
  206. #define GMOCK_PP_INTERNAL_INC_10 11
  207. #define GMOCK_PP_INTERNAL_INC_11 12
  208. #define GMOCK_PP_INTERNAL_INC_12 13
  209. #define GMOCK_PP_INTERNAL_INC_13 14
  210. #define GMOCK_PP_INTERNAL_INC_14 15
  211. #define GMOCK_PP_INTERNAL_INC_15 16
  212. #define GMOCK_PP_INTERNAL_COMMA_IF_0
  213. #define GMOCK_PP_INTERNAL_COMMA_IF_1 ,
  214. #define GMOCK_PP_INTERNAL_COMMA_IF_2 ,
  215. #define GMOCK_PP_INTERNAL_COMMA_IF_3 ,
  216. #define GMOCK_PP_INTERNAL_COMMA_IF_4 ,
  217. #define GMOCK_PP_INTERNAL_COMMA_IF_5 ,
  218. #define GMOCK_PP_INTERNAL_COMMA_IF_6 ,
  219. #define GMOCK_PP_INTERNAL_COMMA_IF_7 ,
  220. #define GMOCK_PP_INTERNAL_COMMA_IF_8 ,
  221. #define GMOCK_PP_INTERNAL_COMMA_IF_9 ,
  222. #define GMOCK_PP_INTERNAL_COMMA_IF_10 ,
  223. #define GMOCK_PP_INTERNAL_COMMA_IF_11 ,
  224. #define GMOCK_PP_INTERNAL_COMMA_IF_12 ,
  225. #define GMOCK_PP_INTERNAL_COMMA_IF_13 ,
  226. #define GMOCK_PP_INTERNAL_COMMA_IF_14 ,
  227. #define GMOCK_PP_INTERNAL_COMMA_IF_15 ,
  228. #define GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, _element) \
  229. _Macro(_i, _Data, _element)
  230. #define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_0(_i, _Macro, _Data, _Tuple)
  231. #define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_1(_i, _Macro, _Data, _Tuple) \
  232. GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple)
  233. #define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_2(_i, _Macro, _Data, _Tuple) \
  234. GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
  235. GMOCK_PP_INTERNAL_FOR_EACH_IMPL_1(GMOCK_PP_INC(_i), _Macro, _Data, \
  236. (GMOCK_PP_TAIL _Tuple))
  237. #define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_3(_i, _Macro, _Data, _Tuple) \
  238. GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
  239. GMOCK_PP_INTERNAL_FOR_EACH_IMPL_2(GMOCK_PP_INC(_i), _Macro, _Data, \
  240. (GMOCK_PP_TAIL _Tuple))
  241. #define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_4(_i, _Macro, _Data, _Tuple) \
  242. GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
  243. GMOCK_PP_INTERNAL_FOR_EACH_IMPL_3(GMOCK_PP_INC(_i), _Macro, _Data, \
  244. (GMOCK_PP_TAIL _Tuple))
  245. #define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_5(_i, _Macro, _Data, _Tuple) \
  246. GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
  247. GMOCK_PP_INTERNAL_FOR_EACH_IMPL_4(GMOCK_PP_INC(_i), _Macro, _Data, \
  248. (GMOCK_PP_TAIL _Tuple))
  249. #define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_6(_i, _Macro, _Data, _Tuple) \
  250. GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
  251. GMOCK_PP_INTERNAL_FOR_EACH_IMPL_5(GMOCK_PP_INC(_i), _Macro, _Data, \
  252. (GMOCK_PP_TAIL _Tuple))
  253. #define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_7(_i, _Macro, _Data, _Tuple) \
  254. GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
  255. GMOCK_PP_INTERNAL_FOR_EACH_IMPL_6(GMOCK_PP_INC(_i), _Macro, _Data, \
  256. (GMOCK_PP_TAIL _Tuple))
  257. #define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_8(_i, _Macro, _Data, _Tuple) \
  258. GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
  259. GMOCK_PP_INTERNAL_FOR_EACH_IMPL_7(GMOCK_PP_INC(_i), _Macro, _Data, \
  260. (GMOCK_PP_TAIL _Tuple))
  261. #define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_9(_i, _Macro, _Data, _Tuple) \
  262. GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
  263. GMOCK_PP_INTERNAL_FOR_EACH_IMPL_8(GMOCK_PP_INC(_i), _Macro, _Data, \
  264. (GMOCK_PP_TAIL _Tuple))
  265. #define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_10(_i, _Macro, _Data, _Tuple) \
  266. GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
  267. GMOCK_PP_INTERNAL_FOR_EACH_IMPL_9(GMOCK_PP_INC(_i), _Macro, _Data, \
  268. (GMOCK_PP_TAIL _Tuple))
  269. #define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_11(_i, _Macro, _Data, _Tuple) \
  270. GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
  271. GMOCK_PP_INTERNAL_FOR_EACH_IMPL_10(GMOCK_PP_INC(_i), _Macro, _Data, \
  272. (GMOCK_PP_TAIL _Tuple))
  273. #define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_12(_i, _Macro, _Data, _Tuple) \
  274. GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
  275. GMOCK_PP_INTERNAL_FOR_EACH_IMPL_11(GMOCK_PP_INC(_i), _Macro, _Data, \
  276. (GMOCK_PP_TAIL _Tuple))
  277. #define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_13(_i, _Macro, _Data, _Tuple) \
  278. GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
  279. GMOCK_PP_INTERNAL_FOR_EACH_IMPL_12(GMOCK_PP_INC(_i), _Macro, _Data, \
  280. (GMOCK_PP_TAIL _Tuple))
  281. #define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_14(_i, _Macro, _Data, _Tuple) \
  282. GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
  283. GMOCK_PP_INTERNAL_FOR_EACH_IMPL_13(GMOCK_PP_INC(_i), _Macro, _Data, \
  284. (GMOCK_PP_TAIL _Tuple))
  285. #define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_15(_i, _Macro, _Data, _Tuple) \
  286. GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
  287. GMOCK_PP_INTERNAL_FOR_EACH_IMPL_14(GMOCK_PP_INC(_i), _Macro, _Data, \
  288. (GMOCK_PP_TAIL _Tuple))
  289. #endif // THIRD_PARTY_GOOGLETEST_GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PP_H_