| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file automatically generated by testing/generate_gmock_mutant.py. |
| 6 // DO NOT EDIT. |
| 7 |
| 5 #ifndef TESTING_GMOCK_MUTANT_H_ | 8 #ifndef TESTING_GMOCK_MUTANT_H_ |
| 6 #define TESTING_GMOCK_MUTANT_H_ | 9 #define TESTING_GMOCK_MUTANT_H_ |
| 7 | 10 |
| 8 // The intention of this file is to make possible using GMock actions in | 11 // The intention of this file is to make possible using GMock actions in |
| 9 // all of its syntactic beauty. Classes and helper functions can be used as | 12 // all of its syntactic beauty. Classes and helper functions can be used as |
| 10 // more generic variants of Task and Callback classes (see base/task.h) | 13 // more generic variants of Task and Callback classes (see base/task.h) |
| 11 // Mutant supports both pre-bound arguments (like Task) and call-time | 14 // Mutant supports both pre-bound arguments (like Task) and call-time |
| 12 // arguments (like Callback) - hence the name. :-) | 15 // arguments (like Callback) - hence the name. :-) |
| 13 // | 16 // |
| 14 // DispatchToMethod supports two sets of arguments: pre-bound (P) and | 17 // DispatchToMethod/Function supports two sets of arguments: pre-bound (P) and |
| 15 // call-time (C). The arguments as well as the return type are templatized. | 18 // call-time (C). The arguments as well as the return type are templatized. |
| 16 // DispatchToMethod will also try to call the selected method even if provided | 19 // DispatchToMethod/Function will also try to call the selected method or |
| 17 // pre-bound arguments does not match exactly with the function signature | 20 // function even if provided pre-bound arguments does not match exactly with |
| 18 // hence the X1, X2 ... XN parameters in CreateFunctor. | 21 // the function signature hence the X1, X2 ... XN parameters in CreateFunctor. |
| 22 // DispatchToMethod will try to invoke method that may not belong to the |
| 23 // object's class itself but to the object's class base class. |
| 19 // | 24 // |
| 20 // Additionally you can bind the object at calltime by binding a pointer to | 25 // Additionally you can bind the object at calltime by binding a pointer to |
| 21 // pointer to the object at creation time - before including this file you | 26 // pointer to the object at creation time - before including this file you |
| 22 // have to #define GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING. | 27 // have to #define GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING. |
| 23 // | 28 // |
| 24 // TODO(stoyan): It's yet not clear to me should we use T& and T&* instead | 29 // TODO(stoyan): It's yet not clear to me should we use T& and T&* instead |
| 25 // of T* and T** when we invoke CreateFunctor to match the EXPECT_CALL style. | 30 // of T* and T** when we invoke CreateFunctor to match the EXPECT_CALL style. |
| 26 // | 31 // |
| 27 // | 32 // |
| 28 // Sample usage with gMock: | 33 // Sample usage with gMock: |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 108 |
| 104 namespace testing { | 109 namespace testing { |
| 105 | 110 |
| 106 // 0 - 0 | 111 // 0 - 0 |
| 107 template <typename R, typename T, typename Method> | 112 template <typename R, typename T, typename Method> |
| 108 inline R DispatchToMethod(T* obj, Method method, | 113 inline R DispatchToMethod(T* obj, Method method, |
| 109 const Tuple0& p, | 114 const Tuple0& p, |
| 110 const Tuple0& c) { | 115 const Tuple0& c) { |
| 111 return (obj->*method)(); | 116 return (obj->*method)(); |
| 112 } | 117 } |
| 118 template <typename R, typename Function> |
| 119 inline R DispatchToFunction(Function function, |
| 120 const Tuple0& p, |
| 121 const Tuple0& c) { |
| 122 return (*function)(); |
| 123 } |
| 113 | 124 |
| 114 // 0 - 1 | 125 // 0 - 1 |
| 115 template <typename R, typename T, typename Method, typename C1> | 126 template <typename R, typename T, typename Method, typename C1> |
| 116 inline R DispatchToMethod(T* obj, Method method, | 127 inline R DispatchToMethod(T* obj, Method method, |
| 117 const Tuple0& p, | 128 const Tuple0& p, |
| 118 const Tuple1<C1>& c) { | 129 const Tuple1<C1>& c) { |
| 119 return (obj->*method)(c.a); | 130 return (obj->*method)(c.a); |
| 120 } | 131 } |
| 132 template <typename R, typename Function, typename C1> |
| 133 inline R DispatchToFunction(Function function, |
| 134 const Tuple0& p, |
| 135 const Tuple1<C1>& c) { |
| 136 return (*function)(c.a); |
| 137 } |
| 121 | 138 |
| 122 // 0 - 2 | 139 // 0 - 2 |
| 123 template <typename R, typename T, typename Method, typename C1, typename C2> | 140 template <typename R, typename T, typename Method, typename C1, typename C2> |
| 124 inline R DispatchToMethod(T* obj, Method method, | 141 inline R DispatchToMethod(T* obj, Method method, |
| 125 const Tuple0& p, | 142 const Tuple0& p, |
| 126 const Tuple2<C1, C2>& c) { | 143 const Tuple2<C1, C2>& c) { |
| 127 return (obj->*method)(c.a, c.b); | 144 return (obj->*method)(c.a, c.b); |
| 128 } | 145 } |
| 146 template <typename R, typename Function, typename C1, typename C2> |
| 147 inline R DispatchToFunction(Function function, |
| 148 const Tuple0& p, |
| 149 const Tuple2<C1, C2>& c) { |
| 150 return (*function)(c.a, c.b); |
| 151 } |
| 129 | 152 |
| 130 // 0 - 3 | 153 // 0 - 3 |
| 131 template <typename R, typename T, typename Method, typename C1, typename C2, | 154 template <typename R, typename T, typename Method, typename C1, typename C2, |
| 132 typename C3> | 155 typename C3> |
| 133 inline R DispatchToMethod(T* obj, Method method, | 156 inline R DispatchToMethod(T* obj, Method method, |
| 134 const Tuple0& p, | 157 const Tuple0& p, |
| 135 const Tuple3<C1, C2, C3>& c) { | 158 const Tuple3<C1, C2, C3>& c) { |
| 136 return (obj->*method)(c.a, c.b, c.c); | 159 return (obj->*method)(c.a, c.b, c.c); |
| 137 } | 160 } |
| 161 template <typename R, typename Function, typename C1, typename C2, typename C3> |
| 162 inline R DispatchToFunction(Function function, |
| 163 const Tuple0& p, |
| 164 const Tuple3<C1, C2, C3>& c) { |
| 165 return (*function)(c.a, c.b, c.c); |
| 166 } |
| 138 | 167 |
| 139 // 0 - 4 | 168 // 0 - 4 |
| 140 template <typename R, typename T, typename Method, typename C1, typename C2, | 169 template <typename R, typename T, typename Method, typename C1, typename C2, |
| 141 typename C3, typename C4> | 170 typename C3, typename C4> |
| 142 inline R DispatchToMethod(T* obj, Method method, | 171 inline R DispatchToMethod(T* obj, Method method, |
| 143 const Tuple0& p, | 172 const Tuple0& p, |
| 144 const Tuple4<C1, C2, C3, C4>& c) { | 173 const Tuple4<C1, C2, C3, C4>& c) { |
| 145 return (obj->*method)(c.a, c.b, c.c, c.d); | 174 return (obj->*method)(c.a, c.b, c.c, c.d); |
| 146 } | 175 } |
| 176 template <typename R, typename Function, typename C1, typename C2, typename C3, |
| 177 typename C4> |
| 178 inline R DispatchToFunction(Function function, |
| 179 const Tuple0& p, |
| 180 const Tuple4<C1, C2, C3, C4>& c) { |
| 181 return (*function)(c.a, c.b, c.c, c.d); |
| 182 } |
| 147 | 183 |
| 148 // 1 - 0 | 184 // 1 - 0 |
| 149 template <typename R, typename T, typename Method, typename P1> | 185 template <typename R, typename T, typename Method, typename P1> |
| 150 inline R DispatchToMethod(T* obj, Method method, | 186 inline R DispatchToMethod(T* obj, Method method, |
| 151 const Tuple1<P1>& p, | 187 const Tuple1<P1>& p, |
| 152 const Tuple0& c) { | 188 const Tuple0& c) { |
| 153 return (obj->*method)(p.a); | 189 return (obj->*method)(p.a); |
| 154 } | 190 } |
| 191 template <typename R, typename Function, typename P1> |
| 192 inline R DispatchToFunction(Function function, |
| 193 const Tuple1<P1>& p, |
| 194 const Tuple0& c) { |
| 195 return (*function)(p.a); |
| 196 } |
| 155 | 197 |
| 156 // 1 - 1 | 198 // 1 - 1 |
| 157 template <typename R, typename T, typename Method, typename P1, typename C1> | 199 template <typename R, typename T, typename Method, typename P1, typename C1> |
| 158 inline R DispatchToMethod(T* obj, Method method, | 200 inline R DispatchToMethod(T* obj, Method method, |
| 159 const Tuple1<P1>& p, | 201 const Tuple1<P1>& p, |
| 160 const Tuple1<C1>& c) { | 202 const Tuple1<C1>& c) { |
| 161 return (obj->*method)(p.a, c.a); | 203 return (obj->*method)(p.a, c.a); |
| 162 } | 204 } |
| 205 template <typename R, typename Function, typename P1, typename C1> |
| 206 inline R DispatchToFunction(Function function, |
| 207 const Tuple1<P1>& p, |
| 208 const Tuple1<C1>& c) { |
| 209 return (*function)(p.a, c.a); |
| 210 } |
| 163 | 211 |
| 164 // 1 - 2 | 212 // 1 - 2 |
| 165 template <typename R, typename T, typename Method, typename P1, typename C1, | 213 template <typename R, typename T, typename Method, typename P1, typename C1, |
| 166 typename C2> | 214 typename C2> |
| 167 inline R DispatchToMethod(T* obj, Method method, | 215 inline R DispatchToMethod(T* obj, Method method, |
| 168 const Tuple1<P1>& p, | 216 const Tuple1<P1>& p, |
| 169 const Tuple2<C1, C2>& c) { | 217 const Tuple2<C1, C2>& c) { |
| 170 return (obj->*method)(p.a, c.a, c.b); | 218 return (obj->*method)(p.a, c.a, c.b); |
| 171 } | 219 } |
| 220 template <typename R, typename Function, typename P1, typename C1, typename C2> |
| 221 inline R DispatchToFunction(Function function, |
| 222 const Tuple1<P1>& p, |
| 223 const Tuple2<C1, C2>& c) { |
| 224 return (*function)(p.a, c.a, c.b); |
| 225 } |
| 172 | 226 |
| 173 // 1 - 3 | 227 // 1 - 3 |
| 174 template <typename R, typename T, typename Method, typename P1, typename C1, | 228 template <typename R, typename T, typename Method, typename P1, typename C1, |
| 175 typename C2, typename C3> | 229 typename C2, typename C3> |
| 176 inline R DispatchToMethod(T* obj, Method method, | 230 inline R DispatchToMethod(T* obj, Method method, |
| 177 const Tuple1<P1>& p, | 231 const Tuple1<P1>& p, |
| 178 const Tuple3<C1, C2, C3>& c) { | 232 const Tuple3<C1, C2, C3>& c) { |
| 179 return (obj->*method)(p.a, c.a, c.b, c.c); | 233 return (obj->*method)(p.a, c.a, c.b, c.c); |
| 180 } | 234 } |
| 235 template <typename R, typename Function, typename P1, typename C1, typename C2, |
| 236 typename C3> |
| 237 inline R DispatchToFunction(Function function, |
| 238 const Tuple1<P1>& p, |
| 239 const Tuple3<C1, C2, C3>& c) { |
| 240 return (*function)(p.a, c.a, c.b, c.c); |
| 241 } |
| 181 | 242 |
| 182 // 1 - 4 | 243 // 1 - 4 |
| 183 template <typename R, typename T, typename Method, typename P1, typename C1, | 244 template <typename R, typename T, typename Method, typename P1, typename C1, |
| 184 typename C2, typename C3, typename C4> | 245 typename C2, typename C3, typename C4> |
| 185 inline R DispatchToMethod(T* obj, Method method, | 246 inline R DispatchToMethod(T* obj, Method method, |
| 186 const Tuple1<P1>& p, | 247 const Tuple1<P1>& p, |
| 187 const Tuple4<C1, C2, C3, C4>& c) { | 248 const Tuple4<C1, C2, C3, C4>& c) { |
| 188 return (obj->*method)(p.a, c.a, c.b, c.c, c.d); | 249 return (obj->*method)(p.a, c.a, c.b, c.c, c.d); |
| 189 } | 250 } |
| 251 template <typename R, typename Function, typename P1, typename C1, typename C2, |
| 252 typename C3, typename C4> |
| 253 inline R DispatchToFunction(Function function, |
| 254 const Tuple1<P1>& p, |
| 255 const Tuple4<C1, C2, C3, C4>& c) { |
| 256 return (*function)(p.a, c.a, c.b, c.c, c.d); |
| 257 } |
| 190 | 258 |
| 191 // 2 - 0 | 259 // 2 - 0 |
| 192 template <typename R, typename T, typename Method, typename P1, typename P2> | 260 template <typename R, typename T, typename Method, typename P1, typename P2> |
| 193 inline R DispatchToMethod(T* obj, Method method, | 261 inline R DispatchToMethod(T* obj, Method method, |
| 194 const Tuple2<P1, P2>& p, | 262 const Tuple2<P1, P2>& p, |
| 195 const Tuple0& c) { | 263 const Tuple0& c) { |
| 196 return (obj->*method)(p.a, p.b); | 264 return (obj->*method)(p.a, p.b); |
| 197 } | 265 } |
| 266 template <typename R, typename Function, typename P1, typename P2> |
| 267 inline R DispatchToFunction(Function function, |
| 268 const Tuple2<P1, P2>& p, |
| 269 const Tuple0& c) { |
| 270 return (*function)(p.a, p.b); |
| 271 } |
| 198 | 272 |
| 199 // 2 - 1 | 273 // 2 - 1 |
| 200 template <typename R, typename T, typename Method, typename P1, typename P2, | 274 template <typename R, typename T, typename Method, typename P1, typename P2, |
| 201 typename C1> | 275 typename C1> |
| 202 inline R DispatchToMethod(T* obj, Method method, | 276 inline R DispatchToMethod(T* obj, Method method, |
| 203 const Tuple2<P1, P2>& p, | 277 const Tuple2<P1, P2>& p, |
| 204 const Tuple1<C1>& c) { | 278 const Tuple1<C1>& c) { |
| 205 return (obj->*method)(p.a, p.b, c.a); | 279 return (obj->*method)(p.a, p.b, c.a); |
| 206 } | 280 } |
| 281 template <typename R, typename Function, typename P1, typename P2, typename C1> |
| 282 inline R DispatchToFunction(Function function, |
| 283 const Tuple2<P1, P2>& p, |
| 284 const Tuple1<C1>& c) { |
| 285 return (*function)(p.a, p.b, c.a); |
| 286 } |
| 207 | 287 |
| 208 // 2 - 2 | 288 // 2 - 2 |
| 209 template <typename R, typename T, typename Method, typename P1, typename P2, | 289 template <typename R, typename T, typename Method, typename P1, typename P2, |
| 210 typename C1, typename C2> | 290 typename C1, typename C2> |
| 211 inline R DispatchToMethod(T* obj, Method method, | 291 inline R DispatchToMethod(T* obj, Method method, |
| 212 const Tuple2<P1, P2>& p, | 292 const Tuple2<P1, P2>& p, |
| 213 const Tuple2<C1, C2>& c) { | 293 const Tuple2<C1, C2>& c) { |
| 214 return (obj->*method)(p.a, p.b, c.a, c.b); | 294 return (obj->*method)(p.a, p.b, c.a, c.b); |
| 215 } | 295 } |
| 296 template <typename R, typename Function, typename P1, typename P2, typename C1, |
| 297 typename C2> |
| 298 inline R DispatchToFunction(Function function, |
| 299 const Tuple2<P1, P2>& p, |
| 300 const Tuple2<C1, C2>& c) { |
| 301 return (*function)(p.a, p.b, c.a, c.b); |
| 302 } |
| 216 | 303 |
| 217 // 2 - 3 | 304 // 2 - 3 |
| 218 template <typename R, typename T, typename Method, typename P1, typename P2, | 305 template <typename R, typename T, typename Method, typename P1, typename P2, |
| 219 typename C1, typename C2, typename C3> | 306 typename C1, typename C2, typename C3> |
| 220 inline R DispatchToMethod(T* obj, Method method, | 307 inline R DispatchToMethod(T* obj, Method method, |
| 221 const Tuple2<P1, P2>& p, | 308 const Tuple2<P1, P2>& p, |
| 222 const Tuple3<C1, C2, C3>& c) { | 309 const Tuple3<C1, C2, C3>& c) { |
| 223 return (obj->*method)(p.a, p.b, c.a, c.b, c.c); | 310 return (obj->*method)(p.a, p.b, c.a, c.b, c.c); |
| 224 } | 311 } |
| 312 template <typename R, typename Function, typename P1, typename P2, typename C1, |
| 313 typename C2, typename C3> |
| 314 inline R DispatchToFunction(Function function, |
| 315 const Tuple2<P1, P2>& p, |
| 316 const Tuple3<C1, C2, C3>& c) { |
| 317 return (*function)(p.a, p.b, c.a, c.b, c.c); |
| 318 } |
| 225 | 319 |
| 226 // 2 - 4 | 320 // 2 - 4 |
| 227 template <typename R, typename T, typename Method, typename P1, typename P2, | 321 template <typename R, typename T, typename Method, typename P1, typename P2, |
| 228 typename C1, typename C2, typename C3, typename C4> | 322 typename C1, typename C2, typename C3, typename C4> |
| 229 inline R DispatchToMethod(T* obj, Method method, | 323 inline R DispatchToMethod(T* obj, Method method, |
| 230 const Tuple2<P1, P2>& p, | 324 const Tuple2<P1, P2>& p, |
| 231 const Tuple4<C1, C2, C3, C4>& c) { | 325 const Tuple4<C1, C2, C3, C4>& c) { |
| 232 return (obj->*method)(p.a, p.b, c.a, c.b, c.c, c.d); | 326 return (obj->*method)(p.a, p.b, c.a, c.b, c.c, c.d); |
| 233 } | 327 } |
| 328 template <typename R, typename Function, typename P1, typename P2, typename C1, |
| 329 typename C2, typename C3, typename C4> |
| 330 inline R DispatchToFunction(Function function, |
| 331 const Tuple2<P1, P2>& p, |
| 332 const Tuple4<C1, C2, C3, C4>& c) { |
| 333 return (*function)(p.a, p.b, c.a, c.b, c.c, c.d); |
| 334 } |
| 234 | 335 |
| 235 // 3 - 0 | 336 // 3 - 0 |
| 236 template <typename R, typename T, typename Method, typename P1, typename P2, | 337 template <typename R, typename T, typename Method, typename P1, typename P2, |
| 237 typename P3> | 338 typename P3> |
| 238 inline R DispatchToMethod(T* obj, Method method, | 339 inline R DispatchToMethod(T* obj, Method method, |
| 239 const Tuple3<P1, P2, P3>& p, | 340 const Tuple3<P1, P2, P3>& p, |
| 240 const Tuple0& c) { | 341 const Tuple0& c) { |
| 241 return (obj->*method)(p.a, p.b, p.c); | 342 return (obj->*method)(p.a, p.b, p.c); |
| 242 } | 343 } |
| 344 template <typename R, typename Function, typename P1, typename P2, typename P3> |
| 345 inline R DispatchToFunction(Function function, |
| 346 const Tuple3<P1, P2, P3>& p, |
| 347 const Tuple0& c) { |
| 348 return (*function)(p.a, p.b, p.c); |
| 349 } |
| 243 | 350 |
| 244 // 3 - 1 | 351 // 3 - 1 |
| 245 template <typename R, typename T, typename Method, typename P1, typename P2, | 352 template <typename R, typename T, typename Method, typename P1, typename P2, |
| 246 typename P3, typename C1> | 353 typename P3, typename C1> |
| 247 inline R DispatchToMethod(T* obj, Method method, | 354 inline R DispatchToMethod(T* obj, Method method, |
| 248 const Tuple3<P1, P2, P3>& p, | 355 const Tuple3<P1, P2, P3>& p, |
| 249 const Tuple1<C1>& c) { | 356 const Tuple1<C1>& c) { |
| 250 return (obj->*method)(p.a, p.b, p.c, c.a); | 357 return (obj->*method)(p.a, p.b, p.c, c.a); |
| 251 } | 358 } |
| 359 template <typename R, typename Function, typename P1, typename P2, typename P3, |
| 360 typename C1> |
| 361 inline R DispatchToFunction(Function function, |
| 362 const Tuple3<P1, P2, P3>& p, |
| 363 const Tuple1<C1>& c) { |
| 364 return (*function)(p.a, p.b, p.c, c.a); |
| 365 } |
| 252 | 366 |
| 253 // 3 - 2 | 367 // 3 - 2 |
| 254 template <typename R, typename T, typename Method, typename P1, typename P2, | 368 template <typename R, typename T, typename Method, typename P1, typename P2, |
| 255 typename P3, typename C1, typename C2> | 369 typename P3, typename C1, typename C2> |
| 256 inline R DispatchToMethod(T* obj, Method method, | 370 inline R DispatchToMethod(T* obj, Method method, |
| 257 const Tuple3<P1, P2, P3>& p, | 371 const Tuple3<P1, P2, P3>& p, |
| 258 const Tuple2<C1, C2>& c) { | 372 const Tuple2<C1, C2>& c) { |
| 259 return (obj->*method)(p.a, p.b, p.c, c.a, c.b); | 373 return (obj->*method)(p.a, p.b, p.c, c.a, c.b); |
| 260 } | 374 } |
| 375 template <typename R, typename Function, typename P1, typename P2, typename P3, |
| 376 typename C1, typename C2> |
| 377 inline R DispatchToFunction(Function function, |
| 378 const Tuple3<P1, P2, P3>& p, |
| 379 const Tuple2<C1, C2>& c) { |
| 380 return (*function)(p.a, p.b, p.c, c.a, c.b); |
| 381 } |
| 261 | 382 |
| 262 // 3 - 3 | 383 // 3 - 3 |
| 263 template <typename R, typename T, typename Method, typename P1, typename P2, | 384 template <typename R, typename T, typename Method, typename P1, typename P2, |
| 264 typename P3, typename C1, typename C2, typename C3> | 385 typename P3, typename C1, typename C2, typename C3> |
| 265 inline R DispatchToMethod(T* obj, Method method, | 386 inline R DispatchToMethod(T* obj, Method method, |
| 266 const Tuple3<P1, P2, P3>& p, | 387 const Tuple3<P1, P2, P3>& p, |
| 267 const Tuple3<C1, C2, C3>& c) { | 388 const Tuple3<C1, C2, C3>& c) { |
| 268 return (obj->*method)(p.a, p.b, p.c, c.a, c.b, c.c); | 389 return (obj->*method)(p.a, p.b, p.c, c.a, c.b, c.c); |
| 269 } | 390 } |
| 391 template <typename R, typename Function, typename P1, typename P2, typename P3, |
| 392 typename C1, typename C2, typename C3> |
| 393 inline R DispatchToFunction(Function function, |
| 394 const Tuple3<P1, P2, P3>& p, |
| 395 const Tuple3<C1, C2, C3>& c) { |
| 396 return (*function)(p.a, p.b, p.c, c.a, c.b, c.c); |
| 397 } |
| 270 | 398 |
| 271 // 3 - 4 | 399 // 3 - 4 |
| 272 template <typename R, typename T, typename Method, typename P1, typename P2, | 400 template <typename R, typename T, typename Method, typename P1, typename P2, |
| 273 typename P3, typename C1, typename C2, typename C3, typename C4> | 401 typename P3, typename C1, typename C2, typename C3, typename C4> |
| 274 inline R DispatchToMethod(T* obj, Method method, | 402 inline R DispatchToMethod(T* obj, Method method, |
| 275 const Tuple3<P1, P2, P3>& p, | 403 const Tuple3<P1, P2, P3>& p, |
| 276 const Tuple4<C1, C2, C3, C4>& c) { | 404 const Tuple4<C1, C2, C3, C4>& c) { |
| 277 return (obj->*method)(p.a, p.b, p.c, c.a, c.b, c.c, c.d); | 405 return (obj->*method)(p.a, p.b, p.c, c.a, c.b, c.c, c.d); |
| 278 } | 406 } |
| 407 template <typename R, typename Function, typename P1, typename P2, typename P3, |
| 408 typename C1, typename C2, typename C3, typename C4> |
| 409 inline R DispatchToFunction(Function function, |
| 410 const Tuple3<P1, P2, P3>& p, |
| 411 const Tuple4<C1, C2, C3, C4>& c) { |
| 412 return (*function)(p.a, p.b, p.c, c.a, c.b, c.c, c.d); |
| 413 } |
| 279 | 414 |
| 280 // 4 - 0 | 415 // 4 - 0 |
| 281 template <typename R, typename T, typename Method, typename P1, typename P2, | 416 template <typename R, typename T, typename Method, typename P1, typename P2, |
| 282 typename P3, typename P4> | 417 typename P3, typename P4> |
| 283 inline R DispatchToMethod(T* obj, Method method, | 418 inline R DispatchToMethod(T* obj, Method method, |
| 284 const Tuple4<P1, P2, P3, P4>& p, | 419 const Tuple4<P1, P2, P3, P4>& p, |
| 285 const Tuple0& c) { | 420 const Tuple0& c) { |
| 286 return (obj->*method)(p.a, p.b, p.c, p.d); | 421 return (obj->*method)(p.a, p.b, p.c, p.d); |
| 287 } | 422 } |
| 423 template <typename R, typename Function, typename P1, typename P2, typename P3, |
| 424 typename P4> |
| 425 inline R DispatchToFunction(Function function, |
| 426 const Tuple4<P1, P2, P3, P4>& p, |
| 427 const Tuple0& c) { |
| 428 return (*function)(p.a, p.b, p.c, p.d); |
| 429 } |
| 288 | 430 |
| 289 // 4 - 1 | 431 // 4 - 1 |
| 290 template <typename R, typename T, typename Method, typename P1, typename P2, | 432 template <typename R, typename T, typename Method, typename P1, typename P2, |
| 291 typename P3, typename P4, typename C1> | 433 typename P3, typename P4, typename C1> |
| 292 inline R DispatchToMethod(T* obj, Method method, | 434 inline R DispatchToMethod(T* obj, Method method, |
| 293 const Tuple4<P1, P2, P3, P4>& p, | 435 const Tuple4<P1, P2, P3, P4>& p, |
| 294 const Tuple1<C1>& c) { | 436 const Tuple1<C1>& c) { |
| 295 return (obj->*method)(p.a, p.b, p.c, p.d, c.a); | 437 return (obj->*method)(p.a, p.b, p.c, p.d, c.a); |
| 296 } | 438 } |
| 439 template <typename R, typename Function, typename P1, typename P2, typename P3, |
| 440 typename P4, typename C1> |
| 441 inline R DispatchToFunction(Function function, |
| 442 const Tuple4<P1, P2, P3, P4>& p, |
| 443 const Tuple1<C1>& c) { |
| 444 return (*function)(p.a, p.b, p.c, p.d, c.a); |
| 445 } |
| 297 | 446 |
| 298 // 4 - 2 | 447 // 4 - 2 |
| 299 template <typename R, typename T, typename Method, typename P1, typename P2, | 448 template <typename R, typename T, typename Method, typename P1, typename P2, |
| 300 typename P3, typename P4, typename C1, typename C2> | 449 typename P3, typename P4, typename C1, typename C2> |
| 301 inline R DispatchToMethod(T* obj, Method method, | 450 inline R DispatchToMethod(T* obj, Method method, |
| 302 const Tuple4<P1, P2, P3, P4>& p, | 451 const Tuple4<P1, P2, P3, P4>& p, |
| 303 const Tuple2<C1, C2>& c) { | 452 const Tuple2<C1, C2>& c) { |
| 304 return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b); | 453 return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b); |
| 305 } | 454 } |
| 455 template <typename R, typename Function, typename P1, typename P2, typename P3, |
| 456 typename P4, typename C1, typename C2> |
| 457 inline R DispatchToFunction(Function function, |
| 458 const Tuple4<P1, P2, P3, P4>& p, |
| 459 const Tuple2<C1, C2>& c) { |
| 460 return (*function)(p.a, p.b, p.c, p.d, c.a, c.b); |
| 461 } |
| 306 | 462 |
| 307 // 4 - 3 | 463 // 4 - 3 |
| 308 template <typename R, typename T, typename Method, typename P1, typename P2, | 464 template <typename R, typename T, typename Method, typename P1, typename P2, |
| 309 typename P3, typename P4, typename C1, typename C2, typename C3> | 465 typename P3, typename P4, typename C1, typename C2, typename C3> |
| 310 inline R DispatchToMethod(T* obj, Method method, | 466 inline R DispatchToMethod(T* obj, Method method, |
| 311 const Tuple4<P1, P2, P3, P4>& p, | 467 const Tuple4<P1, P2, P3, P4>& p, |
| 312 const Tuple3<C1, C2, C3>& c) { | 468 const Tuple3<C1, C2, C3>& c) { |
| 313 return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b, c.c); | 469 return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b, c.c); |
| 314 } | 470 } |
| 471 template <typename R, typename Function, typename P1, typename P2, typename P3, |
| 472 typename P4, typename C1, typename C2, typename C3> |
| 473 inline R DispatchToFunction(Function function, |
| 474 const Tuple4<P1, P2, P3, P4>& p, |
| 475 const Tuple3<C1, C2, C3>& c) { |
| 476 return (*function)(p.a, p.b, p.c, p.d, c.a, c.b, c.c); |
| 477 } |
| 315 | 478 |
| 316 // 4 - 4 | 479 // 4 - 4 |
| 317 template <typename R, typename T, typename Method, typename P1, typename P2, | 480 template <typename R, typename T, typename Method, typename P1, typename P2, |
| 318 typename P3, typename P4, typename C1, typename C2, typename C3, | 481 typename P3, typename P4, typename C1, typename C2, typename C3, |
| 319 typename C4> | 482 typename C4> |
| 320 inline R DispatchToMethod(T* obj, Method method, | 483 inline R DispatchToMethod(T* obj, Method method, |
| 321 const Tuple4<P1, P2, P3, P4>& p, | 484 const Tuple4<P1, P2, P3, P4>& p, |
| 322 const Tuple4<C1, C2, C3, C4>& c) { | 485 const Tuple4<C1, C2, C3, C4>& c) { |
| 323 return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b, c.c, c.d); | 486 return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b, c.c, c.d); |
| 324 } | 487 } |
| 488 template <typename R, typename Function, typename P1, typename P2, typename P3, |
| 489 typename P4, typename C1, typename C2, typename C3, typename C4> |
| 490 inline R DispatchToFunction(Function function, |
| 491 const Tuple4<P1, P2, P3, P4>& p, |
| 492 const Tuple4<C1, C2, C3, C4>& c) { |
| 493 return (*function)(p.a, p.b, p.c, p.d, c.a, c.b, c.c, c.d); |
| 494 } |
| 325 | 495 |
| 326 // Interface that is exposed to the consumer, that does the actual calling | 496 // Interface that is exposed to the consumer, that does the actual calling |
| 327 // of the method. | 497 // of the method. |
| 328 template <typename R, typename Params> | 498 template <typename R, typename Params> |
| 329 class MutantRunner { | 499 class MutantRunner { |
| 330 public: | 500 public: |
| 331 virtual R RunWithParams(const Params& params) = 0; | 501 virtual R RunWithParams(const Params& params) = 0; |
| 332 virtual ~MutantRunner() {} | 502 virtual ~MutantRunner() {} |
| 333 }; | 503 }; |
| 334 | 504 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 346 // MutantRunner implementation | 516 // MutantRunner implementation |
| 347 virtual R RunWithParams(const Params& params) { | 517 virtual R RunWithParams(const Params& params) { |
| 348 return DispatchToMethod<R>(this->obj_, this->method_, pb_, params); | 518 return DispatchToMethod<R>(this->obj_, this->method_, pb_, params); |
| 349 } | 519 } |
| 350 | 520 |
| 351 T* obj_; | 521 T* obj_; |
| 352 Method method_; | 522 Method method_; |
| 353 PreBound pb_; | 523 PreBound pb_; |
| 354 }; | 524 }; |
| 355 | 525 |
| 526 template <typename R, typename Function, typename PreBound, typename Params> |
| 527 class MutantFunction : public MutantRunner<R, Params> { |
| 528 public: |
| 529 MutantFunction(Function function, const PreBound& pb) |
| 530 : function_(function), pb_(pb) { |
| 531 } |
| 532 |
| 533 // MutantRunner implementation |
| 534 virtual R RunWithParams(const Params& params) { |
| 535 return DispatchToFunction<R>(function_, pb_, params); |
| 536 } |
| 537 |
| 538 Function function_; |
| 539 PreBound pb_; |
| 540 }; |
| 541 |
| 356 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 542 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 357 // MutantLateBind is like Mutant, but you bind a pointer to a pointer | 543 // MutantLateBind is like Mutant, but you bind a pointer to a pointer |
| 358 // to the object. This way you can create actions for an object | 544 // to the object. This way you can create actions for an object |
| 359 // that is not yet created (has only storage for a pointer to it). | 545 // that is not yet created (has only storage for a pointer to it). |
| 360 template <typename R, typename T, typename Method, | 546 template <typename R, typename T, typename Method, |
| 361 typename PreBound, typename Params> | 547 typename PreBound, typename Params> |
| 362 class MutantLateObjectBind : public MutantRunner<R, Params> { | 548 class MutantLateObjectBind : public MutantRunner<R, Params> { |
| 363 public: | 549 public: |
| 364 MutantLateObjectBind(T** obj, Method method, const PreBound& pb) | 550 MutantLateObjectBind(T** obj, Method method, const PreBound& pb) |
| 365 : obj_(obj), method_(method), pb_(pb) { | 551 : obj_(obj), method_(method), pb_(pb) { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 return impl_->RunWithParams(Params(a, b, c, d)); | 600 return impl_->RunWithParams(Params(a, b, c, d)); |
| 415 } | 601 } |
| 416 | 602 |
| 417 private: | 603 private: |
| 418 // We need copy constructor since MutantFunctor is copied few times | 604 // We need copy constructor since MutantFunctor is copied few times |
| 419 // inside GMock machinery, hence no DISALLOW_EVIL_CONTRUCTORS | 605 // inside GMock machinery, hence no DISALLOW_EVIL_CONTRUCTORS |
| 420 MutantFunctor(); | 606 MutantFunctor(); |
| 421 linked_ptr<MutantRunner<R, Params> > impl_; | 607 linked_ptr<MutantRunner<R, Params> > impl_; |
| 422 }; | 608 }; |
| 423 | 609 |
| 424 | |
| 425 | |
| 426 // 0 - 0 | 610 // 0 - 0 |
| 427 template <typename R, typename T> | 611 template <typename R, typename T, typename U> |
| 428 inline MutantFunctor<R, Tuple0> | 612 inline MutantFunctor<R, Tuple0> |
| 429 CreateFunctor(T* obj, R (T::*method)()) { | 613 CreateFunctor(T* obj, R (U::*method)()) { |
| 430 MutantRunner<R, Tuple0> *t = | 614 MutantRunner<R, Tuple0>* t = |
| 431 new Mutant<R, T, R (T::*)(), | 615 new Mutant<R, T, R (U::*)(), |
| 432 Tuple0, Tuple0> | 616 Tuple0, Tuple0> |
| 433 (obj, method, MakeTuple()); | 617 (obj, method, MakeTuple()); |
| 434 return MutantFunctor<R, Tuple0>(t); | 618 return MutantFunctor<R, Tuple0>(t); |
| 435 } | 619 } |
| 436 | 620 |
| 437 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 621 template <typename R> |
| 438 // 0 - 0 | 622 inline MutantFunctor<R, Tuple0> |
| 439 template <typename R, typename T> | 623 CreateFunctor(R (*function)()) { |
| 440 inline MutantFunctor<R, Tuple0> | 624 MutantRunner<R, Tuple0>* t = |
| 441 CreateFunctor(T** obj, R (T::*method)()) { | 625 new MutantFunction<R, R (*)(), |
| 442 MutantRunner<R, Tuple0> *t = | 626 Tuple0, Tuple0> |
| 443 new MutantLateObjectBind<R, T, R (T::*)(), | 627 (function, MakeTuple()); |
| 628 return MutantFunctor<R, Tuple0>(t); |
| 629 } |
| 630 |
| 631 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 632 template <typename R, typename T, typename U> |
| 633 inline MutantFunctor<R, Tuple0> |
| 634 CreateFunctor(T** obj, R (U::*method)()) { |
| 635 MutantRunner<R, Tuple0>* t = |
| 636 new MutantLateObjectBind<R, T, R (U::*)(), |
| 444 Tuple0, Tuple0> | 637 Tuple0, Tuple0> |
| 445 (obj, method, MakeTuple()); | 638 (obj, method, MakeTuple()); |
| 446 return MutantFunctor<R, Tuple0>(t); | 639 return MutantFunctor<R, Tuple0>(t); |
| 447 } | 640 } |
| 448 #endif | 641 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 642 |
| 643 #if defined (OS_WIN) |
| 644 template <typename R, typename T, typename U> |
| 645 inline MutantFunctor<R, Tuple0> |
| 646 CreateFunctor(T* obj, R (__stdcall U::*method)()) { |
| 647 MutantRunner<R, Tuple0>* t = |
| 648 new Mutant<R, T, R (__stdcall U::*)(), |
| 649 Tuple0, Tuple0> |
| 650 (obj, method, MakeTuple()); |
| 651 return MutantFunctor<R, Tuple0>(t); |
| 652 } |
| 653 #endif // OS_WIN |
| 449 | 654 |
| 450 // 0 - 1 | 655 // 0 - 1 |
| 451 template <typename R, typename T, typename A1> | 656 template <typename R, typename T, typename U, typename A1> |
| 452 inline MutantFunctor<R, Tuple1<A1> > | 657 inline MutantFunctor<R, Tuple1<A1> > |
| 453 CreateFunctor(T* obj, R (T::*method)(A1)) { | 658 CreateFunctor(T* obj, R (U::*method)(A1)) { |
| 454 MutantRunner<R, Tuple1<A1> > *t = | 659 MutantRunner<R, Tuple1<A1> >* t = |
| 455 new Mutant<R, T, R (T::*)(A1), | 660 new Mutant<R, T, R (U::*)(A1), |
| 456 Tuple0, Tuple1<A1> > | 661 Tuple0, Tuple1<A1> > |
| 457 (obj, method, MakeTuple()); | 662 (obj, method, MakeTuple()); |
| 458 return MutantFunctor<R, Tuple1<A1> >(t); | 663 return MutantFunctor<R, Tuple1<A1> >(t); |
| 459 } | 664 } |
| 460 | 665 |
| 461 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 666 template <typename R, typename A1> |
| 462 // 0 - 1 | 667 inline MutantFunctor<R, Tuple1<A1> > |
| 463 template <typename R, typename T, typename A1> | 668 CreateFunctor(R (*function)(A1)) { |
| 464 inline MutantFunctor<R, Tuple1<A1> > | 669 MutantRunner<R, Tuple1<A1> >* t = |
| 465 CreateFunctor(T** obj, R (T::*method)(A1)) { | 670 new MutantFunction<R, R (*)(A1), |
| 466 MutantRunner<R, Tuple1<A1> > *t = | 671 Tuple0, Tuple1<A1> > |
| 467 new MutantLateObjectBind<R, T, R (T::*)(A1), | 672 (function, MakeTuple()); |
| 673 return MutantFunctor<R, Tuple1<A1> >(t); |
| 674 } |
| 675 |
| 676 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 677 template <typename R, typename T, typename U, typename A1> |
| 678 inline MutantFunctor<R, Tuple1<A1> > |
| 679 CreateFunctor(T** obj, R (U::*method)(A1)) { |
| 680 MutantRunner<R, Tuple1<A1> >* t = |
| 681 new MutantLateObjectBind<R, T, R (U::*)(A1), |
| 468 Tuple0, Tuple1<A1> > | 682 Tuple0, Tuple1<A1> > |
| 469 (obj, method, MakeTuple()); | 683 (obj, method, MakeTuple()); |
| 470 return MutantFunctor<R, Tuple1<A1> >(t); | 684 return MutantFunctor<R, Tuple1<A1> >(t); |
| 471 } | 685 } |
| 472 #endif | 686 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 687 |
| 688 #if defined (OS_WIN) |
| 689 template <typename R, typename T, typename U, typename A1> |
| 690 inline MutantFunctor<R, Tuple1<A1> > |
| 691 CreateFunctor(T* obj, R (__stdcall U::*method)(A1)) { |
| 692 MutantRunner<R, Tuple1<A1> >* t = |
| 693 new Mutant<R, T, R (__stdcall U::*)(A1), |
| 694 Tuple0, Tuple1<A1> > |
| 695 (obj, method, MakeTuple()); |
| 696 return MutantFunctor<R, Tuple1<A1> >(t); |
| 697 } |
| 698 #endif // OS_WIN |
| 473 | 699 |
| 474 // 0 - 2 | 700 // 0 - 2 |
| 475 template <typename R, typename T, typename A1, typename A2> | 701 template <typename R, typename T, typename U, typename A1, typename A2> |
| 476 inline MutantFunctor<R, Tuple2<A1, A2> > | 702 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 477 CreateFunctor(T* obj, R (T::*method)(A1, A2)) { | 703 CreateFunctor(T* obj, R (U::*method)(A1, A2)) { |
| 478 MutantRunner<R, Tuple2<A1, A2> > *t = | 704 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 479 new Mutant<R, T, R (T::*)(A1, A2), | 705 new Mutant<R, T, R (U::*)(A1, A2), |
| 480 Tuple0, Tuple2<A1, A2> > | 706 Tuple0, Tuple2<A1, A2> > |
| 481 (obj, method, MakeTuple()); | 707 (obj, method, MakeTuple()); |
| 482 return MutantFunctor<R, Tuple2<A1, A2> >(t); | 708 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 483 } | 709 } |
| 484 | 710 |
| 485 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 711 template <typename R, typename A1, typename A2> |
| 486 // 0 - 2 | 712 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 487 template <typename R, typename T, typename A1, typename A2> | 713 CreateFunctor(R (*function)(A1, A2)) { |
| 488 inline MutantFunctor<R, Tuple2<A1, A2> > | 714 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 489 CreateFunctor(T** obj, R (T::*method)(A1, A2)) { | 715 new MutantFunction<R, R (*)(A1, A2), |
| 490 MutantRunner<R, Tuple2<A1, A2> > *t = | 716 Tuple0, Tuple2<A1, A2> > |
| 491 new MutantLateObjectBind<R, T, R (T::*)(A1, A2), | 717 (function, MakeTuple()); |
| 718 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 719 } |
| 720 |
| 721 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 722 template <typename R, typename T, typename U, typename A1, typename A2> |
| 723 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 724 CreateFunctor(T** obj, R (U::*method)(A1, A2)) { |
| 725 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 726 new MutantLateObjectBind<R, T, R (U::*)(A1, A2), |
| 492 Tuple0, Tuple2<A1, A2> > | 727 Tuple0, Tuple2<A1, A2> > |
| 493 (obj, method, MakeTuple()); | 728 (obj, method, MakeTuple()); |
| 494 return MutantFunctor<R, Tuple2<A1, A2> >(t); | 729 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 495 } | 730 } |
| 496 #endif | 731 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 732 |
| 733 #if defined (OS_WIN) |
| 734 template <typename R, typename T, typename U, typename A1, typename A2> |
| 735 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 736 CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2)) { |
| 737 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 738 new Mutant<R, T, R (__stdcall U::*)(A1, A2), |
| 739 Tuple0, Tuple2<A1, A2> > |
| 740 (obj, method, MakeTuple()); |
| 741 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 742 } |
| 743 #endif // OS_WIN |
| 497 | 744 |
| 498 // 0 - 3 | 745 // 0 - 3 |
| 499 template <typename R, typename T, typename A1, typename A2, typename A3> | 746 template <typename R, typename T, typename U, typename A1, typename A2, |
| 500 inline MutantFunctor<R, Tuple3<A1, A2, A3> > | 747 typename A3> |
| 501 CreateFunctor(T* obj, R (T::*method)(A1, A2, A3)) { | 748 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 502 MutantRunner<R, Tuple3<A1, A2, A3> > *t = | 749 CreateFunctor(T* obj, R (U::*method)(A1, A2, A3)) { |
| 503 new Mutant<R, T, R (T::*)(A1, A2, A3), | 750 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 751 new Mutant<R, T, R (U::*)(A1, A2, A3), |
| 504 Tuple0, Tuple3<A1, A2, A3> > | 752 Tuple0, Tuple3<A1, A2, A3> > |
| 505 (obj, method, MakeTuple()); | 753 (obj, method, MakeTuple()); |
| 506 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); | 754 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 507 } | 755 } |
| 508 | 756 |
| 509 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 757 template <typename R, typename A1, typename A2, typename A3> |
| 510 // 0 - 3 | 758 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 511 template <typename R, typename T, typename A1, typename A2, typename A3> | 759 CreateFunctor(R (*function)(A1, A2, A3)) { |
| 512 inline MutantFunctor<R, Tuple3<A1, A2, A3> > | 760 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 513 CreateFunctor(T** obj, R (T::*method)(A1, A2, A3)) { | 761 new MutantFunction<R, R (*)(A1, A2, A3), |
| 514 MutantRunner<R, Tuple3<A1, A2, A3> > *t = | 762 Tuple0, Tuple3<A1, A2, A3> > |
| 515 new MutantLateObjectBind<R, T, R (T::*)(A1, A2, A3), | 763 (function, MakeTuple()); |
| 764 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 765 } |
| 766 |
| 767 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 768 template <typename R, typename T, typename U, typename A1, typename A2, |
| 769 typename A3> |
| 770 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 771 CreateFunctor(T** obj, R (U::*method)(A1, A2, A3)) { |
| 772 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 773 new MutantLateObjectBind<R, T, R (U::*)(A1, A2, A3), |
| 516 Tuple0, Tuple3<A1, A2, A3> > | 774 Tuple0, Tuple3<A1, A2, A3> > |
| 517 (obj, method, MakeTuple()); | 775 (obj, method, MakeTuple()); |
| 518 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); | 776 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 519 } | 777 } |
| 520 #endif | 778 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 779 |
| 780 #if defined (OS_WIN) |
| 781 template <typename R, typename T, typename U, typename A1, typename A2, |
| 782 typename A3> |
| 783 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 784 CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3)) { |
| 785 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 786 new Mutant<R, T, R (__stdcall U::*)(A1, A2, A3), |
| 787 Tuple0, Tuple3<A1, A2, A3> > |
| 788 (obj, method, MakeTuple()); |
| 789 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 790 } |
| 791 #endif // OS_WIN |
| 521 | 792 |
| 522 // 0 - 4 | 793 // 0 - 4 |
| 523 template <typename R, typename T, typename A1, typename A2, typename A3, | 794 template <typename R, typename T, typename U, typename A1, typename A2, |
| 524 typename A4> | 795 typename A3, typename A4> |
| 525 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > | 796 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 526 CreateFunctor(T* obj, R (T::*method)(A1, A2, A3, A4)) { | 797 CreateFunctor(T* obj, R (U::*method)(A1, A2, A3, A4)) { |
| 527 MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = | 798 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 528 new Mutant<R, T, R (T::*)(A1, A2, A3, A4), | 799 new Mutant<R, T, R (U::*)(A1, A2, A3, A4), |
| 529 Tuple0, Tuple4<A1, A2, A3, A4> > | 800 Tuple0, Tuple4<A1, A2, A3, A4> > |
| 530 (obj, method, MakeTuple()); | 801 (obj, method, MakeTuple()); |
| 531 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); | 802 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 532 } | 803 } |
| 533 | 804 |
| 534 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 805 template <typename R, typename A1, typename A2, typename A3, typename A4> |
| 535 // 0 - 4 | 806 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 536 template <typename R, typename T, typename A1, typename A2, typename A3, | 807 CreateFunctor(R (*function)(A1, A2, A3, A4)) { |
| 537 typename A4> | 808 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 538 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > | 809 new MutantFunction<R, R (*)(A1, A2, A3, A4), |
| 539 CreateFunctor(T** obj, R (T::*method)(A1, A2, A3, A4)) { | 810 Tuple0, Tuple4<A1, A2, A3, A4> > |
| 540 MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = | 811 (function, MakeTuple()); |
| 541 new MutantLateObjectBind<R, T, R (T::*)(A1, A2, A3, A4), | 812 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 813 } |
| 814 |
| 815 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 816 template <typename R, typename T, typename U, typename A1, typename A2, |
| 817 typename A3, typename A4> |
| 818 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 819 CreateFunctor(T** obj, R (U::*method)(A1, A2, A3, A4)) { |
| 820 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 821 new MutantLateObjectBind<R, T, R (U::*)(A1, A2, A3, A4), |
| 542 Tuple0, Tuple4<A1, A2, A3, A4> > | 822 Tuple0, Tuple4<A1, A2, A3, A4> > |
| 543 (obj, method, MakeTuple()); | 823 (obj, method, MakeTuple()); |
| 544 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); | 824 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 545 } | 825 } |
| 546 #endif | 826 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 827 |
| 828 #if defined (OS_WIN) |
| 829 template <typename R, typename T, typename U, typename A1, typename A2, |
| 830 typename A3, typename A4> |
| 831 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 832 CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3, A4)) { |
| 833 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 834 new Mutant<R, T, R (__stdcall U::*)(A1, A2, A3, A4), |
| 835 Tuple0, Tuple4<A1, A2, A3, A4> > |
| 836 (obj, method, MakeTuple()); |
| 837 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 838 } |
| 839 #endif // OS_WIN |
| 547 | 840 |
| 548 // 1 - 0 | 841 // 1 - 0 |
| 549 template <typename R, typename T, typename P1, typename X1> | 842 template <typename R, typename T, typename U, typename P1, typename X1> |
| 550 inline MutantFunctor<R, Tuple0> | 843 inline MutantFunctor<R, Tuple0> |
| 551 CreateFunctor(T* obj, R (T::*method)(X1), const P1& p1) { | 844 CreateFunctor(T* obj, R (U::*method)(X1), const P1& p1) { |
| 552 MutantRunner<R, Tuple0> *t = | 845 MutantRunner<R, Tuple0>* t = |
| 553 new Mutant<R, T, R (T::*)(X1), | 846 new Mutant<R, T, R (U::*)(X1), |
| 554 Tuple1<P1>, Tuple0> | 847 Tuple1<P1>, Tuple0> |
| 555 (obj, method, MakeTuple(p1)); | 848 (obj, method, MakeTuple(p1)); |
| 556 return MutantFunctor<R, Tuple0>(t); | 849 return MutantFunctor<R, Tuple0>(t); |
| 557 } | 850 } |
| 558 | 851 |
| 559 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 852 template <typename R, typename P1, typename X1> |
| 560 // 1 - 0 | 853 inline MutantFunctor<R, Tuple0> |
| 561 template <typename R, typename T, typename P1, typename X1> | 854 CreateFunctor(R (*function)(X1), const P1& p1) { |
| 562 inline MutantFunctor<R, Tuple0> | 855 MutantRunner<R, Tuple0>* t = |
| 563 CreateFunctor(T** obj, R (T::*method)(X1), const P1& p1) { | 856 new MutantFunction<R, R (*)(X1), |
| 564 MutantRunner<R, Tuple0> *t = | 857 Tuple1<P1>, Tuple0> |
| 565 new MutantLateObjectBind<R, T, R (T::*)(X1), | 858 (function, MakeTuple(p1)); |
| 859 return MutantFunctor<R, Tuple0>(t); |
| 860 } |
| 861 |
| 862 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 863 template <typename R, typename T, typename U, typename P1, typename X1> |
| 864 inline MutantFunctor<R, Tuple0> |
| 865 CreateFunctor(T** obj, R (U::*method)(X1), const P1& p1) { |
| 866 MutantRunner<R, Tuple0>* t = |
| 867 new MutantLateObjectBind<R, T, R (U::*)(X1), |
| 566 Tuple1<P1>, Tuple0> | 868 Tuple1<P1>, Tuple0> |
| 567 (obj, method, MakeTuple(p1)); | 869 (obj, method, MakeTuple(p1)); |
| 568 return MutantFunctor<R, Tuple0>(t); | 870 return MutantFunctor<R, Tuple0>(t); |
| 569 } | 871 } |
| 570 #endif | 872 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 873 |
| 874 #if defined (OS_WIN) |
| 875 template <typename R, typename T, typename U, typename P1, typename X1> |
| 876 inline MutantFunctor<R, Tuple0> |
| 877 CreateFunctor(T* obj, R (__stdcall U::*method)(X1), const P1& p1) { |
| 878 MutantRunner<R, Tuple0>* t = |
| 879 new Mutant<R, T, R (__stdcall U::*)(X1), |
| 880 Tuple1<P1>, Tuple0> |
| 881 (obj, method, MakeTuple(p1)); |
| 882 return MutantFunctor<R, Tuple0>(t); |
| 883 } |
| 884 #endif // OS_WIN |
| 571 | 885 |
| 572 // 1 - 1 | 886 // 1 - 1 |
| 573 template <typename R, typename T, typename P1, typename A1, typename X1> | 887 template <typename R, typename T, typename U, typename P1, typename A1, |
| 574 inline MutantFunctor<R, Tuple1<A1> > | 888 typename X1> |
| 575 CreateFunctor(T* obj, R (T::*method)(X1, A1), const P1& p1) { | 889 inline MutantFunctor<R, Tuple1<A1> > |
| 576 MutantRunner<R, Tuple1<A1> > *t = | 890 CreateFunctor(T* obj, R (U::*method)(X1, A1), const P1& p1) { |
| 577 new Mutant<R, T, R (T::*)(X1, A1), | 891 MutantRunner<R, Tuple1<A1> >* t = |
| 892 new Mutant<R, T, R (U::*)(X1, A1), |
| 578 Tuple1<P1>, Tuple1<A1> > | 893 Tuple1<P1>, Tuple1<A1> > |
| 579 (obj, method, MakeTuple(p1)); | 894 (obj, method, MakeTuple(p1)); |
| 580 return MutantFunctor<R, Tuple1<A1> >(t); | 895 return MutantFunctor<R, Tuple1<A1> >(t); |
| 581 } | 896 } |
| 582 | 897 |
| 583 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 898 template <typename R, typename P1, typename A1, typename X1> |
| 584 // 1 - 1 | 899 inline MutantFunctor<R, Tuple1<A1> > |
| 585 template <typename R, typename T, typename P1, typename A1, typename X1> | 900 CreateFunctor(R (*function)(X1, A1), const P1& p1) { |
| 586 inline MutantFunctor<R, Tuple1<A1> > | 901 MutantRunner<R, Tuple1<A1> >* t = |
| 587 CreateFunctor(T** obj, R (T::*method)(X1, A1), const P1& p1) { | 902 new MutantFunction<R, R (*)(X1, A1), |
| 588 MutantRunner<R, Tuple1<A1> > *t = | 903 Tuple1<P1>, Tuple1<A1> > |
| 589 new MutantLateObjectBind<R, T, R (T::*)(X1, A1), | 904 (function, MakeTuple(p1)); |
| 905 return MutantFunctor<R, Tuple1<A1> >(t); |
| 906 } |
| 907 |
| 908 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 909 template <typename R, typename T, typename U, typename P1, typename A1, |
| 910 typename X1> |
| 911 inline MutantFunctor<R, Tuple1<A1> > |
| 912 CreateFunctor(T** obj, R (U::*method)(X1, A1), const P1& p1) { |
| 913 MutantRunner<R, Tuple1<A1> >* t = |
| 914 new MutantLateObjectBind<R, T, R (U::*)(X1, A1), |
| 590 Tuple1<P1>, Tuple1<A1> > | 915 Tuple1<P1>, Tuple1<A1> > |
| 591 (obj, method, MakeTuple(p1)); | 916 (obj, method, MakeTuple(p1)); |
| 592 return MutantFunctor<R, Tuple1<A1> >(t); | 917 return MutantFunctor<R, Tuple1<A1> >(t); |
| 593 } | 918 } |
| 594 #endif | 919 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 920 |
| 921 #if defined (OS_WIN) |
| 922 template <typename R, typename T, typename U, typename P1, typename A1, |
| 923 typename X1> |
| 924 inline MutantFunctor<R, Tuple1<A1> > |
| 925 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1), const P1& p1) { |
| 926 MutantRunner<R, Tuple1<A1> >* t = |
| 927 new Mutant<R, T, R (__stdcall U::*)(X1, A1), |
| 928 Tuple1<P1>, Tuple1<A1> > |
| 929 (obj, method, MakeTuple(p1)); |
| 930 return MutantFunctor<R, Tuple1<A1> >(t); |
| 931 } |
| 932 #endif // OS_WIN |
| 595 | 933 |
| 596 // 1 - 2 | 934 // 1 - 2 |
| 597 template <typename R, typename T, typename P1, typename A1, typename A2, | 935 template <typename R, typename T, typename U, typename P1, typename A1, |
| 936 typename A2, typename X1> |
| 937 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 938 CreateFunctor(T* obj, R (U::*method)(X1, A1, A2), const P1& p1) { |
| 939 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 940 new Mutant<R, T, R (U::*)(X1, A1, A2), |
| 941 Tuple1<P1>, Tuple2<A1, A2> > |
| 942 (obj, method, MakeTuple(p1)); |
| 943 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 944 } |
| 945 |
| 946 template <typename R, typename P1, typename A1, typename A2, typename X1> |
| 947 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 948 CreateFunctor(R (*function)(X1, A1, A2), const P1& p1) { |
| 949 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 950 new MutantFunction<R, R (*)(X1, A1, A2), |
| 951 Tuple1<P1>, Tuple2<A1, A2> > |
| 952 (function, MakeTuple(p1)); |
| 953 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 954 } |
| 955 |
| 956 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 957 template <typename R, typename T, typename U, typename P1, typename A1, |
| 958 typename A2, typename X1> |
| 959 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 960 CreateFunctor(T** obj, R (U::*method)(X1, A1, A2), const P1& p1) { |
| 961 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 962 new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2), |
| 963 Tuple1<P1>, Tuple2<A1, A2> > |
| 964 (obj, method, MakeTuple(p1)); |
| 965 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 966 } |
| 967 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 968 |
| 969 #if defined (OS_WIN) |
| 970 template <typename R, typename T, typename U, typename P1, typename A1, |
| 971 typename A2, typename X1> |
| 972 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 973 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2), const P1& p1) { |
| 974 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 975 new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2), |
| 976 Tuple1<P1>, Tuple2<A1, A2> > |
| 977 (obj, method, MakeTuple(p1)); |
| 978 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 979 } |
| 980 #endif // OS_WIN |
| 981 |
| 982 // 1 - 3 |
| 983 template <typename R, typename T, typename U, typename P1, typename A1, |
| 984 typename A2, typename A3, typename X1> |
| 985 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 986 CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3), const P1& p1) { |
| 987 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 988 new Mutant<R, T, R (U::*)(X1, A1, A2, A3), |
| 989 Tuple1<P1>, Tuple3<A1, A2, A3> > |
| 990 (obj, method, MakeTuple(p1)); |
| 991 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 992 } |
| 993 |
| 994 template <typename R, typename P1, typename A1, typename A2, typename A3, |
| 598 typename X1> | 995 typename X1> |
| 599 inline MutantFunctor<R, Tuple2<A1, A2> > | 996 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 600 CreateFunctor(T* obj, R (T::*method)(X1, A1, A2), const P1& p1) { | 997 CreateFunctor(R (*function)(X1, A1, A2, A3), const P1& p1) { |
| 601 MutantRunner<R, Tuple2<A1, A2> > *t = | 998 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 602 new Mutant<R, T, R (T::*)(X1, A1, A2), | 999 new MutantFunction<R, R (*)(X1, A1, A2, A3), |
| 603 Tuple1<P1>, Tuple2<A1, A2> > | 1000 Tuple1<P1>, Tuple3<A1, A2, A3> > |
| 604 (obj, method, MakeTuple(p1)); | 1001 (function, MakeTuple(p1)); |
| 605 return MutantFunctor<R, Tuple2<A1, A2> >(t); | 1002 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 606 } | 1003 } |
| 607 | 1004 |
| 608 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 1005 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 609 // 1 - 2 | 1006 template <typename R, typename T, typename U, typename P1, typename A1, |
| 610 template <typename R, typename T, typename P1, typename A1, typename A2, | 1007 typename A2, typename A3, typename X1> |
| 611 typename X1> | 1008 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 612 inline MutantFunctor<R, Tuple2<A1, A2> > | 1009 CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3), const P1& p1) { |
| 613 CreateFunctor(T** obj, R (T::*method)(X1, A1, A2), const P1& p1) { | 1010 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 614 MutantRunner<R, Tuple2<A1, A2> > *t = | 1011 new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2, A3), |
| 615 new MutantLateObjectBind<R, T, R (T::*)(X1, A1, A2), | 1012 Tuple1<P1>, Tuple3<A1, A2, A3> > |
| 616 Tuple1<P1>, Tuple2<A1, A2> > | 1013 (obj, method, MakeTuple(p1)); |
| 617 (obj, method, MakeTuple(p1)); | 1014 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 618 return MutantFunctor<R, Tuple2<A1, A2> >(t); | 1015 } |
| 619 } | 1016 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 620 #endif | 1017 |
| 621 | 1018 #if defined (OS_WIN) |
| 622 // 1 - 3 | 1019 template <typename R, typename T, typename U, typename P1, typename A1, |
| 623 template <typename R, typename T, typename P1, typename A1, typename A2, | 1020 typename A2, typename A3, typename X1> |
| 624 typename A3, typename X1> | 1021 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 625 inline MutantFunctor<R, Tuple3<A1, A2, A3> > | 1022 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3), const P1& p1) { |
| 626 CreateFunctor(T* obj, R (T::*method)(X1, A1, A2, A3), const P1& p1) { | 1023 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 627 MutantRunner<R, Tuple3<A1, A2, A3> > *t = | 1024 new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2, A3), |
| 628 new Mutant<R, T, R (T::*)(X1, A1, A2, A3), | |
| 629 Tuple1<P1>, Tuple3<A1, A2, A3> > | 1025 Tuple1<P1>, Tuple3<A1, A2, A3> > |
| 630 (obj, method, MakeTuple(p1)); | 1026 (obj, method, MakeTuple(p1)); |
| 631 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); | 1027 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 632 } | 1028 } |
| 633 | 1029 #endif // OS_WIN |
| 634 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | |
| 635 // 1 - 3 | |
| 636 template <typename R, typename T, typename P1, typename A1, typename A2, | |
| 637 typename A3, typename X1> | |
| 638 inline MutantFunctor<R, Tuple3<A1, A2, A3> > | |
| 639 CreateFunctor(T** obj, R (T::*method)(X1, A1, A2, A3), const P1& p1) { | |
| 640 MutantRunner<R, Tuple3<A1, A2, A3> > *t = | |
| 641 new MutantLateObjectBind<R, T, R (T::*)(X1, A1, A2, A3), | |
| 642 Tuple1<P1>, Tuple3<A1, A2, A3> > | |
| 643 (obj, method, MakeTuple(p1)); | |
| 644 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); | |
| 645 } | |
| 646 #endif | |
| 647 | 1030 |
| 648 // 1 - 4 | 1031 // 1 - 4 |
| 649 template <typename R, typename T, typename P1, typename A1, typename A2, | 1032 template <typename R, typename T, typename U, typename P1, typename A1, |
| 650 typename A3, typename A4, typename X1> | 1033 typename A2, typename A3, typename A4, typename X1> |
| 651 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > | 1034 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 652 CreateFunctor(T* obj, R (T::*method)(X1, A1, A2, A3, A4), const P1& p1) { | 1035 CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3, A4), const P1& p1) { |
| 653 MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = | 1036 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 654 new Mutant<R, T, R (T::*)(X1, A1, A2, A3, A4), | 1037 new Mutant<R, T, R (U::*)(X1, A1, A2, A3, A4), |
| 655 Tuple1<P1>, Tuple4<A1, A2, A3, A4> > | 1038 Tuple1<P1>, Tuple4<A1, A2, A3, A4> > |
| 656 (obj, method, MakeTuple(p1)); | 1039 (obj, method, MakeTuple(p1)); |
| 657 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); | 1040 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 658 } | 1041 } |
| 659 | 1042 |
| 660 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 1043 template <typename R, typename P1, typename A1, typename A2, typename A3, |
| 661 // 1 - 4 | 1044 typename A4, typename X1> |
| 662 template <typename R, typename T, typename P1, typename A1, typename A2, | 1045 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 663 typename A3, typename A4, typename X1> | 1046 CreateFunctor(R (*function)(X1, A1, A2, A3, A4), const P1& p1) { |
| 664 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > | 1047 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 665 CreateFunctor(T** obj, R (T::*method)(X1, A1, A2, A3, A4), const P1& p1) { | 1048 new MutantFunction<R, R (*)(X1, A1, A2, A3, A4), |
| 666 MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = | 1049 Tuple1<P1>, Tuple4<A1, A2, A3, A4> > |
| 667 new MutantLateObjectBind<R, T, R (T::*)(X1, A1, A2, A3, A4), | 1050 (function, MakeTuple(p1)); |
| 1051 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 1052 } |
| 1053 |
| 1054 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1055 template <typename R, typename T, typename U, typename P1, typename A1, |
| 1056 typename A2, typename A3, typename A4, typename X1> |
| 1057 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 1058 CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3, A4), const P1& p1) { |
| 1059 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 1060 new MutantLateObjectBind<R, T, R (U::*)(X1, A1, A2, A3, A4), |
| 668 Tuple1<P1>, Tuple4<A1, A2, A3, A4> > | 1061 Tuple1<P1>, Tuple4<A1, A2, A3, A4> > |
| 669 (obj, method, MakeTuple(p1)); | 1062 (obj, method, MakeTuple(p1)); |
| 670 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); | 1063 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 671 } | 1064 } |
| 672 #endif | 1065 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1066 |
| 1067 #if defined (OS_WIN) |
| 1068 template <typename R, typename T, typename U, typename P1, typename A1, |
| 1069 typename A2, typename A3, typename A4, typename X1> |
| 1070 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 1071 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4), |
| 1072 const P1& p1) { |
| 1073 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 1074 new Mutant<R, T, R (__stdcall U::*)(X1, A1, A2, A3, A4), |
| 1075 Tuple1<P1>, Tuple4<A1, A2, A3, A4> > |
| 1076 (obj, method, MakeTuple(p1)); |
| 1077 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 1078 } |
| 1079 #endif // OS_WIN |
| 673 | 1080 |
| 674 // 2 - 0 | 1081 // 2 - 0 |
| 675 template <typename R, typename T, typename P1, typename P2, typename X1, | 1082 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1083 typename X1, typename X2> |
| 1084 inline MutantFunctor<R, Tuple0> |
| 1085 CreateFunctor(T* obj, R (U::*method)(X1, X2), const P1& p1, const P2& p2) { |
| 1086 MutantRunner<R, Tuple0>* t = |
| 1087 new Mutant<R, T, R (U::*)(X1, X2), |
| 1088 Tuple2<P1, P2>, Tuple0> |
| 1089 (obj, method, MakeTuple(p1, p2)); |
| 1090 return MutantFunctor<R, Tuple0>(t); |
| 1091 } |
| 1092 |
| 1093 template <typename R, typename P1, typename P2, typename X1, typename X2> |
| 1094 inline MutantFunctor<R, Tuple0> |
| 1095 CreateFunctor(R (*function)(X1, X2), const P1& p1, const P2& p2) { |
| 1096 MutantRunner<R, Tuple0>* t = |
| 1097 new MutantFunction<R, R (*)(X1, X2), |
| 1098 Tuple2<P1, P2>, Tuple0> |
| 1099 (function, MakeTuple(p1, p2)); |
| 1100 return MutantFunctor<R, Tuple0>(t); |
| 1101 } |
| 1102 |
| 1103 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1104 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1105 typename X1, typename X2> |
| 1106 inline MutantFunctor<R, Tuple0> |
| 1107 CreateFunctor(T** obj, R (U::*method)(X1, X2), const P1& p1, const P2& p2) { |
| 1108 MutantRunner<R, Tuple0>* t = |
| 1109 new MutantLateObjectBind<R, T, R (U::*)(X1, X2), |
| 1110 Tuple2<P1, P2>, Tuple0> |
| 1111 (obj, method, MakeTuple(p1, p2)); |
| 1112 return MutantFunctor<R, Tuple0>(t); |
| 1113 } |
| 1114 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1115 |
| 1116 #if defined (OS_WIN) |
| 1117 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1118 typename X1, typename X2> |
| 1119 inline MutantFunctor<R, Tuple0> |
| 1120 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2), const P1& p1, |
| 1121 const P2& p2) { |
| 1122 MutantRunner<R, Tuple0>* t = |
| 1123 new Mutant<R, T, R (__stdcall U::*)(X1, X2), |
| 1124 Tuple2<P1, P2>, Tuple0> |
| 1125 (obj, method, MakeTuple(p1, p2)); |
| 1126 return MutantFunctor<R, Tuple0>(t); |
| 1127 } |
| 1128 #endif // OS_WIN |
| 1129 |
| 1130 // 2 - 1 |
| 1131 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1132 typename A1, typename X1, typename X2> |
| 1133 inline MutantFunctor<R, Tuple1<A1> > |
| 1134 CreateFunctor(T* obj, R (U::*method)(X1, X2, A1), const P1& p1, const P2& p2) { |
| 1135 MutantRunner<R, Tuple1<A1> >* t = |
| 1136 new Mutant<R, T, R (U::*)(X1, X2, A1), |
| 1137 Tuple2<P1, P2>, Tuple1<A1> > |
| 1138 (obj, method, MakeTuple(p1, p2)); |
| 1139 return MutantFunctor<R, Tuple1<A1> >(t); |
| 1140 } |
| 1141 |
| 1142 template <typename R, typename P1, typename P2, typename A1, typename X1, |
| 676 typename X2> | 1143 typename X2> |
| 677 inline MutantFunctor<R, Tuple0> | 1144 inline MutantFunctor<R, Tuple1<A1> > |
| 678 CreateFunctor(T* obj, R (T::*method)(X1, X2), const P1& p1, const P2& p2) { | 1145 CreateFunctor(R (*function)(X1, X2, A1), const P1& p1, const P2& p2) { |
| 679 MutantRunner<R, Tuple0> *t = | 1146 MutantRunner<R, Tuple1<A1> >* t = |
| 680 new Mutant<R, T, R (T::*)(X1, X2), | 1147 new MutantFunction<R, R (*)(X1, X2, A1), |
| 681 Tuple2<P1, P2>, Tuple0> | 1148 Tuple2<P1, P2>, Tuple1<A1> > |
| 682 (obj, method, MakeTuple(p1, p2)); | 1149 (function, MakeTuple(p1, p2)); |
| 683 return MutantFunctor<R, Tuple0>(t); | 1150 return MutantFunctor<R, Tuple1<A1> >(t); |
| 684 } | 1151 } |
| 685 | 1152 |
| 686 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 1153 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 687 // 2 - 0 | 1154 template <typename R, typename T, typename U, typename P1, typename P2, |
| 688 template <typename R, typename T, typename P1, typename P2, typename X1, | 1155 typename A1, typename X1, typename X2> |
| 1156 inline MutantFunctor<R, Tuple1<A1> > |
| 1157 CreateFunctor(T** obj, R (U::*method)(X1, X2, A1), const P1& p1, const P2& p2) { |
| 1158 MutantRunner<R, Tuple1<A1> >* t = |
| 1159 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1), |
| 1160 Tuple2<P1, P2>, Tuple1<A1> > |
| 1161 (obj, method, MakeTuple(p1, p2)); |
| 1162 return MutantFunctor<R, Tuple1<A1> >(t); |
| 1163 } |
| 1164 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1165 |
| 1166 #if defined (OS_WIN) |
| 1167 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1168 typename A1, typename X1, typename X2> |
| 1169 inline MutantFunctor<R, Tuple1<A1> > |
| 1170 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1), const P1& p1, |
| 1171 const P2& p2) { |
| 1172 MutantRunner<R, Tuple1<A1> >* t = |
| 1173 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1), |
| 1174 Tuple2<P1, P2>, Tuple1<A1> > |
| 1175 (obj, method, MakeTuple(p1, p2)); |
| 1176 return MutantFunctor<R, Tuple1<A1> >(t); |
| 1177 } |
| 1178 #endif // OS_WIN |
| 1179 |
| 1180 // 2 - 2 |
| 1181 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1182 typename A1, typename A2, typename X1, typename X2> |
| 1183 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 1184 CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2), const P1& p1, |
| 1185 const P2& p2) { |
| 1186 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 1187 new Mutant<R, T, R (U::*)(X1, X2, A1, A2), |
| 1188 Tuple2<P1, P2>, Tuple2<A1, A2> > |
| 1189 (obj, method, MakeTuple(p1, p2)); |
| 1190 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 1191 } |
| 1192 |
| 1193 template <typename R, typename P1, typename P2, typename A1, typename A2, |
| 1194 typename X1, typename X2> |
| 1195 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 1196 CreateFunctor(R (*function)(X1, X2, A1, A2), const P1& p1, const P2& p2) { |
| 1197 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 1198 new MutantFunction<R, R (*)(X1, X2, A1, A2), |
| 1199 Tuple2<P1, P2>, Tuple2<A1, A2> > |
| 1200 (function, MakeTuple(p1, p2)); |
| 1201 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 1202 } |
| 1203 |
| 1204 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1205 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1206 typename A1, typename A2, typename X1, typename X2> |
| 1207 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 1208 CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2), const P1& p1, |
| 1209 const P2& p2) { |
| 1210 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 1211 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2), |
| 1212 Tuple2<P1, P2>, Tuple2<A1, A2> > |
| 1213 (obj, method, MakeTuple(p1, p2)); |
| 1214 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 1215 } |
| 1216 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1217 |
| 1218 #if defined (OS_WIN) |
| 1219 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1220 typename A1, typename A2, typename X1, typename X2> |
| 1221 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 1222 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2), const P1& p1, |
| 1223 const P2& p2) { |
| 1224 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 1225 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2), |
| 1226 Tuple2<P1, P2>, Tuple2<A1, A2> > |
| 1227 (obj, method, MakeTuple(p1, p2)); |
| 1228 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 1229 } |
| 1230 #endif // OS_WIN |
| 1231 |
| 1232 // 2 - 3 |
| 1233 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1234 typename A1, typename A2, typename A3, typename X1, typename X2> |
| 1235 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 1236 CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3), const P1& p1, |
| 1237 const P2& p2) { |
| 1238 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 1239 new Mutant<R, T, R (U::*)(X1, X2, A1, A2, A3), |
| 1240 Tuple2<P1, P2>, Tuple3<A1, A2, A3> > |
| 1241 (obj, method, MakeTuple(p1, p2)); |
| 1242 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 1243 } |
| 1244 |
| 1245 template <typename R, typename P1, typename P2, typename A1, typename A2, |
| 1246 typename A3, typename X1, typename X2> |
| 1247 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 1248 CreateFunctor(R (*function)(X1, X2, A1, A2, A3), const P1& p1, const P2& p2) { |
| 1249 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 1250 new MutantFunction<R, R (*)(X1, X2, A1, A2, A3), |
| 1251 Tuple2<P1, P2>, Tuple3<A1, A2, A3> > |
| 1252 (function, MakeTuple(p1, p2)); |
| 1253 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 1254 } |
| 1255 |
| 1256 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1257 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1258 typename A1, typename A2, typename A3, typename X1, typename X2> |
| 1259 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 1260 CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3), const P1& p1, |
| 1261 const P2& p2) { |
| 1262 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 1263 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2, A3), |
| 1264 Tuple2<P1, P2>, Tuple3<A1, A2, A3> > |
| 1265 (obj, method, MakeTuple(p1, p2)); |
| 1266 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 1267 } |
| 1268 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1269 |
| 1270 #if defined (OS_WIN) |
| 1271 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1272 typename A1, typename A2, typename A3, typename X1, typename X2> |
| 1273 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 1274 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3), |
| 1275 const P1& p1, const P2& p2) { |
| 1276 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 1277 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3), |
| 1278 Tuple2<P1, P2>, Tuple3<A1, A2, A3> > |
| 1279 (obj, method, MakeTuple(p1, p2)); |
| 1280 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 1281 } |
| 1282 #endif // OS_WIN |
| 1283 |
| 1284 // 2 - 4 |
| 1285 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1286 typename A1, typename A2, typename A3, typename A4, typename X1, |
| 689 typename X2> | 1287 typename X2> |
| 690 inline MutantFunctor<R, Tuple0> | 1288 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 691 CreateFunctor(T** obj, R (T::*method)(X1, X2), const P1& p1, const P2& p2) { | 1289 CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3, A4), const P1& p1, |
| 692 MutantRunner<R, Tuple0> *t = | |
| 693 new MutantLateObjectBind<R, T, R (T::*)(X1, X2), | |
| 694 Tuple2<P1, P2>, Tuple0> | |
| 695 (obj, method, MakeTuple(p1, p2)); | |
| 696 return MutantFunctor<R, Tuple0>(t); | |
| 697 } | |
| 698 #endif | |
| 699 | |
| 700 // 2 - 1 | |
| 701 template <typename R, typename T, typename P1, typename P2, typename A1, | |
| 702 typename X1, typename X2> | |
| 703 inline MutantFunctor<R, Tuple1<A1> > | |
| 704 CreateFunctor(T* obj, R (T::*method)(X1, X2, A1), const P1& p1, const P2& p2) { | |
| 705 MutantRunner<R, Tuple1<A1> > *t = | |
| 706 new Mutant<R, T, R (T::*)(X1, X2, A1), | |
| 707 Tuple2<P1, P2>, Tuple1<A1> > | |
| 708 (obj, method, MakeTuple(p1, p2)); | |
| 709 return MutantFunctor<R, Tuple1<A1> >(t); | |
| 710 } | |
| 711 | |
| 712 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | |
| 713 // 2 - 1 | |
| 714 template <typename R, typename T, typename P1, typename P2, typename A1, | |
| 715 typename X1, typename X2> | |
| 716 inline MutantFunctor<R, Tuple1<A1> > | |
| 717 CreateFunctor(T** obj, R (T::*method)(X1, X2, A1), const P1& p1, const P2& p2) { | |
| 718 MutantRunner<R, Tuple1<A1> > *t = | |
| 719 new MutantLateObjectBind<R, T, R (T::*)(X1, X2, A1), | |
| 720 Tuple2<P1, P2>, Tuple1<A1> > | |
| 721 (obj, method, MakeTuple(p1, p2)); | |
| 722 return MutantFunctor<R, Tuple1<A1> >(t); | |
| 723 } | |
| 724 #endif | |
| 725 | |
| 726 // 2 - 2 | |
| 727 template <typename R, typename T, typename P1, typename P2, typename A1, | |
| 728 typename A2, typename X1, typename X2> | |
| 729 inline MutantFunctor<R, Tuple2<A1, A2> > | |
| 730 CreateFunctor(T* obj, R (T::*method)(X1, X2, A1, A2), const P1& p1, | |
| 731 const P2& p2) { | 1290 const P2& p2) { |
| 732 MutantRunner<R, Tuple2<A1, A2> > *t = | 1291 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 733 new Mutant<R, T, R (T::*)(X1, X2, A1, A2), | 1292 new Mutant<R, T, R (U::*)(X1, X2, A1, A2, A3, A4), |
| 734 Tuple2<P1, P2>, Tuple2<A1, A2> > | 1293 Tuple2<P1, P2>, Tuple4<A1, A2, A3, A4> > |
| 735 (obj, method, MakeTuple(p1, p2)); | 1294 (obj, method, MakeTuple(p1, p2)); |
| 736 return MutantFunctor<R, Tuple2<A1, A2> >(t); | 1295 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 737 } | 1296 } |
| 738 | 1297 |
| 739 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 1298 template <typename R, typename P1, typename P2, typename A1, typename A2, |
| 740 // 2 - 2 | 1299 typename A3, typename A4, typename X1, typename X2> |
| 741 template <typename R, typename T, typename P1, typename P2, typename A1, | 1300 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 742 typename A2, typename X1, typename X2> | 1301 CreateFunctor(R (*function)(X1, X2, A1, A2, A3, A4), const P1& p1, |
| 743 inline MutantFunctor<R, Tuple2<A1, A2> > | |
| 744 CreateFunctor(T** obj, R (T::*method)(X1, X2, A1, A2), const P1& p1, | |
| 745 const P2& p2) { | 1302 const P2& p2) { |
| 746 MutantRunner<R, Tuple2<A1, A2> > *t = | 1303 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 747 new MutantLateObjectBind<R, T, R (T::*)(X1, X2, A1, A2), | 1304 new MutantFunction<R, R (*)(X1, X2, A1, A2, A3, A4), |
| 748 Tuple2<P1, P2>, Tuple2<A1, A2> > | 1305 Tuple2<P1, P2>, Tuple4<A1, A2, A3, A4> > |
| 749 (obj, method, MakeTuple(p1, p2)); | 1306 (function, MakeTuple(p1, p2)); |
| 750 return MutantFunctor<R, Tuple2<A1, A2> >(t); | 1307 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 751 } | 1308 } |
| 752 #endif | 1309 |
| 753 | 1310 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 754 // 2 - 3 | 1311 template <typename R, typename T, typename U, typename P1, typename P2, |
| 755 template <typename R, typename T, typename P1, typename P2, typename A1, | 1312 typename A1, typename A2, typename A3, typename A4, typename X1, |
| 756 typename A2, typename A3, typename X1, typename X2> | 1313 typename X2> |
| 757 inline MutantFunctor<R, Tuple3<A1, A2, A3> > | 1314 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 758 CreateFunctor(T* obj, R (T::*method)(X1, X2, A1, A2, A3), const P1& p1, | 1315 CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3, A4), const P1& p1, |
| 759 const P2& p2) { | 1316 const P2& p2) { |
| 760 MutantRunner<R, Tuple3<A1, A2, A3> > *t = | 1317 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 761 new Mutant<R, T, R (T::*)(X1, X2, A1, A2, A3), | 1318 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, A1, A2, A3, A4), |
| 762 Tuple2<P1, P2>, Tuple3<A1, A2, A3> > | 1319 Tuple2<P1, P2>, Tuple4<A1, A2, A3, A4> > |
| 763 (obj, method, MakeTuple(p1, p2)); | 1320 (obj, method, MakeTuple(p1, p2)); |
| 764 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); | 1321 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 765 } | 1322 } |
| 766 | 1323 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 767 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 1324 |
| 768 // 2 - 3 | 1325 #if defined (OS_WIN) |
| 769 template <typename R, typename T, typename P1, typename P2, typename A1, | 1326 template <typename R, typename T, typename U, typename P1, typename P2, |
| 770 typename A2, typename A3, typename X1, typename X2> | 1327 typename A1, typename A2, typename A3, typename A4, typename X1, |
| 771 inline MutantFunctor<R, Tuple3<A1, A2, A3> > | 1328 typename X2> |
| 772 CreateFunctor(T** obj, R (T::*method)(X1, X2, A1, A2, A3), const P1& p1, | 1329 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 773 const P2& p2) { | 1330 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4), |
| 774 MutantRunner<R, Tuple3<A1, A2, A3> > *t = | 1331 const P1& p1, const P2& p2) { |
| 775 new MutantLateObjectBind<R, T, R (T::*)(X1, X2, A1, A2, A3), | 1332 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 776 Tuple2<P1, P2>, Tuple3<A1, A2, A3> > | 1333 new Mutant<R, T, R (__stdcall U::*)(X1, X2, A1, A2, A3, A4), |
| 777 (obj, method, MakeTuple(p1, p2)); | |
| 778 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); | |
| 779 } | |
| 780 #endif | |
| 781 | |
| 782 // 2 - 4 | |
| 783 template <typename R, typename T, typename P1, typename P2, typename A1, | |
| 784 typename A2, typename A3, typename A4, typename X1, typename X2> | |
| 785 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > | |
| 786 CreateFunctor(T* obj, R (T::*method)(X1, X2, A1, A2, A3, A4), const P1& p1, | |
| 787 const P2& p2) { | |
| 788 MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = | |
| 789 new Mutant<R, T, R (T::*)(X1, X2, A1, A2, A3, A4), | |
| 790 Tuple2<P1, P2>, Tuple4<A1, A2, A3, A4> > | 1334 Tuple2<P1, P2>, Tuple4<A1, A2, A3, A4> > |
| 791 (obj, method, MakeTuple(p1, p2)); | 1335 (obj, method, MakeTuple(p1, p2)); |
| 792 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); | 1336 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 793 } | 1337 } |
| 794 | 1338 #endif // OS_WIN |
| 795 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | |
| 796 // 2 - 4 | |
| 797 template <typename R, typename T, typename P1, typename P2, typename A1, | |
| 798 typename A2, typename A3, typename A4, typename X1, typename X2> | |
| 799 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > | |
| 800 CreateFunctor(T** obj, R (T::*method)(X1, X2, A1, A2, A3, A4), const P1& p1, | |
| 801 const P2& p2) { | |
| 802 MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = | |
| 803 new MutantLateObjectBind<R, T, R (T::*)(X1, X2, A1, A2, A3, A4), | |
| 804 Tuple2<P1, P2>, Tuple4<A1, A2, A3, A4> > | |
| 805 (obj, method, MakeTuple(p1, p2)); | |
| 806 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); | |
| 807 } | |
| 808 #endif | |
| 809 | 1339 |
| 810 // 3 - 0 | 1340 // 3 - 0 |
| 811 template <typename R, typename T, typename P1, typename P2, typename P3, | 1341 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1342 typename P3, typename X1, typename X2, typename X3> |
| 1343 inline MutantFunctor<R, Tuple0> |
| 1344 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3), const P1& p1, const P2& p2, |
| 1345 const P3& p3) { |
| 1346 MutantRunner<R, Tuple0>* t = |
| 1347 new Mutant<R, T, R (U::*)(X1, X2, X3), |
| 1348 Tuple3<P1, P2, P3>, Tuple0> |
| 1349 (obj, method, MakeTuple(p1, p2, p3)); |
| 1350 return MutantFunctor<R, Tuple0>(t); |
| 1351 } |
| 1352 |
| 1353 template <typename R, typename P1, typename P2, typename P3, typename X1, |
| 1354 typename X2, typename X3> |
| 1355 inline MutantFunctor<R, Tuple0> |
| 1356 CreateFunctor(R (*function)(X1, X2, X3), const P1& p1, const P2& p2, |
| 1357 const P3& p3) { |
| 1358 MutantRunner<R, Tuple0>* t = |
| 1359 new MutantFunction<R, R (*)(X1, X2, X3), |
| 1360 Tuple3<P1, P2, P3>, Tuple0> |
| 1361 (function, MakeTuple(p1, p2, p3)); |
| 1362 return MutantFunctor<R, Tuple0>(t); |
| 1363 } |
| 1364 |
| 1365 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1366 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1367 typename P3, typename X1, typename X2, typename X3> |
| 1368 inline MutantFunctor<R, Tuple0> |
| 1369 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3), const P1& p1, const P2& p2, |
| 1370 const P3& p3) { |
| 1371 MutantRunner<R, Tuple0>* t = |
| 1372 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3), |
| 1373 Tuple3<P1, P2, P3>, Tuple0> |
| 1374 (obj, method, MakeTuple(p1, p2, p3)); |
| 1375 return MutantFunctor<R, Tuple0>(t); |
| 1376 } |
| 1377 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1378 |
| 1379 #if defined (OS_WIN) |
| 1380 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1381 typename P3, typename X1, typename X2, typename X3> |
| 1382 inline MutantFunctor<R, Tuple0> |
| 1383 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3), const P1& p1, |
| 1384 const P2& p2, const P3& p3) { |
| 1385 MutantRunner<R, Tuple0>* t = |
| 1386 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3), |
| 1387 Tuple3<P1, P2, P3>, Tuple0> |
| 1388 (obj, method, MakeTuple(p1, p2, p3)); |
| 1389 return MutantFunctor<R, Tuple0>(t); |
| 1390 } |
| 1391 #endif // OS_WIN |
| 1392 |
| 1393 // 3 - 1 |
| 1394 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1395 typename P3, typename A1, typename X1, typename X2, typename X3> |
| 1396 inline MutantFunctor<R, Tuple1<A1> > |
| 1397 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1), const P1& p1, |
| 1398 const P2& p2, const P3& p3) { |
| 1399 MutantRunner<R, Tuple1<A1> >* t = |
| 1400 new Mutant<R, T, R (U::*)(X1, X2, X3, A1), |
| 1401 Tuple3<P1, P2, P3>, Tuple1<A1> > |
| 1402 (obj, method, MakeTuple(p1, p2, p3)); |
| 1403 return MutantFunctor<R, Tuple1<A1> >(t); |
| 1404 } |
| 1405 |
| 1406 template <typename R, typename P1, typename P2, typename P3, typename A1, |
| 812 typename X1, typename X2, typename X3> | 1407 typename X1, typename X2, typename X3> |
| 813 inline MutantFunctor<R, Tuple0> | 1408 inline MutantFunctor<R, Tuple1<A1> > |
| 814 CreateFunctor(T* obj, R (T::*method)(X1, X2, X3), const P1& p1, const P2& p2, | 1409 CreateFunctor(R (*function)(X1, X2, X3, A1), const P1& p1, const P2& p2, |
| 815 const P3& p3) { | 1410 const P3& p3) { |
| 816 MutantRunner<R, Tuple0> *t = | 1411 MutantRunner<R, Tuple1<A1> >* t = |
| 817 new Mutant<R, T, R (T::*)(X1, X2, X3), | 1412 new MutantFunction<R, R (*)(X1, X2, X3, A1), |
| 818 Tuple3<P1, P2, P3>, Tuple0> | 1413 Tuple3<P1, P2, P3>, Tuple1<A1> > |
| 819 (obj, method, MakeTuple(p1, p2, p3)); | 1414 (function, MakeTuple(p1, p2, p3)); |
| 820 return MutantFunctor<R, Tuple0>(t); | 1415 return MutantFunctor<R, Tuple1<A1> >(t); |
| 821 } | 1416 } |
| 822 | 1417 |
| 823 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 1418 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 824 // 3 - 0 | 1419 template <typename R, typename T, typename U, typename P1, typename P2, |
| 825 template <typename R, typename T, typename P1, typename P2, typename P3, | 1420 typename P3, typename A1, typename X1, typename X2, typename X3> |
| 1421 inline MutantFunctor<R, Tuple1<A1> > |
| 1422 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1), const P1& p1, |
| 1423 const P2& p2, const P3& p3) { |
| 1424 MutantRunner<R, Tuple1<A1> >* t = |
| 1425 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1), |
| 1426 Tuple3<P1, P2, P3>, Tuple1<A1> > |
| 1427 (obj, method, MakeTuple(p1, p2, p3)); |
| 1428 return MutantFunctor<R, Tuple1<A1> >(t); |
| 1429 } |
| 1430 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1431 |
| 1432 #if defined (OS_WIN) |
| 1433 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1434 typename P3, typename A1, typename X1, typename X2, typename X3> |
| 1435 inline MutantFunctor<R, Tuple1<A1> > |
| 1436 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1), const P1& p1, |
| 1437 const P2& p2, const P3& p3) { |
| 1438 MutantRunner<R, Tuple1<A1> >* t = |
| 1439 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1), |
| 1440 Tuple3<P1, P2, P3>, Tuple1<A1> > |
| 1441 (obj, method, MakeTuple(p1, p2, p3)); |
| 1442 return MutantFunctor<R, Tuple1<A1> >(t); |
| 1443 } |
| 1444 #endif // OS_WIN |
| 1445 |
| 1446 // 3 - 2 |
| 1447 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1448 typename P3, typename A1, typename A2, typename X1, typename X2, |
| 1449 typename X3> |
| 1450 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 1451 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2), const P1& p1, |
| 1452 const P2& p2, const P3& p3) { |
| 1453 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 1454 new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2), |
| 1455 Tuple3<P1, P2, P3>, Tuple2<A1, A2> > |
| 1456 (obj, method, MakeTuple(p1, p2, p3)); |
| 1457 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 1458 } |
| 1459 |
| 1460 template <typename R, typename P1, typename P2, typename P3, typename A1, |
| 1461 typename A2, typename X1, typename X2, typename X3> |
| 1462 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 1463 CreateFunctor(R (*function)(X1, X2, X3, A1, A2), const P1& p1, const P2& p2, |
| 1464 const P3& p3) { |
| 1465 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 1466 new MutantFunction<R, R (*)(X1, X2, X3, A1, A2), |
| 1467 Tuple3<P1, P2, P3>, Tuple2<A1, A2> > |
| 1468 (function, MakeTuple(p1, p2, p3)); |
| 1469 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 1470 } |
| 1471 |
| 1472 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1473 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1474 typename P3, typename A1, typename A2, typename X1, typename X2, |
| 1475 typename X3> |
| 1476 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 1477 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2), const P1& p1, |
| 1478 const P2& p2, const P3& p3) { |
| 1479 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 1480 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2), |
| 1481 Tuple3<P1, P2, P3>, Tuple2<A1, A2> > |
| 1482 (obj, method, MakeTuple(p1, p2, p3)); |
| 1483 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 1484 } |
| 1485 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1486 |
| 1487 #if defined (OS_WIN) |
| 1488 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1489 typename P3, typename A1, typename A2, typename X1, typename X2, |
| 1490 typename X3> |
| 1491 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 1492 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2), |
| 1493 const P1& p1, const P2& p2, const P3& p3) { |
| 1494 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 1495 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2), |
| 1496 Tuple3<P1, P2, P3>, Tuple2<A1, A2> > |
| 1497 (obj, method, MakeTuple(p1, p2, p3)); |
| 1498 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 1499 } |
| 1500 #endif // OS_WIN |
| 1501 |
| 1502 // 3 - 3 |
| 1503 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1504 typename P3, typename A1, typename A2, typename A3, typename X1, |
| 1505 typename X2, typename X3> |
| 1506 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 1507 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3), const P1& p1, |
| 1508 const P2& p2, const P3& p3) { |
| 1509 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 1510 new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2, A3), |
| 1511 Tuple3<P1, P2, P3>, Tuple3<A1, A2, A3> > |
| 1512 (obj, method, MakeTuple(p1, p2, p3)); |
| 1513 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 1514 } |
| 1515 |
| 1516 template <typename R, typename P1, typename P2, typename P3, typename A1, |
| 1517 typename A2, typename A3, typename X1, typename X2, typename X3> |
| 1518 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 1519 CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3), const P1& p1, const P2& p2, |
| 1520 const P3& p3) { |
| 1521 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 1522 new MutantFunction<R, R (*)(X1, X2, X3, A1, A2, A3), |
| 1523 Tuple3<P1, P2, P3>, Tuple3<A1, A2, A3> > |
| 1524 (function, MakeTuple(p1, p2, p3)); |
| 1525 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 1526 } |
| 1527 |
| 1528 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1529 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1530 typename P3, typename A1, typename A2, typename A3, typename X1, |
| 1531 typename X2, typename X3> |
| 1532 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 1533 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3), const P1& p1, |
| 1534 const P2& p2, const P3& p3) { |
| 1535 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 1536 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2, A3), |
| 1537 Tuple3<P1, P2, P3>, Tuple3<A1, A2, A3> > |
| 1538 (obj, method, MakeTuple(p1, p2, p3)); |
| 1539 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 1540 } |
| 1541 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1542 |
| 1543 #if defined (OS_WIN) |
| 1544 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1545 typename P3, typename A1, typename A2, typename A3, typename X1, |
| 1546 typename X2, typename X3> |
| 1547 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 1548 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3), |
| 1549 const P1& p1, const P2& p2, const P3& p3) { |
| 1550 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 1551 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3), |
| 1552 Tuple3<P1, P2, P3>, Tuple3<A1, A2, A3> > |
| 1553 (obj, method, MakeTuple(p1, p2, p3)); |
| 1554 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 1555 } |
| 1556 #endif // OS_WIN |
| 1557 |
| 1558 // 3 - 4 |
| 1559 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1560 typename P3, typename A1, typename A2, typename A3, typename A4, |
| 826 typename X1, typename X2, typename X3> | 1561 typename X1, typename X2, typename X3> |
| 827 inline MutantFunctor<R, Tuple0> | 1562 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 828 CreateFunctor(T** obj, R (T::*method)(X1, X2, X3), const P1& p1, const P2& p2, | 1563 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4), const P1& p1, |
| 829 const P3& p3) { | |
| 830 MutantRunner<R, Tuple0> *t = | |
| 831 new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3), | |
| 832 Tuple3<P1, P2, P3>, Tuple0> | |
| 833 (obj, method, MakeTuple(p1, p2, p3)); | |
| 834 return MutantFunctor<R, Tuple0>(t); | |
| 835 } | |
| 836 #endif | |
| 837 | |
| 838 // 3 - 1 | |
| 839 template <typename R, typename T, typename P1, typename P2, typename P3, | |
| 840 typename A1, typename X1, typename X2, typename X3> | |
| 841 inline MutantFunctor<R, Tuple1<A1> > | |
| 842 CreateFunctor(T* obj, R (T::*method)(X1, X2, X3, A1), const P1& p1, | |
| 843 const P2& p2, const P3& p3) { | 1564 const P2& p2, const P3& p3) { |
| 844 MutantRunner<R, Tuple1<A1> > *t = | 1565 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 845 new Mutant<R, T, R (T::*)(X1, X2, X3, A1), | 1566 new Mutant<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4), |
| 846 Tuple3<P1, P2, P3>, Tuple1<A1> > | 1567 Tuple3<P1, P2, P3>, Tuple4<A1, A2, A3, A4> > |
| 847 (obj, method, MakeTuple(p1, p2, p3)); | 1568 (obj, method, MakeTuple(p1, p2, p3)); |
| 848 return MutantFunctor<R, Tuple1<A1> >(t); | 1569 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 849 } | 1570 } |
| 850 | 1571 |
| 851 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 1572 template <typename R, typename P1, typename P2, typename P3, typename A1, |
| 852 // 3 - 1 | 1573 typename A2, typename A3, typename A4, typename X1, typename X2, |
| 853 template <typename R, typename T, typename P1, typename P2, typename P3, | 1574 typename X3> |
| 854 typename A1, typename X1, typename X2, typename X3> | 1575 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 855 inline MutantFunctor<R, Tuple1<A1> > | 1576 CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3, A4), const P1& p1, |
| 856 CreateFunctor(T** obj, R (T::*method)(X1, X2, X3, A1), const P1& p1, | |
| 857 const P2& p2, const P3& p3) { | 1577 const P2& p2, const P3& p3) { |
| 858 MutantRunner<R, Tuple1<A1> > *t = | 1578 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 859 new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3, A1), | 1579 new MutantFunction<R, R (*)(X1, X2, X3, A1, A2, A3, A4), |
| 860 Tuple3<P1, P2, P3>, Tuple1<A1> > | 1580 Tuple3<P1, P2, P3>, Tuple4<A1, A2, A3, A4> > |
| 861 (obj, method, MakeTuple(p1, p2, p3)); | 1581 (function, MakeTuple(p1, p2, p3)); |
| 862 return MutantFunctor<R, Tuple1<A1> >(t); | 1582 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 863 } | 1583 } |
| 864 #endif | 1584 |
| 865 | 1585 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 866 // 3 - 2 | 1586 template <typename R, typename T, typename U, typename P1, typename P2, |
| 867 template <typename R, typename T, typename P1, typename P2, typename P3, | 1587 typename P3, typename A1, typename A2, typename A3, typename A4, |
| 868 typename A1, typename A2, typename X1, typename X2, typename X3> | 1588 typename X1, typename X2, typename X3> |
| 869 inline MutantFunctor<R, Tuple2<A1, A2> > | 1589 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 870 CreateFunctor(T* obj, R (T::*method)(X1, X2, X3, A1, A2), const P1& p1, | 1590 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4), const P1& p1, |
| 871 const P2& p2, const P3& p3) { | 1591 const P2& p2, const P3& p3) { |
| 872 MutantRunner<R, Tuple2<A1, A2> > *t = | 1592 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 873 new Mutant<R, T, R (T::*)(X1, X2, X3, A1, A2), | 1593 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, A1, A2, A3, A4), |
| 874 Tuple3<P1, P2, P3>, Tuple2<A1, A2> > | 1594 Tuple3<P1, P2, P3>, Tuple4<A1, A2, A3, A4> > |
| 875 (obj, method, MakeTuple(p1, p2, p3)); | 1595 (obj, method, MakeTuple(p1, p2, p3)); |
| 876 return MutantFunctor<R, Tuple2<A1, A2> >(t); | 1596 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 877 } | 1597 } |
| 878 | 1598 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 879 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 1599 |
| 880 // 3 - 2 | 1600 #if defined (OS_WIN) |
| 881 template <typename R, typename T, typename P1, typename P2, typename P3, | 1601 template <typename R, typename T, typename U, typename P1, typename P2, |
| 882 typename A1, typename A2, typename X1, typename X2, typename X3> | 1602 typename P3, typename A1, typename A2, typename A3, typename A4, |
| 883 inline MutantFunctor<R, Tuple2<A1, A2> > | 1603 typename X1, typename X2, typename X3> |
| 884 CreateFunctor(T** obj, R (T::*method)(X1, X2, X3, A1, A2), const P1& p1, | 1604 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 885 const P2& p2, const P3& p3) { | 1605 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4), |
| 886 MutantRunner<R, Tuple2<A1, A2> > *t = | 1606 const P1& p1, const P2& p2, const P3& p3) { |
| 887 new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3, A1, A2), | 1607 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 888 Tuple3<P1, P2, P3>, Tuple2<A1, A2> > | 1608 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, A1, A2, A3, A4), |
| 889 (obj, method, MakeTuple(p1, p2, p3)); | 1609 Tuple3<P1, P2, P3>, Tuple4<A1, A2, A3, A4> > |
| 890 return MutantFunctor<R, Tuple2<A1, A2> >(t); | 1610 (obj, method, MakeTuple(p1, p2, p3)); |
| 891 } | 1611 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 892 #endif | 1612 } |
| 893 | 1613 #endif // OS_WIN |
| 894 // 3 - 3 | 1614 |
| 895 template <typename R, typename T, typename P1, typename P2, typename P3, | 1615 // 4 - 0 |
| 1616 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1617 typename P3, typename P4, typename X1, typename X2, typename X3, |
| 1618 typename X4> |
| 1619 inline MutantFunctor<R, Tuple0> |
| 1620 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4), const P1& p1, |
| 1621 const P2& p2, const P3& p3, const P4& p4) { |
| 1622 MutantRunner<R, Tuple0>* t = |
| 1623 new Mutant<R, T, R (U::*)(X1, X2, X3, X4), |
| 1624 Tuple4<P1, P2, P3, P4>, Tuple0> |
| 1625 (obj, method, MakeTuple(p1, p2, p3, p4)); |
| 1626 return MutantFunctor<R, Tuple0>(t); |
| 1627 } |
| 1628 |
| 1629 template <typename R, typename P1, typename P2, typename P3, typename P4, |
| 1630 typename X1, typename X2, typename X3, typename X4> |
| 1631 inline MutantFunctor<R, Tuple0> |
| 1632 CreateFunctor(R (*function)(X1, X2, X3, X4), const P1& p1, const P2& p2, |
| 1633 const P3& p3, const P4& p4) { |
| 1634 MutantRunner<R, Tuple0>* t = |
| 1635 new MutantFunction<R, R (*)(X1, X2, X3, X4), |
| 1636 Tuple4<P1, P2, P3, P4>, Tuple0> |
| 1637 (function, MakeTuple(p1, p2, p3, p4)); |
| 1638 return MutantFunctor<R, Tuple0>(t); |
| 1639 } |
| 1640 |
| 1641 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1642 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1643 typename P3, typename P4, typename X1, typename X2, typename X3, |
| 1644 typename X4> |
| 1645 inline MutantFunctor<R, Tuple0> |
| 1646 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4), const P1& p1, |
| 1647 const P2& p2, const P3& p3, const P4& p4) { |
| 1648 MutantRunner<R, Tuple0>* t = |
| 1649 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4), |
| 1650 Tuple4<P1, P2, P3, P4>, Tuple0> |
| 1651 (obj, method, MakeTuple(p1, p2, p3, p4)); |
| 1652 return MutantFunctor<R, Tuple0>(t); |
| 1653 } |
| 1654 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1655 |
| 1656 #if defined (OS_WIN) |
| 1657 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1658 typename P3, typename P4, typename X1, typename X2, typename X3, |
| 1659 typename X4> |
| 1660 inline MutantFunctor<R, Tuple0> |
| 1661 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4), const P1& p1, |
| 1662 const P2& p2, const P3& p3, const P4& p4) { |
| 1663 MutantRunner<R, Tuple0>* t = |
| 1664 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4), |
| 1665 Tuple4<P1, P2, P3, P4>, Tuple0> |
| 1666 (obj, method, MakeTuple(p1, p2, p3, p4)); |
| 1667 return MutantFunctor<R, Tuple0>(t); |
| 1668 } |
| 1669 #endif // OS_WIN |
| 1670 |
| 1671 // 4 - 1 |
| 1672 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1673 typename P3, typename P4, typename A1, typename X1, typename X2, |
| 1674 typename X3, typename X4> |
| 1675 inline MutantFunctor<R, Tuple1<A1> > |
| 1676 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1), const P1& p1, |
| 1677 const P2& p2, const P3& p3, const P4& p4) { |
| 1678 MutantRunner<R, Tuple1<A1> >* t = |
| 1679 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1), |
| 1680 Tuple4<P1, P2, P3, P4>, Tuple1<A1> > |
| 1681 (obj, method, MakeTuple(p1, p2, p3, p4)); |
| 1682 return MutantFunctor<R, Tuple1<A1> >(t); |
| 1683 } |
| 1684 |
| 1685 template <typename R, typename P1, typename P2, typename P3, typename P4, |
| 1686 typename A1, typename X1, typename X2, typename X3, typename X4> |
| 1687 inline MutantFunctor<R, Tuple1<A1> > |
| 1688 CreateFunctor(R (*function)(X1, X2, X3, X4, A1), const P1& p1, const P2& p2, |
| 1689 const P3& p3, const P4& p4) { |
| 1690 MutantRunner<R, Tuple1<A1> >* t = |
| 1691 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1), |
| 1692 Tuple4<P1, P2, P3, P4>, Tuple1<A1> > |
| 1693 (function, MakeTuple(p1, p2, p3, p4)); |
| 1694 return MutantFunctor<R, Tuple1<A1> >(t); |
| 1695 } |
| 1696 |
| 1697 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1698 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1699 typename P3, typename P4, typename A1, typename X1, typename X2, |
| 1700 typename X3, typename X4> |
| 1701 inline MutantFunctor<R, Tuple1<A1> > |
| 1702 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1), const P1& p1, |
| 1703 const P2& p2, const P3& p3, const P4& p4) { |
| 1704 MutantRunner<R, Tuple1<A1> >* t = |
| 1705 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1), |
| 1706 Tuple4<P1, P2, P3, P4>, Tuple1<A1> > |
| 1707 (obj, method, MakeTuple(p1, p2, p3, p4)); |
| 1708 return MutantFunctor<R, Tuple1<A1> >(t); |
| 1709 } |
| 1710 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1711 |
| 1712 #if defined (OS_WIN) |
| 1713 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1714 typename P3, typename P4, typename A1, typename X1, typename X2, |
| 1715 typename X3, typename X4> |
| 1716 inline MutantFunctor<R, Tuple1<A1> > |
| 1717 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1), |
| 1718 const P1& p1, const P2& p2, const P3& p3, const P4& p4) { |
| 1719 MutantRunner<R, Tuple1<A1> >* t = |
| 1720 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1), |
| 1721 Tuple4<P1, P2, P3, P4>, Tuple1<A1> > |
| 1722 (obj, method, MakeTuple(p1, p2, p3, p4)); |
| 1723 return MutantFunctor<R, Tuple1<A1> >(t); |
| 1724 } |
| 1725 #endif // OS_WIN |
| 1726 |
| 1727 // 4 - 2 |
| 1728 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1729 typename P3, typename P4, typename A1, typename A2, typename X1, |
| 1730 typename X2, typename X3, typename X4> |
| 1731 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 1732 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2), const P1& p1, |
| 1733 const P2& p2, const P3& p3, const P4& p4) { |
| 1734 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 1735 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2), |
| 1736 Tuple4<P1, P2, P3, P4>, Tuple2<A1, A2> > |
| 1737 (obj, method, MakeTuple(p1, p2, p3, p4)); |
| 1738 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 1739 } |
| 1740 |
| 1741 template <typename R, typename P1, typename P2, typename P3, typename P4, |
| 1742 typename A1, typename A2, typename X1, typename X2, typename X3, |
| 1743 typename X4> |
| 1744 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 1745 CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2), const P1& p1, const P2& p2, |
| 1746 const P3& p3, const P4& p4) { |
| 1747 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 1748 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2), |
| 1749 Tuple4<P1, P2, P3, P4>, Tuple2<A1, A2> > |
| 1750 (function, MakeTuple(p1, p2, p3, p4)); |
| 1751 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 1752 } |
| 1753 |
| 1754 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1755 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1756 typename P3, typename P4, typename A1, typename A2, typename X1, |
| 1757 typename X2, typename X3, typename X4> |
| 1758 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 1759 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2), const P1& p1, |
| 1760 const P2& p2, const P3& p3, const P4& p4) { |
| 1761 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 1762 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2), |
| 1763 Tuple4<P1, P2, P3, P4>, Tuple2<A1, A2> > |
| 1764 (obj, method, MakeTuple(p1, p2, p3, p4)); |
| 1765 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 1766 } |
| 1767 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1768 |
| 1769 #if defined (OS_WIN) |
| 1770 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1771 typename P3, typename P4, typename A1, typename A2, typename X1, |
| 1772 typename X2, typename X3, typename X4> |
| 1773 inline MutantFunctor<R, Tuple2<A1, A2> > |
| 1774 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2), |
| 1775 const P1& p1, const P2& p2, const P3& p3, const P4& p4) { |
| 1776 MutantRunner<R, Tuple2<A1, A2> >* t = |
| 1777 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2), |
| 1778 Tuple4<P1, P2, P3, P4>, Tuple2<A1, A2> > |
| 1779 (obj, method, MakeTuple(p1, p2, p3, p4)); |
| 1780 return MutantFunctor<R, Tuple2<A1, A2> >(t); |
| 1781 } |
| 1782 #endif // OS_WIN |
| 1783 |
| 1784 // 4 - 3 |
| 1785 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1786 typename P3, typename P4, typename A1, typename A2, typename A3, |
| 1787 typename X1, typename X2, typename X3, typename X4> |
| 1788 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 1789 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3), const P1& p1, |
| 1790 const P2& p2, const P3& p3, const P4& p4) { |
| 1791 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 1792 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3), |
| 1793 Tuple4<P1, P2, P3, P4>, Tuple3<A1, A2, A3> > |
| 1794 (obj, method, MakeTuple(p1, p2, p3, p4)); |
| 1795 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 1796 } |
| 1797 |
| 1798 template <typename R, typename P1, typename P2, typename P3, typename P4, |
| 896 typename A1, typename A2, typename A3, typename X1, typename X2, | 1799 typename A1, typename A2, typename A3, typename X1, typename X2, |
| 897 typename X3> | 1800 typename X3, typename X4> |
| 898 inline MutantFunctor<R, Tuple3<A1, A2, A3> > | 1801 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 899 CreateFunctor(T* obj, R (T::*method)(X1, X2, X3, A1, A2, A3), const P1& p1, | 1802 CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3), const P1& p1, |
| 900 const P2& p2, const P3& p3) { | 1803 const P2& p2, const P3& p3, const P4& p4) { |
| 901 MutantRunner<R, Tuple3<A1, A2, A3> > *t = | 1804 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 902 new Mutant<R, T, R (T::*)(X1, X2, X3, A1, A2, A3), | 1805 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2, A3), |
| 903 Tuple3<P1, P2, P3>, Tuple3<A1, A2, A3> > | 1806 Tuple4<P1, P2, P3, P4>, Tuple3<A1, A2, A3> > |
| 904 (obj, method, MakeTuple(p1, p2, p3)); | 1807 (function, MakeTuple(p1, p2, p3, p4)); |
| 905 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); | 1808 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 906 } | 1809 } |
| 907 | 1810 |
| 908 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 1811 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 909 // 3 - 3 | 1812 template <typename R, typename T, typename U, typename P1, typename P2, |
| 910 template <typename R, typename T, typename P1, typename P2, typename P3, | 1813 typename P3, typename P4, typename A1, typename A2, typename A3, |
| 911 typename A1, typename A2, typename A3, typename X1, typename X2, | 1814 typename X1, typename X2, typename X3, typename X4> |
| 912 typename X3> | 1815 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 913 inline MutantFunctor<R, Tuple3<A1, A2, A3> > | 1816 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3), const P1& p1, |
| 914 CreateFunctor(T** obj, R (T::*method)(X1, X2, X3, A1, A2, A3), const P1& p1, | 1817 const P2& p2, const P3& p3, const P4& p4) { |
| 915 const P2& p2, const P3& p3) { | 1818 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 916 MutantRunner<R, Tuple3<A1, A2, A3> > *t = | 1819 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3), |
| 917 new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3, A1, A2, A3), | 1820 Tuple4<P1, P2, P3, P4>, Tuple3<A1, A2, A3> > |
| 918 Tuple3<P1, P2, P3>, Tuple3<A1, A2, A3> > | 1821 (obj, method, MakeTuple(p1, p2, p3, p4)); |
| 919 (obj, method, MakeTuple(p1, p2, p3)); | 1822 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 920 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); | 1823 } |
| 921 } | 1824 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 922 #endif | 1825 |
| 923 | 1826 #if defined (OS_WIN) |
| 924 // 3 - 4 | 1827 template <typename R, typename T, typename U, typename P1, typename P2, |
| 925 template <typename R, typename T, typename P1, typename P2, typename P3, | 1828 typename P3, typename P4, typename A1, typename A2, typename A3, |
| 1829 typename X1, typename X2, typename X3, typename X4> |
| 1830 inline MutantFunctor<R, Tuple3<A1, A2, A3> > |
| 1831 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3), |
| 1832 const P1& p1, const P2& p2, const P3& p3, const P4& p4) { |
| 1833 MutantRunner<R, Tuple3<A1, A2, A3> >* t = |
| 1834 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3), |
| 1835 Tuple4<P1, P2, P3, P4>, Tuple3<A1, A2, A3> > |
| 1836 (obj, method, MakeTuple(p1, p2, p3, p4)); |
| 1837 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); |
| 1838 } |
| 1839 #endif // OS_WIN |
| 1840 |
| 1841 // 4 - 4 |
| 1842 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1843 typename P3, typename P4, typename A1, typename A2, typename A3, |
| 1844 typename A4, typename X1, typename X2, typename X3, typename X4> |
| 1845 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 1846 CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4), |
| 1847 const P1& p1, const P2& p2, const P3& p3, const P4& p4) { |
| 1848 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 1849 new Mutant<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4), |
| 1850 Tuple4<P1, P2, P3, P4>, Tuple4<A1, A2, A3, A4> > |
| 1851 (obj, method, MakeTuple(p1, p2, p3, p4)); |
| 1852 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 1853 } |
| 1854 |
| 1855 template <typename R, typename P1, typename P2, typename P3, typename P4, |
| 926 typename A1, typename A2, typename A3, typename A4, typename X1, | 1856 typename A1, typename A2, typename A3, typename A4, typename X1, |
| 927 typename X2, typename X3> | 1857 typename X2, typename X3, typename X4> |
| 928 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > | 1858 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 929 CreateFunctor(T* obj, R (T::*method)(X1, X2, X3, A1, A2, A3, A4), const P1& p1, | 1859 CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3, A4), const P1& p1, |
| 930 const P2& p2, const P3& p3) { | |
| 931 MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = | |
| 932 new Mutant<R, T, R (T::*)(X1, X2, X3, A1, A2, A3, A4), | |
| 933 Tuple3<P1, P2, P3>, Tuple4<A1, A2, A3, A4> > | |
| 934 (obj, method, MakeTuple(p1, p2, p3)); | |
| 935 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); | |
| 936 } | |
| 937 | |
| 938 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | |
| 939 // 3 - 4 | |
| 940 template <typename R, typename T, typename P1, typename P2, typename P3, | |
| 941 typename A1, typename A2, typename A3, typename A4, typename X1, | |
| 942 typename X2, typename X3> | |
| 943 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > | |
| 944 CreateFunctor(T** obj, R (T::*method)(X1, X2, X3, A1, A2, A3, A4), const P1& p1, | |
| 945 const P2& p2, const P3& p3) { | |
| 946 MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = | |
| 947 new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3, A1, A2, A3, A4), | |
| 948 Tuple3<P1, P2, P3>, Tuple4<A1, A2, A3, A4> > | |
| 949 (obj, method, MakeTuple(p1, p2, p3)); | |
| 950 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); | |
| 951 } | |
| 952 #endif | |
| 953 | |
| 954 // 4 - 0 | |
| 955 template <typename R, typename T, typename P1, typename P2, typename P3, | |
| 956 typename P4, typename X1, typename X2, typename X3, typename X4> | |
| 957 inline MutantFunctor<R, Tuple0> | |
| 958 CreateFunctor(T* obj, R (T::*method)(X1, X2, X3, X4), const P1& p1, | |
| 959 const P2& p2, const P3& p3, const P4& p4) { | 1860 const P2& p2, const P3& p3, const P4& p4) { |
| 960 MutantRunner<R, Tuple0> *t = | 1861 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 961 new Mutant<R, T, R (T::*)(X1, X2, X3, X4), | 1862 new MutantFunction<R, R (*)(X1, X2, X3, X4, A1, A2, A3, A4), |
| 962 Tuple4<P1, P2, P3, P4>, Tuple0> | 1863 Tuple4<P1, P2, P3, P4>, Tuple4<A1, A2, A3, A4> > |
| 963 (obj, method, MakeTuple(p1, p2, p3, p4)); | 1864 (function, MakeTuple(p1, p2, p3, p4)); |
| 964 return MutantFunctor<R, Tuple0>(t); | 1865 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 965 } | 1866 } |
| 966 | 1867 |
| 967 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 1868 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 968 // 4 - 0 | 1869 template <typename R, typename T, typename U, typename P1, typename P2, |
| 969 template <typename R, typename T, typename P1, typename P2, typename P3, | 1870 typename P3, typename P4, typename A1, typename A2, typename A3, |
| 970 typename P4, typename X1, typename X2, typename X3, typename X4> | 1871 typename A4, typename X1, typename X2, typename X3, typename X4> |
| 971 inline MutantFunctor<R, Tuple0> | 1872 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 972 CreateFunctor(T** obj, R (T::*method)(X1, X2, X3, X4), const P1& p1, | 1873 CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4), |
| 973 const P2& p2, const P3& p3, const P4& p4) { | |
| 974 MutantRunner<R, Tuple0> *t = | |
| 975 new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3, X4), | |
| 976 Tuple4<P1, P2, P3, P4>, Tuple0> | |
| 977 (obj, method, MakeTuple(p1, p2, p3, p4)); | |
| 978 return MutantFunctor<R, Tuple0>(t); | |
| 979 } | |
| 980 #endif | |
| 981 | |
| 982 // 4 - 1 | |
| 983 template <typename R, typename T, typename P1, typename P2, typename P3, | |
| 984 typename P4, typename A1, typename X1, typename X2, typename X3, | |
| 985 typename X4> | |
| 986 inline MutantFunctor<R, Tuple1<A1> > | |
| 987 CreateFunctor(T* obj, R (T::*method)(X1, X2, X3, X4, A1), const P1& p1, | |
| 988 const P2& p2, const P3& p3, const P4& p4) { | |
| 989 MutantRunner<R, Tuple1<A1> > *t = | |
| 990 new Mutant<R, T, R (T::*)(X1, X2, X3, X4, A1), | |
| 991 Tuple4<P1, P2, P3, P4>, Tuple1<A1> > | |
| 992 (obj, method, MakeTuple(p1, p2, p3, p4)); | |
| 993 return MutantFunctor<R, Tuple1<A1> >(t); | |
| 994 } | |
| 995 | |
| 996 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | |
| 997 // 4 - 1 | |
| 998 template <typename R, typename T, typename P1, typename P2, typename P3, | |
| 999 typename P4, typename A1, typename X1, typename X2, typename X3, | |
| 1000 typename X4> | |
| 1001 inline MutantFunctor<R, Tuple1<A1> > | |
| 1002 CreateFunctor(T** obj, R (T::*method)(X1, X2, X3, X4, A1), const P1& p1, | |
| 1003 const P2& p2, const P3& p3, const P4& p4) { | |
| 1004 MutantRunner<R, Tuple1<A1> > *t = | |
| 1005 new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3, X4, A1), | |
| 1006 Tuple4<P1, P2, P3, P4>, Tuple1<A1> > | |
| 1007 (obj, method, MakeTuple(p1, p2, p3, p4)); | |
| 1008 return MutantFunctor<R, Tuple1<A1> >(t); | |
| 1009 } | |
| 1010 #endif | |
| 1011 | |
| 1012 // 4 - 2 | |
| 1013 template <typename R, typename T, typename P1, typename P2, typename P3, | |
| 1014 typename P4, typename A1, typename A2, typename X1, typename X2, | |
| 1015 typename X3, typename X4> | |
| 1016 inline MutantFunctor<R, Tuple2<A1, A2> > | |
| 1017 CreateFunctor(T* obj, R (T::*method)(X1, X2, X3, X4, A1, A2), const P1& p1, | |
| 1018 const P2& p2, const P3& p3, const P4& p4) { | |
| 1019 MutantRunner<R, Tuple2<A1, A2> > *t = | |
| 1020 new Mutant<R, T, R (T::*)(X1, X2, X3, X4, A1, A2), | |
| 1021 Tuple4<P1, P2, P3, P4>, Tuple2<A1, A2> > | |
| 1022 (obj, method, MakeTuple(p1, p2, p3, p4)); | |
| 1023 return MutantFunctor<R, Tuple2<A1, A2> >(t); | |
| 1024 } | |
| 1025 | |
| 1026 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | |
| 1027 // 4 - 2 | |
| 1028 template <typename R, typename T, typename P1, typename P2, typename P3, | |
| 1029 typename P4, typename A1, typename A2, typename X1, typename X2, | |
| 1030 typename X3, typename X4> | |
| 1031 inline MutantFunctor<R, Tuple2<A1, A2> > | |
| 1032 CreateFunctor(T** obj, R (T::*method)(X1, X2, X3, X4, A1, A2), const P1& p1, | |
| 1033 const P2& p2, const P3& p3, const P4& p4) { | |
| 1034 MutantRunner<R, Tuple2<A1, A2> > *t = | |
| 1035 new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3, X4, A1, A2), | |
| 1036 Tuple4<P1, P2, P3, P4>, Tuple2<A1, A2> > | |
| 1037 (obj, method, MakeTuple(p1, p2, p3, p4)); | |
| 1038 return MutantFunctor<R, Tuple2<A1, A2> >(t); | |
| 1039 } | |
| 1040 #endif | |
| 1041 | |
| 1042 // 4 - 3 | |
| 1043 template <typename R, typename T, typename P1, typename P2, typename P3, | |
| 1044 typename P4, typename A1, typename A2, typename A3, typename X1, | |
| 1045 typename X2, typename X3, typename X4> | |
| 1046 inline MutantFunctor<R, Tuple3<A1, A2, A3> > | |
| 1047 CreateFunctor(T* obj, R (T::*method)(X1, X2, X3, X4, A1, A2, A3), const P1& p1, | |
| 1048 const P2& p2, const P3& p3, const P4& p4) { | |
| 1049 MutantRunner<R, Tuple3<A1, A2, A3> > *t = | |
| 1050 new Mutant<R, T, R (T::*)(X1, X2, X3, X4, A1, A2, A3), | |
| 1051 Tuple4<P1, P2, P3, P4>, Tuple3<A1, A2, A3> > | |
| 1052 (obj, method, MakeTuple(p1, p2, p3, p4)); | |
| 1053 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); | |
| 1054 } | |
| 1055 | |
| 1056 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | |
| 1057 // 4 - 3 | |
| 1058 template <typename R, typename T, typename P1, typename P2, typename P3, | |
| 1059 typename P4, typename A1, typename A2, typename A3, typename X1, | |
| 1060 typename X2, typename X3, typename X4> | |
| 1061 inline MutantFunctor<R, Tuple3<A1, A2, A3> > | |
| 1062 CreateFunctor(T** obj, R (T::*method)(X1, X2, X3, X4, A1, A2, A3), const P1& p1, | |
| 1063 const P2& p2, const P3& p3, const P4& p4) { | |
| 1064 MutantRunner<R, Tuple3<A1, A2, A3> > *t = | |
| 1065 new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3, X4, A1, A2, A3), | |
| 1066 Tuple4<P1, P2, P3, P4>, Tuple3<A1, A2, A3> > | |
| 1067 (obj, method, MakeTuple(p1, p2, p3, p4)); | |
| 1068 return MutantFunctor<R, Tuple3<A1, A2, A3> >(t); | |
| 1069 } | |
| 1070 #endif | |
| 1071 | |
| 1072 // 4 - 4 | |
| 1073 template <typename R, typename T, typename P1, typename P2, typename P3, | |
| 1074 typename P4, typename A1, typename A2, typename A3, typename A4, | |
| 1075 typename X1, typename X2, typename X3, typename X4> | |
| 1076 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > | |
| 1077 CreateFunctor(T* obj, R (T::*method)(X1, X2, X3, X4, A1, A2, A3, A4), | |
| 1078 const P1& p1, const P2& p2, const P3& p3, const P4& p4) { | 1874 const P1& p1, const P2& p2, const P3& p3, const P4& p4) { |
| 1079 MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = | 1875 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 1080 new Mutant<R, T, R (T::*)(X1, X2, X3, X4, A1, A2, A3, A4), | 1876 new MutantLateObjectBind<R, T, R (U::*)(X1, X2, X3, X4, A1, A2, A3, A4), |
| 1877 Tuple4<P1, P2, P3, P4>, Tuple4<A1, A2, A3, A4> > |
| 1878 (obj, method, MakeTuple(p1, p2, p3, p4)); |
| 1879 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 1880 } |
| 1881 #endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 1882 |
| 1883 #if defined (OS_WIN) |
| 1884 template <typename R, typename T, typename U, typename P1, typename P2, |
| 1885 typename P3, typename P4, typename A1, typename A2, typename A3, |
| 1886 typename A4, typename X1, typename X2, typename X3, typename X4> |
| 1887 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > |
| 1888 CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4), |
| 1889 const P1& p1, const P2& p2, const P3& p3, const P4& p4) { |
| 1890 MutantRunner<R, Tuple4<A1, A2, A3, A4> >* t = |
| 1891 new Mutant<R, T, R (__stdcall U::*)(X1, X2, X3, X4, A1, A2, A3, A4), |
| 1081 Tuple4<P1, P2, P3, P4>, Tuple4<A1, A2, A3, A4> > | 1892 Tuple4<P1, P2, P3, P4>, Tuple4<A1, A2, A3, A4> > |
| 1082 (obj, method, MakeTuple(p1, p2, p3, p4)); | 1893 (obj, method, MakeTuple(p1, p2, p3, p4)); |
| 1083 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); | 1894 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); |
| 1084 } | 1895 } |
| 1085 | 1896 #endif // OS_WIN |
| 1086 #ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | |
| 1087 // 4 - 4 | |
| 1088 template <typename R, typename T, typename P1, typename P2, typename P3, | |
| 1089 typename P4, typename A1, typename A2, typename A3, typename A4, | |
| 1090 typename X1, typename X2, typename X3, typename X4> | |
| 1091 inline MutantFunctor<R, Tuple4<A1, A2, A3, A4> > | |
| 1092 CreateFunctor(T** obj, R (T::*method)(X1, X2, X3, X4, A1, A2, A3, A4), | |
| 1093 const P1& p1, const P2& p2, const P3& p3, const P4& p4) { | |
| 1094 MutantRunner<R, Tuple4<A1, A2, A3, A4> > *t = | |
| 1095 new MutantLateObjectBind<R, T, R (T::*)(X1, X2, X3, X4, A1, A2, A3, A4), | |
| 1096 Tuple4<P1, P2, P3, P4>, Tuple4<A1, A2, A3, A4> > | |
| 1097 (obj, method, MakeTuple(p1, p2, p3, p4)); | |
| 1098 return MutantFunctor<R, Tuple4<A1, A2, A3, A4> >(t); | |
| 1099 } | |
| 1100 #endif | |
| 1101 | 1897 |
| 1102 } // namespace testing | 1898 } // namespace testing |
| 1103 | 1899 |
| 1104 #endif // TESTING_GMOCK_MUTANT_H_ | 1900 #endif // TESTING_GMOCK_MUTANT_H_ |
| OLD | NEW |