gmock-generated-function-mockers.h 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752
  1. // This file was GENERATED by command:
  2. // pump.py gmock-generated-function-mockers.h.pump
  3. // DO NOT EDIT BY HAND!!!
  4. // Copyright 2007, Google Inc.
  5. // All rights reserved.
  6. //
  7. // Redistribution and use in source and binary forms, with or without
  8. // modification, are permitted provided that the following conditions are
  9. // met:
  10. //
  11. // * Redistributions of source code must retain the above copyright
  12. // notice, this list of conditions and the following disclaimer.
  13. // * Redistributions in binary form must reproduce the above
  14. // copyright notice, this list of conditions and the following disclaimer
  15. // in the documentation and/or other materials provided with the
  16. // distribution.
  17. // * Neither the name of Google Inc. nor the names of its
  18. // contributors may be used to endorse or promote products derived from
  19. // this software without specific prior written permission.
  20. //
  21. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  24. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  25. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  26. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  27. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  28. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  29. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  30. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  31. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. // Google Mock - a framework for writing C++ mock classes.
  33. //
  34. // This file implements function mockers of various arities.
  35. // GOOGLETEST_CM0002 DO NOT DELETE
  36. #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
  37. #define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
  38. #include <functional>
  39. #include <utility>
  40. #include "gmock/gmock-spec-builders.h"
  41. #include "gmock/internal/gmock-internal-utils.h"
  42. namespace testing {
  43. namespace internal {
  44. // Removes the given pointer; this is a helper for the expectation setter method
  45. // for parameterless matchers.
  46. //
  47. // We want to make sure that the user cannot set a parameterless expectation on
  48. // overloaded methods, including methods which are overloaded on const. Example:
  49. //
  50. // class MockClass {
  51. // MOCK_METHOD0(GetName, string&());
  52. // MOCK_CONST_METHOD0(GetName, const string&());
  53. // };
  54. //
  55. // TEST() {
  56. // // This should be an error, as it's not clear which overload is expected.
  57. // EXPECT_CALL(mock, GetName).WillOnce(ReturnRef(value));
  58. // }
  59. //
  60. // Here are the generated expectation-setter methods:
  61. //
  62. // class MockClass {
  63. // // Overload 1
  64. // MockSpec<string&()> gmock_GetName() { ... }
  65. // // Overload 2. Declared const so that the compiler will generate an
  66. // // error when trying to resolve between this and overload 4 in
  67. // // 'gmock_GetName(WithoutMatchers(), nullptr)'.
  68. // MockSpec<string&()> gmock_GetName(
  69. // const WithoutMatchers&, const Function<string&()>*) const {
  70. // // Removes const from this, calls overload 1
  71. // return AdjustConstness_(this)->gmock_GetName();
  72. // }
  73. //
  74. // // Overload 3
  75. // const string& gmock_GetName() const { ... }
  76. // // Overload 4
  77. // MockSpec<const string&()> gmock_GetName(
  78. // const WithoutMatchers&, const Function<const string&()>*) const {
  79. // // Does not remove const, calls overload 3
  80. // return AdjustConstness_const(this)->gmock_GetName();
  81. // }
  82. // }
  83. //
  84. template <typename MockType>
  85. const MockType* AdjustConstness_const(const MockType* mock) {
  86. return mock;
  87. }
  88. // Removes const from and returns the given pointer; this is a helper for the
  89. // expectation setter method for parameterless matchers.
  90. template <typename MockType>
  91. MockType* AdjustConstness_(const MockType* mock) {
  92. return const_cast<MockType*>(mock);
  93. }
  94. } // namespace internal
  95. // The style guide prohibits "using" statements in a namespace scope
  96. // inside a header file. However, the FunctionMocker class template
  97. // is meant to be defined in the ::testing namespace. The following
  98. // line is just a trick for working around a bug in MSVC 8.0, which
  99. // cannot handle it if we define FunctionMocker in ::testing.
  100. using internal::FunctionMocker;
  101. // GMOCK_RESULT_(tn, F) expands to the result type of function type F.
  102. // We define this as a variadic macro in case F contains unprotected
  103. // commas (the same reason that we use variadic macros in other places
  104. // in this file).
  105. // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
  106. #define GMOCK_RESULT_(tn, ...) \
  107. tn ::testing::internal::Function<__VA_ARGS__>::Result
  108. // The type of argument N of the given function type.
  109. // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
  110. #define GMOCK_ARG_(tn, N, ...) \
  111. tn ::testing::internal::Function<__VA_ARGS__>::template Arg<N-1>::type
  112. // The matcher type for argument N of the given function type.
  113. // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
  114. #define GMOCK_MATCHER_(tn, N, ...) \
  115. const ::testing::Matcher<GMOCK_ARG_(tn, N, __VA_ARGS__)>&
  116. // The variable for mocking the given method.
  117. // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
  118. #define GMOCK_MOCKER_(arity, constness, Method) \
  119. GTEST_CONCAT_TOKEN_(gmock##constness##arity##_##Method##_, __LINE__)
  120. // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
  121. #define GMOCK_METHOD0_(tn, constness, ct, Method, ...) \
  122. static_assert(0 == \
  123. ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \
  124. "MOCK_METHOD<N> must match argument count.");\
  125. GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
  126. ) constness { \
  127. GMOCK_MOCKER_(0, constness, Method).SetOwnerAndName(this, #Method); \
  128. return GMOCK_MOCKER_(0, constness, Method).Invoke(); \
  129. } \
  130. ::testing::MockSpec<__VA_ARGS__> \
  131. gmock_##Method() constness { \
  132. GMOCK_MOCKER_(0, constness, Method).RegisterOwner(this); \
  133. return GMOCK_MOCKER_(0, constness, Method).With(); \
  134. } \
  135. ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
  136. const ::testing::internal::WithoutMatchers&, \
  137. constness ::testing::internal::Function<__VA_ARGS__>* ) const { \
  138. return ::testing::internal::AdjustConstness_##constness(this)-> \
  139. gmock_##Method(); \
  140. } \
  141. mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(0, constness, \
  142. Method)
  143. // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
  144. #define GMOCK_METHOD1_(tn, constness, ct, Method, ...) \
  145. static_assert(1 == \
  146. ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \
  147. "MOCK_METHOD<N> must match argument count.");\
  148. GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
  149. GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1) constness { \
  150. GMOCK_MOCKER_(1, constness, Method).SetOwnerAndName(this, #Method); \
  151. return GMOCK_MOCKER_(1, constness, \
  152. Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \
  153. __VA_ARGS__)>(gmock_a1)); \
  154. } \
  155. ::testing::MockSpec<__VA_ARGS__> \
  156. gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1) constness { \
  157. GMOCK_MOCKER_(1, constness, Method).RegisterOwner(this); \
  158. return GMOCK_MOCKER_(1, constness, Method).With(gmock_a1); \
  159. } \
  160. ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
  161. const ::testing::internal::WithoutMatchers&, \
  162. constness ::testing::internal::Function<__VA_ARGS__>* ) const { \
  163. return ::testing::internal::AdjustConstness_##constness(this)-> \
  164. gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>()); \
  165. } \
  166. mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(1, constness, \
  167. Method)
  168. // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
  169. #define GMOCK_METHOD2_(tn, constness, ct, Method, ...) \
  170. static_assert(2 == \
  171. ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \
  172. "MOCK_METHOD<N> must match argument count.");\
  173. GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
  174. GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \
  175. __VA_ARGS__) gmock_a2) constness { \
  176. GMOCK_MOCKER_(2, constness, Method).SetOwnerAndName(this, #Method); \
  177. return GMOCK_MOCKER_(2, constness, \
  178. Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \
  179. __VA_ARGS__)>(gmock_a1), \
  180. ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2)); \
  181. } \
  182. ::testing::MockSpec<__VA_ARGS__> \
  183. gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
  184. GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2) constness { \
  185. GMOCK_MOCKER_(2, constness, Method).RegisterOwner(this); \
  186. return GMOCK_MOCKER_(2, constness, Method).With(gmock_a1, gmock_a2); \
  187. } \
  188. ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
  189. const ::testing::internal::WithoutMatchers&, \
  190. constness ::testing::internal::Function<__VA_ARGS__>* ) const { \
  191. return ::testing::internal::AdjustConstness_##constness(this)-> \
  192. gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \
  193. ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>()); \
  194. } \
  195. mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(2, constness, \
  196. Method)
  197. // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
  198. #define GMOCK_METHOD3_(tn, constness, ct, Method, ...) \
  199. static_assert(3 == \
  200. ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \
  201. "MOCK_METHOD<N> must match argument count.");\
  202. GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
  203. GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \
  204. __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, \
  205. __VA_ARGS__) gmock_a3) constness { \
  206. GMOCK_MOCKER_(3, constness, Method).SetOwnerAndName(this, #Method); \
  207. return GMOCK_MOCKER_(3, constness, \
  208. Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \
  209. __VA_ARGS__)>(gmock_a1), \
  210. ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \
  211. ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3)); \
  212. } \
  213. ::testing::MockSpec<__VA_ARGS__> \
  214. gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
  215. GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
  216. GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3) constness { \
  217. GMOCK_MOCKER_(3, constness, Method).RegisterOwner(this); \
  218. return GMOCK_MOCKER_(3, constness, Method).With(gmock_a1, gmock_a2, \
  219. gmock_a3); \
  220. } \
  221. ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
  222. const ::testing::internal::WithoutMatchers&, \
  223. constness ::testing::internal::Function<__VA_ARGS__>* ) const { \
  224. return ::testing::internal::AdjustConstness_##constness(this)-> \
  225. gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \
  226. ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \
  227. ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>()); \
  228. } \
  229. mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(3, constness, \
  230. Method)
  231. // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
  232. #define GMOCK_METHOD4_(tn, constness, ct, Method, ...) \
  233. static_assert(4 == \
  234. ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \
  235. "MOCK_METHOD<N> must match argument count.");\
  236. GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
  237. GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \
  238. __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
  239. GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4) constness { \
  240. GMOCK_MOCKER_(4, constness, Method).SetOwnerAndName(this, #Method); \
  241. return GMOCK_MOCKER_(4, constness, \
  242. Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \
  243. __VA_ARGS__)>(gmock_a1), \
  244. ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \
  245. ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \
  246. ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4)); \
  247. } \
  248. ::testing::MockSpec<__VA_ARGS__> \
  249. gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
  250. GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
  251. GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
  252. GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4) constness { \
  253. GMOCK_MOCKER_(4, constness, Method).RegisterOwner(this); \
  254. return GMOCK_MOCKER_(4, constness, Method).With(gmock_a1, gmock_a2, \
  255. gmock_a3, gmock_a4); \
  256. } \
  257. ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
  258. const ::testing::internal::WithoutMatchers&, \
  259. constness ::testing::internal::Function<__VA_ARGS__>* ) const { \
  260. return ::testing::internal::AdjustConstness_##constness(this)-> \
  261. gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \
  262. ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \
  263. ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \
  264. ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>()); \
  265. } \
  266. mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(4, constness, \
  267. Method)
  268. // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
  269. #define GMOCK_METHOD5_(tn, constness, ct, Method, ...) \
  270. static_assert(5 == \
  271. ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \
  272. "MOCK_METHOD<N> must match argument count.");\
  273. GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
  274. GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \
  275. __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
  276. GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \
  277. __VA_ARGS__) gmock_a5) constness { \
  278. GMOCK_MOCKER_(5, constness, Method).SetOwnerAndName(this, #Method); \
  279. return GMOCK_MOCKER_(5, constness, \
  280. Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \
  281. __VA_ARGS__)>(gmock_a1), \
  282. ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \
  283. ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \
  284. ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4), \
  285. ::std::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(gmock_a5)); \
  286. } \
  287. ::testing::MockSpec<__VA_ARGS__> \
  288. gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
  289. GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
  290. GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
  291. GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
  292. GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5) constness { \
  293. GMOCK_MOCKER_(5, constness, Method).RegisterOwner(this); \
  294. return GMOCK_MOCKER_(5, constness, Method).With(gmock_a1, gmock_a2, \
  295. gmock_a3, gmock_a4, gmock_a5); \
  296. } \
  297. ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
  298. const ::testing::internal::WithoutMatchers&, \
  299. constness ::testing::internal::Function<__VA_ARGS__>* ) const { \
  300. return ::testing::internal::AdjustConstness_##constness(this)-> \
  301. gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \
  302. ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \
  303. ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \
  304. ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \
  305. ::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>()); \
  306. } \
  307. mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(5, constness, \
  308. Method)
  309. // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
  310. #define GMOCK_METHOD6_(tn, constness, ct, Method, ...) \
  311. static_assert(6 == \
  312. ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \
  313. "MOCK_METHOD<N> must match argument count.");\
  314. GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
  315. GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \
  316. __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
  317. GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \
  318. __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, \
  319. __VA_ARGS__) gmock_a6) constness { \
  320. GMOCK_MOCKER_(6, constness, Method).SetOwnerAndName(this, #Method); \
  321. return GMOCK_MOCKER_(6, constness, \
  322. Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \
  323. __VA_ARGS__)>(gmock_a1), \
  324. ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \
  325. ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \
  326. ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4), \
  327. ::std::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(gmock_a5), \
  328. ::std::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(gmock_a6)); \
  329. } \
  330. ::testing::MockSpec<__VA_ARGS__> \
  331. gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
  332. GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
  333. GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
  334. GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
  335. GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
  336. GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6) constness { \
  337. GMOCK_MOCKER_(6, constness, Method).RegisterOwner(this); \
  338. return GMOCK_MOCKER_(6, constness, Method).With(gmock_a1, gmock_a2, \
  339. gmock_a3, gmock_a4, gmock_a5, gmock_a6); \
  340. } \
  341. ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
  342. const ::testing::internal::WithoutMatchers&, \
  343. constness ::testing::internal::Function<__VA_ARGS__>* ) const { \
  344. return ::testing::internal::AdjustConstness_##constness(this)-> \
  345. gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \
  346. ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \
  347. ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \
  348. ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \
  349. ::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \
  350. ::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>()); \
  351. } \
  352. mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(6, constness, \
  353. Method)
  354. // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
  355. #define GMOCK_METHOD7_(tn, constness, ct, Method, ...) \
  356. static_assert(7 == \
  357. ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \
  358. "MOCK_METHOD<N> must match argument count.");\
  359. GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
  360. GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \
  361. __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
  362. GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \
  363. __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
  364. GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7) constness { \
  365. GMOCK_MOCKER_(7, constness, Method).SetOwnerAndName(this, #Method); \
  366. return GMOCK_MOCKER_(7, constness, \
  367. Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \
  368. __VA_ARGS__)>(gmock_a1), \
  369. ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \
  370. ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \
  371. ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4), \
  372. ::std::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(gmock_a5), \
  373. ::std::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(gmock_a6), \
  374. ::std::forward<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(gmock_a7)); \
  375. } \
  376. ::testing::MockSpec<__VA_ARGS__> \
  377. gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
  378. GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
  379. GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
  380. GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
  381. GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
  382. GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
  383. GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7) constness { \
  384. GMOCK_MOCKER_(7, constness, Method).RegisterOwner(this); \
  385. return GMOCK_MOCKER_(7, constness, Method).With(gmock_a1, gmock_a2, \
  386. gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7); \
  387. } \
  388. ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
  389. const ::testing::internal::WithoutMatchers&, \
  390. constness ::testing::internal::Function<__VA_ARGS__>* ) const { \
  391. return ::testing::internal::AdjustConstness_##constness(this)-> \
  392. gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \
  393. ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \
  394. ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \
  395. ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \
  396. ::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \
  397. ::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(), \
  398. ::testing::A<GMOCK_ARG_(tn, 7, __VA_ARGS__)>()); \
  399. } \
  400. mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(7, constness, \
  401. Method)
  402. // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
  403. #define GMOCK_METHOD8_(tn, constness, ct, Method, ...) \
  404. static_assert(8 == \
  405. ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \
  406. "MOCK_METHOD<N> must match argument count.");\
  407. GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
  408. GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \
  409. __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
  410. GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \
  411. __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
  412. GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, GMOCK_ARG_(tn, 8, \
  413. __VA_ARGS__) gmock_a8) constness { \
  414. GMOCK_MOCKER_(8, constness, Method).SetOwnerAndName(this, #Method); \
  415. return GMOCK_MOCKER_(8, constness, \
  416. Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \
  417. __VA_ARGS__)>(gmock_a1), \
  418. ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \
  419. ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \
  420. ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4), \
  421. ::std::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(gmock_a5), \
  422. ::std::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(gmock_a6), \
  423. ::std::forward<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(gmock_a7), \
  424. ::std::forward<GMOCK_ARG_(tn, 8, __VA_ARGS__)>(gmock_a8)); \
  425. } \
  426. ::testing::MockSpec<__VA_ARGS__> \
  427. gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
  428. GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
  429. GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
  430. GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
  431. GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
  432. GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
  433. GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \
  434. GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8) constness { \
  435. GMOCK_MOCKER_(8, constness, Method).RegisterOwner(this); \
  436. return GMOCK_MOCKER_(8, constness, Method).With(gmock_a1, gmock_a2, \
  437. gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8); \
  438. } \
  439. ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
  440. const ::testing::internal::WithoutMatchers&, \
  441. constness ::testing::internal::Function<__VA_ARGS__>* ) const { \
  442. return ::testing::internal::AdjustConstness_##constness(this)-> \
  443. gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \
  444. ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \
  445. ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \
  446. ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \
  447. ::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \
  448. ::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(), \
  449. ::testing::A<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(), \
  450. ::testing::A<GMOCK_ARG_(tn, 8, __VA_ARGS__)>()); \
  451. } \
  452. mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(8, constness, \
  453. Method)
  454. // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
  455. #define GMOCK_METHOD9_(tn, constness, ct, Method, ...) \
  456. static_assert(9 == \
  457. ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \
  458. "MOCK_METHOD<N> must match argument count.");\
  459. GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
  460. GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \
  461. __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
  462. GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \
  463. __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
  464. GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, GMOCK_ARG_(tn, 8, \
  465. __VA_ARGS__) gmock_a8, GMOCK_ARG_(tn, 9, \
  466. __VA_ARGS__) gmock_a9) constness { \
  467. GMOCK_MOCKER_(9, constness, Method).SetOwnerAndName(this, #Method); \
  468. return GMOCK_MOCKER_(9, constness, \
  469. Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \
  470. __VA_ARGS__)>(gmock_a1), \
  471. ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \
  472. ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \
  473. ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4), \
  474. ::std::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(gmock_a5), \
  475. ::std::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(gmock_a6), \
  476. ::std::forward<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(gmock_a7), \
  477. ::std::forward<GMOCK_ARG_(tn, 8, __VA_ARGS__)>(gmock_a8), \
  478. ::std::forward<GMOCK_ARG_(tn, 9, __VA_ARGS__)>(gmock_a9)); \
  479. } \
  480. ::testing::MockSpec<__VA_ARGS__> \
  481. gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
  482. GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
  483. GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
  484. GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
  485. GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
  486. GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
  487. GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \
  488. GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8, \
  489. GMOCK_MATCHER_(tn, 9, __VA_ARGS__) gmock_a9) constness { \
  490. GMOCK_MOCKER_(9, constness, Method).RegisterOwner(this); \
  491. return GMOCK_MOCKER_(9, constness, Method).With(gmock_a1, gmock_a2, \
  492. gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, \
  493. gmock_a9); \
  494. } \
  495. ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
  496. const ::testing::internal::WithoutMatchers&, \
  497. constness ::testing::internal::Function<__VA_ARGS__>* ) const { \
  498. return ::testing::internal::AdjustConstness_##constness(this)-> \
  499. gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \
  500. ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \
  501. ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \
  502. ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \
  503. ::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \
  504. ::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(), \
  505. ::testing::A<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(), \
  506. ::testing::A<GMOCK_ARG_(tn, 8, __VA_ARGS__)>(), \
  507. ::testing::A<GMOCK_ARG_(tn, 9, __VA_ARGS__)>()); \
  508. } \
  509. mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(9, constness, \
  510. Method)
  511. // INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
  512. #define GMOCK_METHOD10_(tn, constness, ct, Method, ...) \
  513. static_assert(10 == \
  514. ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, \
  515. "MOCK_METHOD<N> must match argument count.");\
  516. GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
  517. GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \
  518. __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
  519. GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \
  520. __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
  521. GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, GMOCK_ARG_(tn, 8, \
  522. __VA_ARGS__) gmock_a8, GMOCK_ARG_(tn, 9, __VA_ARGS__) gmock_a9, \
  523. GMOCK_ARG_(tn, 10, __VA_ARGS__) gmock_a10) constness { \
  524. GMOCK_MOCKER_(10, constness, Method).SetOwnerAndName(this, #Method); \
  525. return GMOCK_MOCKER_(10, constness, \
  526. Method).Invoke(::std::forward<GMOCK_ARG_(tn, 1, \
  527. __VA_ARGS__)>(gmock_a1), \
  528. ::std::forward<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(gmock_a2), \
  529. ::std::forward<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(gmock_a3), \
  530. ::std::forward<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(gmock_a4), \
  531. ::std::forward<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(gmock_a5), \
  532. ::std::forward<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(gmock_a6), \
  533. ::std::forward<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(gmock_a7), \
  534. ::std::forward<GMOCK_ARG_(tn, 8, __VA_ARGS__)>(gmock_a8), \
  535. ::std::forward<GMOCK_ARG_(tn, 9, __VA_ARGS__)>(gmock_a9), \
  536. ::std::forward<GMOCK_ARG_(tn, 10, __VA_ARGS__)>(gmock_a10)); \
  537. } \
  538. ::testing::MockSpec<__VA_ARGS__> \
  539. gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
  540. GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
  541. GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
  542. GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
  543. GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
  544. GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
  545. GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \
  546. GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8, \
  547. GMOCK_MATCHER_(tn, 9, __VA_ARGS__) gmock_a9, \
  548. GMOCK_MATCHER_(tn, 10, \
  549. __VA_ARGS__) gmock_a10) constness { \
  550. GMOCK_MOCKER_(10, constness, Method).RegisterOwner(this); \
  551. return GMOCK_MOCKER_(10, constness, Method).With(gmock_a1, gmock_a2, \
  552. gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, \
  553. gmock_a10); \
  554. } \
  555. ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \
  556. const ::testing::internal::WithoutMatchers&, \
  557. constness ::testing::internal::Function<__VA_ARGS__>* ) const { \
  558. return ::testing::internal::AdjustConstness_##constness(this)-> \
  559. gmock_##Method(::testing::A<GMOCK_ARG_(tn, 1, __VA_ARGS__)>(), \
  560. ::testing::A<GMOCK_ARG_(tn, 2, __VA_ARGS__)>(), \
  561. ::testing::A<GMOCK_ARG_(tn, 3, __VA_ARGS__)>(), \
  562. ::testing::A<GMOCK_ARG_(tn, 4, __VA_ARGS__)>(), \
  563. ::testing::A<GMOCK_ARG_(tn, 5, __VA_ARGS__)>(), \
  564. ::testing::A<GMOCK_ARG_(tn, 6, __VA_ARGS__)>(), \
  565. ::testing::A<GMOCK_ARG_(tn, 7, __VA_ARGS__)>(), \
  566. ::testing::A<GMOCK_ARG_(tn, 8, __VA_ARGS__)>(), \
  567. ::testing::A<GMOCK_ARG_(tn, 9, __VA_ARGS__)>(), \
  568. ::testing::A<GMOCK_ARG_(tn, 10, __VA_ARGS__)>()); \
  569. } \
  570. mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(10, constness, \
  571. Method)
  572. #define MOCK_METHOD0(m, ...) GMOCK_METHOD0_(, , , m, __VA_ARGS__)
  573. #define MOCK_METHOD1(m, ...) GMOCK_METHOD1_(, , , m, __VA_ARGS__)
  574. #define MOCK_METHOD2(m, ...) GMOCK_METHOD2_(, , , m, __VA_ARGS__)
  575. #define MOCK_METHOD3(m, ...) GMOCK_METHOD3_(, , , m, __VA_ARGS__)
  576. #define MOCK_METHOD4(m, ...) GMOCK_METHOD4_(, , , m, __VA_ARGS__)
  577. #define MOCK_METHOD5(m, ...) GMOCK_METHOD5_(, , , m, __VA_ARGS__)
  578. #define MOCK_METHOD6(m, ...) GMOCK_METHOD6_(, , , m, __VA_ARGS__)
  579. #define MOCK_METHOD7(m, ...) GMOCK_METHOD7_(, , , m, __VA_ARGS__)
  580. #define MOCK_METHOD8(m, ...) GMOCK_METHOD8_(, , , m, __VA_ARGS__)
  581. #define MOCK_METHOD9(m, ...) GMOCK_METHOD9_(, , , m, __VA_ARGS__)
  582. #define MOCK_METHOD10(m, ...) GMOCK_METHOD10_(, , , m, __VA_ARGS__)
  583. #define MOCK_CONST_METHOD0(m, ...) GMOCK_METHOD0_(, const, , m, __VA_ARGS__)
  584. #define MOCK_CONST_METHOD1(m, ...) GMOCK_METHOD1_(, const, , m, __VA_ARGS__)
  585. #define MOCK_CONST_METHOD2(m, ...) GMOCK_METHOD2_(, const, , m, __VA_ARGS__)
  586. #define MOCK_CONST_METHOD3(m, ...) GMOCK_METHOD3_(, const, , m, __VA_ARGS__)
  587. #define MOCK_CONST_METHOD4(m, ...) GMOCK_METHOD4_(, const, , m, __VA_ARGS__)
  588. #define MOCK_CONST_METHOD5(m, ...) GMOCK_METHOD5_(, const, , m, __VA_ARGS__)
  589. #define MOCK_CONST_METHOD6(m, ...) GMOCK_METHOD6_(, const, , m, __VA_ARGS__)
  590. #define MOCK_CONST_METHOD7(m, ...) GMOCK_METHOD7_(, const, , m, __VA_ARGS__)
  591. #define MOCK_CONST_METHOD8(m, ...) GMOCK_METHOD8_(, const, , m, __VA_ARGS__)
  592. #define MOCK_CONST_METHOD9(m, ...) GMOCK_METHOD9_(, const, , m, __VA_ARGS__)
  593. #define MOCK_CONST_METHOD10(m, ...) GMOCK_METHOD10_(, const, , m, __VA_ARGS__)
  594. #define MOCK_METHOD0_T(m, ...) GMOCK_METHOD0_(typename, , , m, __VA_ARGS__)
  595. #define MOCK_METHOD1_T(m, ...) GMOCK_METHOD1_(typename, , , m, __VA_ARGS__)
  596. #define MOCK_METHOD2_T(m, ...) GMOCK_METHOD2_(typename, , , m, __VA_ARGS__)
  597. #define MOCK_METHOD3_T(m, ...) GMOCK_METHOD3_(typename, , , m, __VA_ARGS__)
  598. #define MOCK_METHOD4_T(m, ...) GMOCK_METHOD4_(typename, , , m, __VA_ARGS__)
  599. #define MOCK_METHOD5_T(m, ...) GMOCK_METHOD5_(typename, , , m, __VA_ARGS__)
  600. #define MOCK_METHOD6_T(m, ...) GMOCK_METHOD6_(typename, , , m, __VA_ARGS__)
  601. #define MOCK_METHOD7_T(m, ...) GMOCK_METHOD7_(typename, , , m, __VA_ARGS__)
  602. #define MOCK_METHOD8_T(m, ...) GMOCK_METHOD8_(typename, , , m, __VA_ARGS__)
  603. #define MOCK_METHOD9_T(m, ...) GMOCK_METHOD9_(typename, , , m, __VA_ARGS__)
  604. #define MOCK_METHOD10_T(m, ...) GMOCK_METHOD10_(typename, , , m, __VA_ARGS__)
  605. #define MOCK_CONST_METHOD0_T(m, ...) \
  606. GMOCK_METHOD0_(typename, const, , m, __VA_ARGS__)
  607. #define MOCK_CONST_METHOD1_T(m, ...) \
  608. GMOCK_METHOD1_(typename, const, , m, __VA_ARGS__)
  609. #define MOCK_CONST_METHOD2_T(m, ...) \
  610. GMOCK_METHOD2_(typename, const, , m, __VA_ARGS__)
  611. #define MOCK_CONST_METHOD3_T(m, ...) \
  612. GMOCK_METHOD3_(typename, const, , m, __VA_ARGS__)
  613. #define MOCK_CONST_METHOD4_T(m, ...) \
  614. GMOCK_METHOD4_(typename, const, , m, __VA_ARGS__)
  615. #define MOCK_CONST_METHOD5_T(m, ...) \
  616. GMOCK_METHOD5_(typename, const, , m, __VA_ARGS__)
  617. #define MOCK_CONST_METHOD6_T(m, ...) \
  618. GMOCK_METHOD6_(typename, const, , m, __VA_ARGS__)
  619. #define MOCK_CONST_METHOD7_T(m, ...) \
  620. GMOCK_METHOD7_(typename, const, , m, __VA_ARGS__)
  621. #define MOCK_CONST_METHOD8_T(m, ...) \
  622. GMOCK_METHOD8_(typename, const, , m, __VA_ARGS__)
  623. #define MOCK_CONST_METHOD9_T(m, ...) \
  624. GMOCK_METHOD9_(typename, const, , m, __VA_ARGS__)
  625. #define MOCK_CONST_METHOD10_T(m, ...) \
  626. GMOCK_METHOD10_(typename, const, , m, __VA_ARGS__)
  627. #define MOCK_METHOD0_WITH_CALLTYPE(ct, m, ...) \
  628. GMOCK_METHOD0_(, , ct, m, __VA_ARGS__)
  629. #define MOCK_METHOD1_WITH_CALLTYPE(ct, m, ...) \
  630. GMOCK_METHOD1_(, , ct, m, __VA_ARGS__)
  631. #define MOCK_METHOD2_WITH_CALLTYPE(ct, m, ...) \
  632. GMOCK_METHOD2_(, , ct, m, __VA_ARGS__)
  633. #define MOCK_METHOD3_WITH_CALLTYPE(ct, m, ...) \
  634. GMOCK_METHOD3_(, , ct, m, __VA_ARGS__)
  635. #define MOCK_METHOD4_WITH_CALLTYPE(ct, m, ...) \
  636. GMOCK_METHOD4_(, , ct, m, __VA_ARGS__)
  637. #define MOCK_METHOD5_WITH_CALLTYPE(ct, m, ...) \
  638. GMOCK_METHOD5_(, , ct, m, __VA_ARGS__)
  639. #define MOCK_METHOD6_WITH_CALLTYPE(ct, m, ...) \
  640. GMOCK_METHOD6_(, , ct, m, __VA_ARGS__)
  641. #define MOCK_METHOD7_WITH_CALLTYPE(ct, m, ...) \
  642. GMOCK_METHOD7_(, , ct, m, __VA_ARGS__)
  643. #define MOCK_METHOD8_WITH_CALLTYPE(ct, m, ...) \
  644. GMOCK_METHOD8_(, , ct, m, __VA_ARGS__)
  645. #define MOCK_METHOD9_WITH_CALLTYPE(ct, m, ...) \
  646. GMOCK_METHOD9_(, , ct, m, __VA_ARGS__)
  647. #define MOCK_METHOD10_WITH_CALLTYPE(ct, m, ...) \
  648. GMOCK_METHOD10_(, , ct, m, __VA_ARGS__)
  649. #define MOCK_CONST_METHOD0_WITH_CALLTYPE(ct, m, ...) \
  650. GMOCK_METHOD0_(, const, ct, m, __VA_ARGS__)
  651. #define MOCK_CONST_METHOD1_WITH_CALLTYPE(ct, m, ...) \
  652. GMOCK_METHOD1_(, const, ct, m, __VA_ARGS__)
  653. #define MOCK_CONST_METHOD2_WITH_CALLTYPE(ct, m, ...) \
  654. GMOCK_METHOD2_(, const, ct, m, __VA_ARGS__)
  655. #define MOCK_CONST_METHOD3_WITH_CALLTYPE(ct, m, ...) \
  656. GMOCK_METHOD3_(, const, ct, m, __VA_ARGS__)
  657. #define MOCK_CONST_METHOD4_WITH_CALLTYPE(ct, m, ...) \
  658. GMOCK_METHOD4_(, const, ct, m, __VA_ARGS__)
  659. #define MOCK_CONST_METHOD5_WITH_CALLTYPE(ct, m, ...) \
  660. GMOCK_METHOD5_(, const, ct, m, __VA_ARGS__)
  661. #define MOCK_CONST_METHOD6_WITH_CALLTYPE(ct, m, ...) \
  662. GMOCK_METHOD6_(, const, ct, m, __VA_ARGS__)
  663. #define MOCK_CONST_METHOD7_WITH_CALLTYPE(ct, m, ...) \
  664. GMOCK_METHOD7_(, const, ct, m, __VA_ARGS__)
  665. #define MOCK_CONST_METHOD8_WITH_CALLTYPE(ct, m, ...) \
  666. GMOCK_METHOD8_(, const, ct, m, __VA_ARGS__)
  667. #define MOCK_CONST_METHOD9_WITH_CALLTYPE(ct, m, ...) \
  668. GMOCK_METHOD9_(, const, ct, m, __VA_ARGS__)
  669. #define MOCK_CONST_METHOD10_WITH_CALLTYPE(ct, m, ...) \
  670. GMOCK_METHOD10_(, const, ct, m, __VA_ARGS__)
  671. #define MOCK_METHOD0_T_WITH_CALLTYPE(ct, m, ...) \
  672. GMOCK_METHOD0_(typename, , ct, m, __VA_ARGS__)
  673. #define MOCK_METHOD1_T_WITH_CALLTYPE(ct, m, ...) \
  674. GMOCK_METHOD1_(typename, , ct, m, __VA_ARGS__)
  675. #define MOCK_METHOD2_T_WITH_CALLTYPE(ct, m, ...) \
  676. GMOCK_METHOD2_(typename, , ct, m, __VA_ARGS__)
  677. #define MOCK_METHOD3_T_WITH_CALLTYPE(ct, m, ...) \
  678. GMOCK_METHOD3_(typename, , ct, m, __VA_ARGS__)
  679. #define MOCK_METHOD4_T_WITH_CALLTYPE(ct, m, ...) \
  680. GMOCK_METHOD4_(typename, , ct, m, __VA_ARGS__)
  681. #define MOCK_METHOD5_T_WITH_CALLTYPE(ct, m, ...) \
  682. GMOCK_METHOD5_(typename, , ct, m, __VA_ARGS__)
  683. #define MOCK_METHOD6_T_WITH_CALLTYPE(ct, m, ...) \
  684. GMOCK_METHOD6_(typename, , ct, m, __VA_ARGS__)
  685. #define MOCK_METHOD7_T_WITH_CALLTYPE(ct, m, ...) \
  686. GMOCK_METHOD7_(typename, , ct, m, __VA_ARGS__)
  687. #define MOCK_METHOD8_T_WITH_CALLTYPE(ct, m, ...) \
  688. GMOCK_METHOD8_(typename, , ct, m, __VA_ARGS__)
  689. #define MOCK_METHOD9_T_WITH_CALLTYPE(ct, m, ...) \
  690. GMOCK_METHOD9_(typename, , ct, m, __VA_ARGS__)
  691. #define MOCK_METHOD10_T_WITH_CALLTYPE(ct, m, ...) \
  692. GMOCK_METHOD10_(typename, , ct, m, __VA_ARGS__)
  693. #define MOCK_CONST_METHOD0_T_WITH_CALLTYPE(ct, m, ...) \
  694. GMOCK_METHOD0_(typename, const, ct, m, __VA_ARGS__)
  695. #define MOCK_CONST_METHOD1_T_WITH_CALLTYPE(ct, m, ...) \
  696. GMOCK_METHOD1_(typename, const, ct, m, __VA_ARGS__)
  697. #define MOCK_CONST_METHOD2_T_WITH_CALLTYPE(ct, m, ...) \
  698. GMOCK_METHOD2_(typename, const, ct, m, __VA_ARGS__)
  699. #define MOCK_CONST_METHOD3_T_WITH_CALLTYPE(ct, m, ...) \
  700. GMOCK_METHOD3_(typename, const, ct, m, __VA_ARGS__)
  701. #define MOCK_CONST_METHOD4_T_WITH_CALLTYPE(ct, m, ...) \
  702. GMOCK_METHOD4_(typename, const, ct, m, __VA_ARGS__)
  703. #define MOCK_CONST_METHOD5_T_WITH_CALLTYPE(ct, m, ...) \
  704. GMOCK_METHOD5_(typename, const, ct, m, __VA_ARGS__)
  705. #define MOCK_CONST_METHOD6_T_WITH_CALLTYPE(ct, m, ...) \
  706. GMOCK_METHOD6_(typename, const, ct, m, __VA_ARGS__)
  707. #define MOCK_CONST_METHOD7_T_WITH_CALLTYPE(ct, m, ...) \
  708. GMOCK_METHOD7_(typename, const, ct, m, __VA_ARGS__)
  709. #define MOCK_CONST_METHOD8_T_WITH_CALLTYPE(ct, m, ...) \
  710. GMOCK_METHOD8_(typename, const, ct, m, __VA_ARGS__)
  711. #define MOCK_CONST_METHOD9_T_WITH_CALLTYPE(ct, m, ...) \
  712. GMOCK_METHOD9_(typename, const, ct, m, __VA_ARGS__)
  713. #define MOCK_CONST_METHOD10_T_WITH_CALLTYPE(ct, m, ...) \
  714. GMOCK_METHOD10_(typename, const, ct, m, __VA_ARGS__)
  715. } // namespace testing
  716. #endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_