Home | History | Annotate | Download | only in test

Lines Matching refs:Mock

32 // Google Mock - a framework for writing C++ mock classes.
87 using testing::Mock;
110 // This line verifies that a mock method can take a by-reference
115 // Tells Google Mock how to print a value of type Incomplete.
119 // Even though this mock class contains a mock method that takes
121 // use the mock, as long as Google Mock knows how to print the
129 // be visible where the mock is used.
161 // redefining a mock method name. This could happen, for example, when
213 // by Google Mock.
273 // promised by Google Mock.
553 // Tests that Google Mock doesn't print a warning when the number of
589 // Tests that Google Mock warns on having too many actions in an
655 // Tests that Google Mock warns on having too few actions in an
932 "Unexpected mock function call");
942 "Unexpected mock function call");
958 "Unexpected mock function call - returning directly.\n"
960 "Google Mock tried the following 1 expectation, but it didn't match:");
975 "Unexpected mock function call - returning directly.\n"
977 "Google Mock tried the following 2 expectations, but none matched:");
1003 "Unexpected mock function call - returning default value.\n"
1006 "Google Mock tried the following 1 expectation, but it didn't match:");
1015 // Tests that Google Mock explains that an retired expectation doesn't
1029 // Tests that Google Mock explains that an expectation that doesn't
1042 // Tests that Google Mock explains that an expectation with
1103 // while Google Mock logs to stdout.
1119 "Mock function called more times than expected");
1129 "Mock function called more times than expected");
1141 "Mock function called more times than expected - returning directly.\n"
1155 "Mock function called more times than expected - "
1176 }, "Unexpected mock function call");
1199 }, "Unexpected mock function call");
1217 }, "Unexpected mock function call");
1660 // Tests that Google Mock correctly handles calls to mock functions
1661 // after a mock object owning one of their pre-requisites has died.
1715 // Tests that it's OK to delete a mock object itself in its action.
1763 }, "Unexpected mock function call");
1787 "Unexpected mock function call");
1789 "Unexpected mock function call");
1832 EXPECT_NONFATAL_FAILURE(a->DoA(2), "Unexpected mock function call");
1836 // The following tests verify the message generated when a mock
1884 // Tests that an uninteresting mock function call generates a warning
1899 // Verifies that a void mock function's name appears in the stack
1903 // Verifies that a non-void mock function's name appears in the
1913 // Tests that an uninteresting mock function call causes the function
1916 // A non-void mock function.
1923 "Uninteresting mock function call - returning default value.\n"
1928 // A void mock function.
1935 "Uninteresting mock function call - returning directly\\.\n"
1942 // Tests how the --gmock_verbose flag affects Google Mock's output.
1946 // Verifies that the given Google Mock output is correct. (When
1981 "Mock function call matches EXPECT_CALL(a, DoA(5))...\n"
1992 "Mock function call matches EXPECT_CALL(a, Binary(_, 1))...\n"
2010 "Uninteresting mock function call - returning directly.\n"
2022 "Uninteresting mock function call - returning default value.\n"
2065 // ensure that Google Mock doesn't print a value (even to an internal
2070 ADD_FAILURE() << "Google Mock is printing a value that shouldn't be "
2110 // Tests Mock::AllowLeak().
2114 Mock::AllowLeak(a);
2119 Mock::AllowLeak(a);
2127 Mock::AllowLeak(a);
2132 Mock::AllowLeak(a);
2140 Mock::AllowLeak(a);
2147 Mock::AllowLeak(a);
2150 // Tests that we can verify and clear a mock object's expectations
2154 ASSERT_TRUE(Mock::VerifyAndClearExpectations(&b));
2162 // Tests that we can verify and clear a mock object's expectations
2170 ASSERT_TRUE(Mock::VerifyAndClearExpectations(&b));
2178 // Tests that we can verify and clear a mock object's expectations
2186 EXPECT_NONFATAL_FAILURE(result = Mock::VerifyAndClearExpectations(&b),
2196 // Tests that we can verify and clear a mock object's expectations
2206 ASSERT_TRUE(Mock::VerifyAndClearExpectations(&b));
2214 // Tests that we can verify and clear a mock object's expectations
2224 EXPECT_NONFATAL_FAILURE(result = Mock::VerifyAndClearExpectations(&b),
2235 // mock object multiple times.
2240 Mock::VerifyAndClearExpectations(&b);
2245 Mock::VerifyAndClearExpectations(&b);
2246 Mock::VerifyAndClearExpectations(&b);
2254 // Tests that we can clear a mock object's default actions when none
2259 Mock::VerifyAndClear(&b);
2263 // Tests that we can clear a mock object's default actions when some,
2270 Mock::VerifyAndClear(&b);
2276 // Tests that we can clear a mock object's default actions when all of
2285 Mock::VerifyAndClear(&b);
2294 // Tests that we can clear a mock object's default actions when a
2303 Mock::VerifyAndClear(&b);
2311 // Tests that we can call VerifyAndClear() on a mock object multiple
2317 Mock::VerifyAndClear(&b);
2318 Mock::VerifyAndClear(&b);
2322 Mock::VerifyAndClear(&b);
2338 ASSERT_TRUE(Mock::VerifyAndClear(&b));
2356 EXPECT_NONFATAL_FAILURE(result = Mock::VerifyAndClear(&b),
2367 // expectations are set on a const mock object.
2379 ASSERT_TRUE(Mock::VerifyAndClear(&b));
2387 // Tests that we can set default actions and expectations on a mock
2397 Mock::VerifyAndClear(&b);
2408 // Tests that calling VerifyAndClear() on one mock object does not
2409 // affect other mock objects (either of the same type or not).
2431 Mock::VerifyAndClear(&b2);
2442 // Tests that a mock function's action can call a mock function