• Home
  • Raw
  • Download

Lines Matching +full:overloaded +full:- +full:virtual

30 // Google Mock - a framework for writing C++ mock classes.
34 #include "gmock/gmock-spec-builders.h"
43 #include "gmock/internal/gmock-port.h"
44 #include "gtest/gtest-spi.h"
46 #include "gtest/internal/gtest-port.h"
68 // This line verifies that a mock method can take a by-reference
78 // by-reference an argument whose type is incomplete, we can still in TEST()
146 virtual ~CC() {} in ~CC()
147 virtual int Method() = 0;
655 GMOCK_FLAG_SET(default_mock_behavior, -1); in TEST()
683 // Tests that the built-in default action is taken when no ON_CALL()
692 // Tests that the built-in default action is taken when no ON_CALL()
737 // Tests lower-bound violation.
749 " Actual: called once - unsatisfied and active"); in TEST()
809 // It should be possible to return a non-moveable type from a mock action in
813 // Define a non-moveable result type. in TEST()
851 // Tests that the n-th action is taken for the n-th matching
901 " - returning default value.")); in TEST()
905 " - returning default value.")); in TEST()
968 int n = -1; in TEST()
982 // multiple sub-strings instead. in TEST()
985 "Unexpected mock function call - returning directly.\n" in TEST()
993 " Actual: called once - saturated and active"); in TEST()
1002 "Unexpected mock function call - returning directly.\n" in TEST()
1011 " Actual: called once - saturated and active"); in TEST()
1018 " Actual: never called - unsatisfied and active"); in TEST()
1022 // Tests that an unexpected non-void function generates the right
1030 "Unexpected mock function call - returning default value.\n" in TEST()
1039 " Actual: called once - saturated and active"); in TEST()
1067 // unsatisfied pre-requisites doesn't match the call.
1084 // There should be one non-fatal failure. in TEST()
1090 // pre-requisites but not the satisfied one. in TEST()
1097 "(?s)the following immediate pre-requisites are not satisfied:\n" in TEST()
1098 ".*: pre-requisite #0\n" in TEST()
1099 ".*: pre-requisite #1")); in TEST()
1105 "the following immediate pre-requisites are not satisfied:\n" in TEST()
1106 "(.|\n)*: pre-requisite #0\n" in TEST()
1107 "(.|\n)*: pre-requisite #1")); in TEST()
1112 "the following immediate pre-requisites are not satisfied:")); in TEST()
1113 EXPECT_THAT(r.message(), ContainsRegex(": pre-requisite #0")); in TEST()
1114 EXPECT_THAT(r.message(), ContainsRegex(": pre-requisite #1")); in TEST()
1153 int n = -1; in TEST()
1167 "Mock function \"DoA Method\" called more times than expected - " in TEST()
1171 " Actual: called once - over-saturated and active"); in TEST()
1174 // Tests that when a non-void function is called too many times, the
1182 "Mock function called more times than expected - " in TEST()
1187 " Actual: called twice - over-saturated and active"); in TEST()
1731 // after a mock object owning one of their pre-requisites has died.
1748 EXPECT_EQ(1, b1->DoB(1)); in TEST()
1750 // a's pre-requisite has died. in TEST()
1751 EXPECT_TRUE(a->Binary(0, 1)); in TEST()
1754 EXPECT_TRUE(a->Binary(1, 2)); in TEST()
1772 EXPECT_EQ(1, b1->DoB(1)); in TEST()
1773 EXPECT_EQ(2, b2->DoB(2)); in TEST()
1781 // -W4.
1796 a->DoA(42); // This will cause a to be deleted. in TEST()
1802 a->ReturnResult(42); // This will cause a to be deleted. in TEST()
1819 EXPECT_NONFATAL_FAILURE({ b2->DoB(2); }, "Unexpected mock function call"); in TEST()
1820 EXPECT_EQ(1, b1->DoB(1)); in TEST()
1839 EXPECT_NONFATAL_FAILURE(a->Binary(0, 1), "Unexpected mock function call"); in TEST()
1840 EXPECT_NONFATAL_FAILURE(b2->DoB(1), "Unexpected mock function call"); in TEST()
1876 a->DoA(3); in TEST()
1877 a->DoA(1); in TEST()
1878 EXPECT_NONFATAL_FAILURE(a->DoA(2), "Unexpected mock function call"); in TEST()
1930 // --gmock_verbose=warning is specified.
1944 // --gmock_verbose=info is specified.
1957 // We check the stack trace content in dbg-mode only, as opt-mode in TEST()
1964 // Verifies that a non-void mock function's name appears in the in TEST()
1978 // A non-void mock function. in TEST()
1985 "Uninteresting mock function call - returning default value.\n" in TEST()
1998 ContainsRegex("Uninteresting mock function call - returning directly\\.\n" in TEST()
2001 "Printable, 4-byte object <00-00 00-00>\\)")); in TEST()
2005 // Tests how the --gmock_verbose flag affects Google Mock's output.
2019 // We check the stack trace content in dbg-mode only, as opt-mode in VerifyOutput()
2037 // A void-returning function. in TestExpectedCall()
2046 // A non-void-returning function. in TestExpectedCall()
2067 "knowing-when-to-expect for details."; in TestUninterestingCallOnNaggyMock()
2069 // A void-returning function. in TestUninterestingCallOnNaggyMock()
2074 "Uninteresting mock function call - returning directly.\n" in TestUninterestingCallOnNaggyMock()
2079 // A non-void-returning function. in TestUninterestingCallOnNaggyMock()
2084 "Uninteresting mock function call - returning default value.\n" in TestUninterestingCallOnNaggyMock()
2092 // Tests that --gmock_verbose=info causes both expected and
2100 // Tests that --gmock_verbose=warning causes uninteresting calls to be
2108 // Tests that --gmock_verbose=warning causes neither expected nor
2116 // Tests that --gmock_verbose=SOME_INVALID_VALUE has the same effect
2117 // as --gmock_verbose=warning.
2181 a->DoA(0); in TEST()
2194 a->DoA(0); in TEST()
2580 MOCK_METHOD1(Overloaded, int(int));
2581 MOCK_CONST_METHOD1(Overloaded, int(int));
2587 ON_CALL(mock, Overloaded(_)).WillByDefault(Return(7)); in TEST()
2588 ON_CALL(mock, Overloaded(5)).WillByDefault(Return(9)); in TEST()
2589 ON_CALL(Const(mock), Overloaded(5)).WillByDefault(Return(11)); in TEST()
2590 ON_CALL(Const(mock), Overloaded(7)).WillByDefault(Return(13)); in TEST()
2592 EXPECT_THAT(mock.Overloaded(1), 7); in TEST()
2593 EXPECT_THAT(mock.Overloaded(5), 9); in TEST()
2594 EXPECT_THAT(mock.Overloaded(7), 7); in TEST()
2597 EXPECT_THAT(const_mock.Overloaded(1), 0); in TEST()
2598 EXPECT_THAT(const_mock.Overloaded(5), 11); in TEST()
2599 EXPECT_THAT(const_mock.Overloaded(7), 13); in TEST()
2615 // --gmock_catch_leaked_mocks and --gmock_verbose the user specifies.