AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
GmockExtensions.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_TEST_ACSDK_TEST_GMOCKEXTENSIONS_H_
17 #define ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_TEST_ACSDK_TEST_GMOCKEXTENSIONS_H_
18 
19 #include <gmock/gmock.h>
20 
32 #define GMOCK_NOEXCEPT_MOCKER_(arity, constness, Method) \
33  GTEST_CONCAT_TOKEN_(gmock##constness##noexcept##arity##_##Method##_, __LINE__)
34 
46 #define GMOCK_NOEXCEPT_METHOD0_(tn, constness, ct, Method, ...) \
47  GMOCK_RESULT_(tn, __VA_ARGS__) ct Method() constness noexcept { \
48  GTEST_COMPILE_ASSERT_( \
49  (::testing::tuple_size<tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value == 0), \
50  this_method_does_not_take_0_arguments); \
51  GMOCK_NOEXCEPT_MOCKER_(0, constness, Method).SetOwnerAndName(this, #Method); \
52  return GMOCK_NOEXCEPT_MOCKER_(0, constness, Method).Invoke(); \
53  } \
54  ::testing::MockSpec<__VA_ARGS__>& gmock_##Method() constness noexcept { \
55  GMOCK_NOEXCEPT_MOCKER_(0, constness, Method).RegisterOwner(this); \
56  return GMOCK_NOEXCEPT_MOCKER_(0, constness, Method).With(); \
57  } \
58  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_NOEXCEPT_MOCKER_(0, constness, Method)
59 
60 #define GMOCK_NOEXCEPT_METHOD1_(tn, constness, ct, Method, ...) \
61  GMOCK_RESULT_(tn, __VA_ARGS__) ct Method(GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1) constness noexcept { \
62  GTEST_COMPILE_ASSERT_( \
63  (::testing::tuple_size<tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value == 1), \
64  this_method_does_not_take_1_argument); \
65  GMOCK_NOEXCEPT_MOCKER_(1, constness, Method).SetOwnerAndName(this, #Method); \
66  return GMOCK_NOEXCEPT_MOCKER_(1, constness, Method).Invoke(gmock_a1); \
67  } \
68  ::testing::MockSpec<__VA_ARGS__>& gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1) constness noexcept { \
69  GMOCK_NOEXCEPT_MOCKER_(1, constness, Method).RegisterOwner(this); \
70  return GMOCK_NOEXCEPT_MOCKER_(1, constness, Method).With(gmock_a1); \
71  } \
72  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_NOEXCEPT_MOCKER_(1, constness, Method)
73 
74 #define GMOCK_NOEXCEPT_METHOD2_(tn, constness, ct, Method, ...) \
75  GMOCK_RESULT_(tn, __VA_ARGS__) \
76  ct Method(GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2) constness noexcept { \
77  GTEST_COMPILE_ASSERT_( \
78  (::testing::tuple_size<tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value == 2), \
79  this_method_does_not_take_2_arguments); \
80  GMOCK_NOEXCEPT_MOCKER_(2, constness, Method).SetOwnerAndName(this, #Method); \
81  return GMOCK_NOEXCEPT_MOCKER_(2, constness, Method).Invoke(gmock_a1, gmock_a2); \
82  } \
83  ::testing::MockSpec<__VA_ARGS__>& gmock_##Method( \
84  GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2) constness noexcept { \
85  GMOCK_NOEXCEPT_MOCKER_(2, constness, Method).RegisterOwner(this); \
86  return GMOCK_NOEXCEPT_MOCKER_(2, constness, Method).With(gmock_a1, gmock_a2); \
87  } \
88  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_NOEXCEPT_MOCKER_(2, constness, Method)
89 
90 #define GMOCK_NOEXCEPT_METHOD3_(tn, constness, ct, Method, ...) \
91  GMOCK_RESULT_(tn, __VA_ARGS__) \
92  ct Method( \
93  GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
94  GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
95  GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3) constness noexcept { \
96  GTEST_COMPILE_ASSERT_( \
97  (::testing::tuple_size<tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value == 3), \
98  this_method_does_not_take_3_arguments); \
99  GMOCK_NOEXCEPT_MOCKER_(3, constness, Method).SetOwnerAndName(this, #Method); \
100  return GMOCK_NOEXCEPT_MOCKER_(3, constness, Method).Invoke(gmock_a1, gmock_a2, gmock_a3); \
101  } \
102  ::testing::MockSpec<__VA_ARGS__>& gmock_##Method( \
103  GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
104  GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
105  GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3) constness noexcept { \
106  GMOCK_NOEXCEPT_MOCKER_(3, constness, Method).RegisterOwner(this); \
107  return GMOCK_NOEXCEPT_MOCKER_(3, constness, Method).With(gmock_a1, gmock_a2, gmock_a3); \
108  } \
109  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_NOEXCEPT_MOCKER_(3, constness, Method)
110 
111 #define GMOCK_NOEXCEPT_METHOD4_(tn, constness, ct, Method, ...) \
112  GMOCK_RESULT_(tn, __VA_ARGS__) \
113  ct Method( \
114  GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
115  GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
116  GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
117  GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4) constness noexcept { \
118  GTEST_COMPILE_ASSERT_( \
119  (::testing::tuple_size<tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value == 4), \
120  this_method_does_not_take_4_arguments); \
121  GMOCK_NOEXCEPT_MOCKER_(4, constness, Method).SetOwnerAndName(this, #Method); \
122  return GMOCK_NOEXCEPT_MOCKER_(4, constness, Method).Invoke(gmock_a1, gmock_a2, gmock_a3, gmock_a4); \
123  } \
124  ::testing::MockSpec<__VA_ARGS__>& gmock_##Method( \
125  GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
126  GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
127  GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
128  GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4) constness noexcept { \
129  GMOCK_NOEXCEPT_MOCKER_(4, constness, Method).RegisterOwner(this); \
130  return GMOCK_NOEXCEPT_MOCKER_(4, constness, Method).With(gmock_a1, gmock_a2, gmock_a3, gmock_a4); \
131  } \
132  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_NOEXCEPT_MOCKER_(4, constness, Method)
133 
134 #define GMOCK_NOEXCEPT_METHOD5_(tn, constness, ct, Method, ...) \
135  GMOCK_RESULT_(tn, __VA_ARGS__) \
136  ct Method( \
137  GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
138  GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
139  GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
140  GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
141  GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5) constness noexcept { \
142  GTEST_COMPILE_ASSERT_( \
143  (::testing::tuple_size<tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value == 5), \
144  this_method_does_not_take_5_arguments); \
145  GMOCK_NOEXCEPT_MOCKER_(5, constness, Method).SetOwnerAndName(this, #Method); \
146  return GMOCK_NOEXCEPT_MOCKER_(5, constness, Method).Invoke(gmock_a1, gmock_a2, gmock_a3, gmock_a4, gmock_a5); \
147  } \
148  ::testing::MockSpec<__VA_ARGS__>& gmock_##Method( \
149  GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
150  GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
151  GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
152  GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
153  GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5) constness noexcept { \
154  GMOCK_NOEXCEPT_MOCKER_(5, constness, Method).RegisterOwner(this); \
155  return GMOCK_NOEXCEPT_MOCKER_(5, constness, Method).With(gmock_a1, gmock_a2, gmock_a3, gmock_a4, gmock_a5); \
156  } \
157  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_NOEXCEPT_MOCKER_(5, constness, Method)
158 
159 #define GMOCK_NOEXCEPT_METHOD6_(tn, constness, ct, Method, ...) \
160  GMOCK_RESULT_(tn, __VA_ARGS__) \
161  ct Method( \
162  GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
163  GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
164  GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
165  GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
166  GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
167  GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6) constness noexcept { \
168  GTEST_COMPILE_ASSERT_( \
169  (::testing::tuple_size<tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value == 6), \
170  this_method_does_not_take_6_arguments); \
171  GMOCK_NOEXCEPT_MOCKER_(6, constness, Method).SetOwnerAndName(this, #Method); \
172  return GMOCK_NOEXCEPT_MOCKER_(6, constness, Method) \
173  .Invoke(gmock_a1, gmock_a2, gmock_a3, gmock_a4, gmock_a5, gmock_a6); \
174  } \
175  ::testing::MockSpec<__VA_ARGS__>& gmock_##Method( \
176  GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
177  GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
178  GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
179  GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
180  GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
181  GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6) constness noexcept { \
182  GMOCK_NOEXCEPT_MOCKER_(6, constness, Method).RegisterOwner(this); \
183  return GMOCK_NOEXCEPT_MOCKER_(6, constness, Method) \
184  .With(gmock_a1, gmock_a2, gmock_a3, gmock_a4, gmock_a5, gmock_a6); \
185  } \
186  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_NOEXCEPT_MOCKER_(6, constness, Method)
187 
188 #define GMOCK_NOEXCEPT_METHOD7_(tn, constness, ct, Method, ...) \
189  GMOCK_RESULT_(tn, __VA_ARGS__) \
190  ct Method( \
191  GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
192  GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
193  GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
194  GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
195  GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
196  GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
197  GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7) constness noexcept { \
198  GTEST_COMPILE_ASSERT_( \
199  (::testing::tuple_size<tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value == 7), \
200  this_method_does_not_take_7_arguments); \
201  GMOCK_NOEXCEPT_MOCKER_(7, constness, Method).SetOwnerAndName(this, #Method); \
202  return GMOCK_NOEXCEPT_MOCKER_(7, constness, Method) \
203  .Invoke(gmock_a1, gmock_a2, gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7); \
204  } \
205  ::testing::MockSpec<__VA_ARGS__>& gmock_##Method( \
206  GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
207  GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
208  GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
209  GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
210  GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
211  GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
212  GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7) constness noexcept { \
213  GMOCK_NOEXCEPT_MOCKER_(7, constness, Method).RegisterOwner(this); \
214  return GMOCK_NOEXCEPT_MOCKER_(7, constness, Method) \
215  .With(gmock_a1, gmock_a2, gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7); \
216  } \
217  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_NOEXCEPT_MOCKER_(7, constness, Method)
218 
219 #define GMOCK_NOEXCEPT_METHOD8_(tn, constness, ct, Method, ...) \
220  GMOCK_RESULT_(tn, __VA_ARGS__) \
221  ct Method( \
222  GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
223  GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
224  GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
225  GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
226  GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
227  GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
228  GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, \
229  GMOCK_ARG_(tn, 8, __VA_ARGS__) gmock_a8) constness noexcept { \
230  GTEST_COMPILE_ASSERT_( \
231  (::testing::tuple_size<tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value == 8), \
232  this_method_does_not_take_8_arguments); \
233  GMOCK_NOEXCEPT_MOCKER_(8, constness, Method).SetOwnerAndName(this, #Method); \
234  return GMOCK_NOEXCEPT_MOCKER_(8, constness, Method) \
235  .Invoke(gmock_a1, gmock_a2, gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8); \
236  } \
237  ::testing::MockSpec<__VA_ARGS__>& gmock_##Method( \
238  GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
239  GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
240  GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
241  GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
242  GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
243  GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
244  GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \
245  GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8) constness noexcept { \
246  GMOCK_NOEXCEPT_MOCKER_(8, constness, Method).RegisterOwner(this); \
247  return GMOCK_NOEXCEPT_MOCKER_(8, constness, Method) \
248  .With(gmock_a1, gmock_a2, gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8); \
249  } \
250  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_NOEXCEPT_MOCKER_(8, constness, Method)
251 
252 #define GMOCK_NOEXCEPT_METHOD9_(tn, constness, ct, Method, ...) \
253  GMOCK_RESULT_(tn, __VA_ARGS__) \
254  ct Method( \
255  GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
256  GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
257  GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
258  GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
259  GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
260  GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
261  GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, \
262  GMOCK_ARG_(tn, 8, __VA_ARGS__) gmock_a8, \
263  GMOCK_ARG_(tn, 9, __VA_ARGS__) gmock_a9) constness noexcept { \
264  GTEST_COMPILE_ASSERT_( \
265  (::testing::tuple_size<tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value == 9), \
266  this_method_does_not_take_9_arguments); \
267  GMOCK_NOEXCEPT_MOCKER_(9, constness, Method).SetOwnerAndName(this, #Method); \
268  return GMOCK_NOEXCEPT_MOCKER_(9, constness, Method) \
269  .Invoke(gmock_a1, gmock_a2, gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9); \
270  } \
271  ::testing::MockSpec<__VA_ARGS__>& gmock_##Method( \
272  GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
273  GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
274  GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
275  GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
276  GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
277  GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
278  GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \
279  GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8, \
280  GMOCK_MATCHER_(tn, 9, __VA_ARGS__) gmock_a9) constness noexcept { \
281  GMOCK_NOEXCEPT_MOCKER_(9, constness, Method).RegisterOwner(this); \
282  return GMOCK_NOEXCEPT_MOCKER_(9, constness, Method) \
283  .With(gmock_a1, gmock_a2, gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9); \
284  } \
285  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_NOEXCEPT_MOCKER_(9, constness, Method)
286 
287 #define GMOCK_NOEXCEPT_METHOD10_(tn, constness, ct, Method, ...) \
288  GMOCK_RESULT_(tn, __VA_ARGS__) \
289  ct Method( \
290  GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
291  GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
292  GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
293  GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
294  GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
295  GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
296  GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, \
297  GMOCK_ARG_(tn, 8, __VA_ARGS__) gmock_a8, \
298  GMOCK_ARG_(tn, 9, __VA_ARGS__) gmock_a9, \
299  GMOCK_ARG_(tn, 10, __VA_ARGS__) gmock_a10) constness noexcept { \
300  GTEST_COMPILE_ASSERT_( \
301  (::testing::tuple_size<tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value == 10), \
302  this_method_does_not_take_10_arguments); \
303  GMOCK_NOEXCEPT_MOCKER_(10, constness, Method).SetOwnerAndName(this, #Method); \
304  return GMOCK_NOEXCEPT_MOCKER_(10, constness, Method) \
305  .Invoke( \
306  gmock_a1, gmock_a2, gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, gmock_a10); \
307  } \
308  ::testing::MockSpec<__VA_ARGS__>& gmock_##Method( \
309  GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \
310  GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \
311  GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \
312  GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \
313  GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \
314  GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \
315  GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \
316  GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8, \
317  GMOCK_MATCHER_(tn, 9, __VA_ARGS__) gmock_a9, \
318  GMOCK_MATCHER_(tn, 10, __VA_ARGS__) gmock_a10) constness noexcept { \
319  GMOCK_NOEXCEPT_MOCKER_(10, constness, Method).RegisterOwner(this); \
320  return GMOCK_NOEXCEPT_MOCKER_(10, constness, Method) \
321  .With( \
322  gmock_a1, gmock_a2, gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, gmock_a10); \
323  } \
324  mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_NOEXCEPT_MOCKER_(10, constness, Method)
325 
331 #define MOCK_NOEXCEPT_METHOD0(m, ...) GMOCK_NOEXCEPT_METHOD0_(, , , m, __VA_ARGS__)
332 #define MOCK_NOEXCEPT_METHOD1(m, ...) GMOCK_NOEXCEPT_METHOD1_(, , , m, __VA_ARGS__)
333 #define MOCK_NOEXCEPT_METHOD2(m, ...) GMOCK_NOEXCEPT_METHOD2_(, , , m, __VA_ARGS__)
334 #define MOCK_NOEXCEPT_METHOD3(m, ...) GMOCK_NOEXCEPT_METHOD3_(, , , m, __VA_ARGS__)
335 #define MOCK_NOEXCEPT_METHOD4(m, ...) GMOCK_NOEXCEPT_METHOD4_(, , , m, __VA_ARGS__)
336 #define MOCK_NOEXCEPT_METHOD5(m, ...) GMOCK_NOEXCEPT_METHOD5_(, , , m, __VA_ARGS__)
337 #define MOCK_NOEXCEPT_METHOD6(m, ...) GMOCK_NOEXCEPT_METHOD6_(, , , m, __VA_ARGS__)
338 #define MOCK_NOEXCEPT_METHOD7(m, ...) GMOCK_NOEXCEPT_METHOD7_(, , , m, __VA_ARGS__)
339 #define MOCK_NOEXCEPT_METHOD8(m, ...) GMOCK_NOEXCEPT_METHOD8_(, , , m, __VA_ARGS__)
340 #define MOCK_NOEXCEPT_METHOD9(m, ...) GMOCK_NOEXCEPT_METHOD9_(, , , m, __VA_ARGS__)
341 #define MOCK_NOEXCEPT_METHOD10(m, ...) GMOCK_NOEXCEPT_METHOD10_(, , , m, __VA_ARGS__)
342 
348 #define MOCK_CONST_NOEXCEPT_METHOD0(m, ...) GMOCK_NOEXCEPT_METHOD0_(, const, , m, __VA_ARGS__)
349 #define MOCK_CONST_NOEXCEPT_METHOD1(m, ...) GMOCK_NOEXCEPT_METHOD1_(, const, , m, __VA_ARGS__)
350 #define MOCK_CONST_NOEXCEPT_METHOD2(m, ...) GMOCK_NOEXCEPT_METHOD2_(, const, , m, __VA_ARGS__)
351 #define MOCK_CONST_NOEXCEPT_METHOD3(m, ...) GMOCK_NOEXCEPT_METHOD3_(, const, , m, __VA_ARGS__)
352 #define MOCK_CONST_NOEXCEPT_METHOD4(m, ...) GMOCK_NOEXCEPT_METHOD4_(, const, , m, __VA_ARGS__)
353 #define MOCK_CONST_NOEXCEPT_METHOD5(m, ...) GMOCK_NOEXCEPT_METHOD5_(, const, , m, __VA_ARGS__)
354 #define MOCK_CONST_NOEXCEPT_METHOD6(m, ...) GMOCK_NOEXCEPT_METHOD6_(, const, , m, __VA_ARGS__)
355 #define MOCK_CONST_NOEXCEPT_METHOD7(m, ...) GMOCK_NOEXCEPT_METHOD7_(, const, , m, __VA_ARGS__)
356 #define MOCK_CONST_NOEXCEPT_METHOD8(m, ...) GMOCK_NOEXCEPT_METHOD8_(, const, , m, __VA_ARGS__)
357 #define MOCK_CONST_NOEXCEPT_METHOD9(m, ...) GMOCK_NOEXCEPT_METHOD9_(, const, , m, __VA_ARGS__)
358 #define MOCK_CONST_NOEXCEPT_METHOD10(m, ...) GMOCK_NOEXCEPT_METHOD10_(, const, , m, __VA_ARGS__)
359 
361 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_TEST_ACSDK_TEST_GMOCKEXTENSIONS_H_

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0