00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071 #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_
00072 #define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_
00073
00074 #include "gmock/gmock-spec-builders.h"
00075 #include "gmock/internal/gmock-port.h"
00076
00077 namespace testing {
00078
00079 template <class MockClass>
00080 class NiceMock : public MockClass {
00081 public:
00082
00083
00084 NiceMock() {
00085 ::testing::Mock::AllowUninterestingCalls(
00086 internal::ImplicitCast_<MockClass*>(this));
00087 }
00088
00089
00090
00091 template <typename A1>
00092 explicit NiceMock(const A1& a1) : MockClass(a1) {
00093 ::testing::Mock::AllowUninterestingCalls(
00094 internal::ImplicitCast_<MockClass*>(this));
00095 }
00096 template <typename A1, typename A2>
00097 NiceMock(const A1& a1, const A2& a2) : MockClass(a1, a2) {
00098 ::testing::Mock::AllowUninterestingCalls(
00099 internal::ImplicitCast_<MockClass*>(this));
00100 }
00101
00102 template <typename A1, typename A2, typename A3>
00103 NiceMock(const A1& a1, const A2& a2, const A3& a3) : MockClass(a1, a2, a3) {
00104 ::testing::Mock::AllowUninterestingCalls(
00105 internal::ImplicitCast_<MockClass*>(this));
00106 }
00107
00108 template <typename A1, typename A2, typename A3, typename A4>
00109 NiceMock(const A1& a1, const A2& a2, const A3& a3,
00110 const A4& a4) : MockClass(a1, a2, a3, a4) {
00111 ::testing::Mock::AllowUninterestingCalls(
00112 internal::ImplicitCast_<MockClass*>(this));
00113 }
00114
00115 template <typename A1, typename A2, typename A3, typename A4, typename A5>
00116 NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
00117 const A5& a5) : MockClass(a1, a2, a3, a4, a5) {
00118 ::testing::Mock::AllowUninterestingCalls(
00119 internal::ImplicitCast_<MockClass*>(this));
00120 }
00121
00122 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00123 typename A6>
00124 NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
00125 const A5& a5, const A6& a6) : MockClass(a1, a2, a3, a4, a5, a6) {
00126 ::testing::Mock::AllowUninterestingCalls(
00127 internal::ImplicitCast_<MockClass*>(this));
00128 }
00129
00130 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00131 typename A6, typename A7>
00132 NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
00133 const A5& a5, const A6& a6, const A7& a7) : MockClass(a1, a2, a3, a4, a5,
00134 a6, a7) {
00135 ::testing::Mock::AllowUninterestingCalls(
00136 internal::ImplicitCast_<MockClass*>(this));
00137 }
00138
00139 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00140 typename A6, typename A7, typename A8>
00141 NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
00142 const A5& a5, const A6& a6, const A7& a7, const A8& a8) : MockClass(a1,
00143 a2, a3, a4, a5, a6, a7, a8) {
00144 ::testing::Mock::AllowUninterestingCalls(
00145 internal::ImplicitCast_<MockClass*>(this));
00146 }
00147
00148 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00149 typename A6, typename A7, typename A8, typename A9>
00150 NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
00151 const A5& a5, const A6& a6, const A7& a7, const A8& a8,
00152 const A9& a9) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9) {
00153 ::testing::Mock::AllowUninterestingCalls(
00154 internal::ImplicitCast_<MockClass*>(this));
00155 }
00156
00157 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00158 typename A6, typename A7, typename A8, typename A9, typename A10>
00159 NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
00160 const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9,
00161 const A10& a10) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) {
00162 ::testing::Mock::AllowUninterestingCalls(
00163 internal::ImplicitCast_<MockClass*>(this));
00164 }
00165
00166 virtual ~NiceMock() {
00167 ::testing::Mock::UnregisterCallReaction(
00168 internal::ImplicitCast_<MockClass*>(this));
00169 }
00170
00171 private:
00172 GTEST_DISALLOW_COPY_AND_ASSIGN_(NiceMock);
00173 };
00174
00175 template <class MockClass>
00176 class NaggyMock : public MockClass {
00177 public:
00178
00179
00180 NaggyMock() {
00181 ::testing::Mock::WarnUninterestingCalls(
00182 internal::ImplicitCast_<MockClass*>(this));
00183 }
00184
00185
00186
00187 template <typename A1>
00188 explicit NaggyMock(const A1& a1) : MockClass(a1) {
00189 ::testing::Mock::WarnUninterestingCalls(
00190 internal::ImplicitCast_<MockClass*>(this));
00191 }
00192 template <typename A1, typename A2>
00193 NaggyMock(const A1& a1, const A2& a2) : MockClass(a1, a2) {
00194 ::testing::Mock::WarnUninterestingCalls(
00195 internal::ImplicitCast_<MockClass*>(this));
00196 }
00197
00198 template <typename A1, typename A2, typename A3>
00199 NaggyMock(const A1& a1, const A2& a2, const A3& a3) : MockClass(a1, a2, a3) {
00200 ::testing::Mock::WarnUninterestingCalls(
00201 internal::ImplicitCast_<MockClass*>(this));
00202 }
00203
00204 template <typename A1, typename A2, typename A3, typename A4>
00205 NaggyMock(const A1& a1, const A2& a2, const A3& a3,
00206 const A4& a4) : MockClass(a1, a2, a3, a4) {
00207 ::testing::Mock::WarnUninterestingCalls(
00208 internal::ImplicitCast_<MockClass*>(this));
00209 }
00210
00211 template <typename A1, typename A2, typename A3, typename A4, typename A5>
00212 NaggyMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
00213 const A5& a5) : MockClass(a1, a2, a3, a4, a5) {
00214 ::testing::Mock::WarnUninterestingCalls(
00215 internal::ImplicitCast_<MockClass*>(this));
00216 }
00217
00218 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00219 typename A6>
00220 NaggyMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
00221 const A5& a5, const A6& a6) : MockClass(a1, a2, a3, a4, a5, a6) {
00222 ::testing::Mock::WarnUninterestingCalls(
00223 internal::ImplicitCast_<MockClass*>(this));
00224 }
00225
00226 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00227 typename A6, typename A7>
00228 NaggyMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
00229 const A5& a5, const A6& a6, const A7& a7) : MockClass(a1, a2, a3, a4, a5,
00230 a6, a7) {
00231 ::testing::Mock::WarnUninterestingCalls(
00232 internal::ImplicitCast_<MockClass*>(this));
00233 }
00234
00235 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00236 typename A6, typename A7, typename A8>
00237 NaggyMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
00238 const A5& a5, const A6& a6, const A7& a7, const A8& a8) : MockClass(a1,
00239 a2, a3, a4, a5, a6, a7, a8) {
00240 ::testing::Mock::WarnUninterestingCalls(
00241 internal::ImplicitCast_<MockClass*>(this));
00242 }
00243
00244 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00245 typename A6, typename A7, typename A8, typename A9>
00246 NaggyMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
00247 const A5& a5, const A6& a6, const A7& a7, const A8& a8,
00248 const A9& a9) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9) {
00249 ::testing::Mock::WarnUninterestingCalls(
00250 internal::ImplicitCast_<MockClass*>(this));
00251 }
00252
00253 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00254 typename A6, typename A7, typename A8, typename A9, typename A10>
00255 NaggyMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
00256 const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9,
00257 const A10& a10) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) {
00258 ::testing::Mock::WarnUninterestingCalls(
00259 internal::ImplicitCast_<MockClass*>(this));
00260 }
00261
00262 virtual ~NaggyMock() {
00263 ::testing::Mock::UnregisterCallReaction(
00264 internal::ImplicitCast_<MockClass*>(this));
00265 }
00266
00267 private:
00268 GTEST_DISALLOW_COPY_AND_ASSIGN_(NaggyMock);
00269 };
00270
00271 template <class MockClass>
00272 class StrictMock : public MockClass {
00273 public:
00274
00275
00276 StrictMock() {
00277 ::testing::Mock::FailUninterestingCalls(
00278 internal::ImplicitCast_<MockClass*>(this));
00279 }
00280
00281
00282
00283 template <typename A1>
00284 explicit StrictMock(const A1& a1) : MockClass(a1) {
00285 ::testing::Mock::FailUninterestingCalls(
00286 internal::ImplicitCast_<MockClass*>(this));
00287 }
00288 template <typename A1, typename A2>
00289 StrictMock(const A1& a1, const A2& a2) : MockClass(a1, a2) {
00290 ::testing::Mock::FailUninterestingCalls(
00291 internal::ImplicitCast_<MockClass*>(this));
00292 }
00293
00294 template <typename A1, typename A2, typename A3>
00295 StrictMock(const A1& a1, const A2& a2, const A3& a3) : MockClass(a1, a2, a3) {
00296 ::testing::Mock::FailUninterestingCalls(
00297 internal::ImplicitCast_<MockClass*>(this));
00298 }
00299
00300 template <typename A1, typename A2, typename A3, typename A4>
00301 StrictMock(const A1& a1, const A2& a2, const A3& a3,
00302 const A4& a4) : MockClass(a1, a2, a3, a4) {
00303 ::testing::Mock::FailUninterestingCalls(
00304 internal::ImplicitCast_<MockClass*>(this));
00305 }
00306
00307 template <typename A1, typename A2, typename A3, typename A4, typename A5>
00308 StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
00309 const A5& a5) : MockClass(a1, a2, a3, a4, a5) {
00310 ::testing::Mock::FailUninterestingCalls(
00311 internal::ImplicitCast_<MockClass*>(this));
00312 }
00313
00314 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00315 typename A6>
00316 StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
00317 const A5& a5, const A6& a6) : MockClass(a1, a2, a3, a4, a5, a6) {
00318 ::testing::Mock::FailUninterestingCalls(
00319 internal::ImplicitCast_<MockClass*>(this));
00320 }
00321
00322 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00323 typename A6, typename A7>
00324 StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
00325 const A5& a5, const A6& a6, const A7& a7) : MockClass(a1, a2, a3, a4, a5,
00326 a6, a7) {
00327 ::testing::Mock::FailUninterestingCalls(
00328 internal::ImplicitCast_<MockClass*>(this));
00329 }
00330
00331 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00332 typename A6, typename A7, typename A8>
00333 StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
00334 const A5& a5, const A6& a6, const A7& a7, const A8& a8) : MockClass(a1,
00335 a2, a3, a4, a5, a6, a7, a8) {
00336 ::testing::Mock::FailUninterestingCalls(
00337 internal::ImplicitCast_<MockClass*>(this));
00338 }
00339
00340 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00341 typename A6, typename A7, typename A8, typename A9>
00342 StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
00343 const A5& a5, const A6& a6, const A7& a7, const A8& a8,
00344 const A9& a9) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9) {
00345 ::testing::Mock::FailUninterestingCalls(
00346 internal::ImplicitCast_<MockClass*>(this));
00347 }
00348
00349 template <typename A1, typename A2, typename A3, typename A4, typename A5,
00350 typename A6, typename A7, typename A8, typename A9, typename A10>
00351 StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
00352 const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9,
00353 const A10& a10) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) {
00354 ::testing::Mock::FailUninterestingCalls(
00355 internal::ImplicitCast_<MockClass*>(this));
00356 }
00357
00358 virtual ~StrictMock() {
00359 ::testing::Mock::UnregisterCallReaction(
00360 internal::ImplicitCast_<MockClass*>(this));
00361 }
00362
00363 private:
00364 GTEST_DISALLOW_COPY_AND_ASSIGN_(StrictMock);
00365 };
00366
00367
00368
00369
00370
00371
00372
00373
00374 template <typename MockClass>
00375 class NiceMock<NiceMock<MockClass> >;
00376 template <typename MockClass>
00377 class NiceMock<NaggyMock<MockClass> >;
00378 template <typename MockClass>
00379 class NiceMock<StrictMock<MockClass> >;
00380
00381 template <typename MockClass>
00382 class NaggyMock<NiceMock<MockClass> >;
00383 template <typename MockClass>
00384 class NaggyMock<NaggyMock<MockClass> >;
00385 template <typename MockClass>
00386 class NaggyMock<StrictMock<MockClass> >;
00387
00388 template <typename MockClass>
00389 class StrictMock<NiceMock<MockClass> >;
00390 template <typename MockClass>
00391 class StrictMock<NaggyMock<MockClass> >;
00392 template <typename MockClass>
00393 class StrictMock<StrictMock<MockClass> >;
00394
00395 }
00396
00397 #endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_