Home | History | Annotate | Download | only in src

Lines Matching refs:Mock

32 // Google Mock - a framework for writing C++ mock classes.
54 // Protects the mock object registry (in class Mock), all function
265 // Sets the mock object this mock method belongs to, and registers
266 // this information in the global mock registry. Will be called
267 // whenever an EXPECT_CALL() or ON_CALL() is executed on this mock
275 Mock::Register(mock_obj, this);
278 // Sets the mock object this mock method belongs to, and sets the name
279 // of the mock function. Will be called upon each invocation of this
280 // mock function.
284 // We protect name_ under g_gmock_mutex in case this mock function
297 // We protect mock_obj_ under g_gmock_mutex in case this mock
308 // Returns the name of this mock method. Must be called after
314 // We protect name_ under g_gmock_mutex in case this mock
325 // Calculates the result of invoking this mock function with the given
332 // No expectation is set on this mock method - we have an
335 // We must get Google Mock's reaction on uninteresting calls
336 // made on this mock object BEFORE performing the action,
337 // because the action may DELETE the mock object and make the
340 Mock::GetReactionOnUninterestingCalls(MockObject());
437 // which must be an expectation on this mock function.
453 // Verifies that all expectations on this mock function have been
489 // Class Mock.
495 // The current state of a mock object. Such information is needed for
496 // detecting leaked mock objects and explicitly verifying a mock's
503 // invoked on this mock object.
512 // A global registry holding the state of all mock objects that are
513 // alive. A mock object is added to this registry the first time
514 // Mock::AllowLeak(), ON_CALL(), or EXPECT_CALL() is called on it. It
515 // is removed from the registry in the mock object's destructor.
518 // Maps a mock object (identified by its address) to its state.
522 // tests in it have been run. By then, there should be no mock
544 std::cout << " ERROR: this mock object";
555 << " leaked mock " << (leaked_count == 1 ? "object" : "objects")
575 // Maps a mock object to the reaction Google Mock should have when an
579 // Sets the reaction Google Mock should have when an uninteresting
580 // method of the given mock object is called.
590 // Tells Google Mock to allow uninteresting calls on the given mock
593 void Mock::AllowUninterestingCalls(const void* mock_obj) {
597 // Tells Google Mock to warn the user about uninteresting calls on the
598 // given mock object.
600 void Mock::WarnUninterestingCalls(const void* mock_obj) {
604 // Tells Google Mock to fail uninteresting calls on the given mock
607 void Mock::FailUninterestingCalls(const void* mock_obj) {
611 // Tells Google Mock the given mock object is being destroyed and its
614 void Mock::UnregisterCallReaction(const void* mock_obj) {
619 // Returns the reaction Google Mock will have on uninteresting calls
620 // made on the given mock object.
622 internal::CallReaction Mock::GetReactionOnUninterestingCalls(
629 // Tells Google Mock to ignore mock_obj when checking for leaked mock
632 void Mock::AllowLeak(const void* mock_obj) {
637 // Verifies and clears all expectations on the given mock object. If
641 bool Mock::VerifyAndClearExpectations(void* mock_obj) {
646 // Verifies all expectations on the given mock object and clears its
650 bool Mock::VerifyAndClear(void* mock_obj) {
656 // Verifies and clears all expectations on the given mock object. If
660 bool Mock::VerifyAndClearExpectationsLocked(void* mock_obj) {
663 // No EXPECT_CALL() was set on the given mock object.
667 // Verifies and clears the expectations on each mock method in the
668 // given mock object.
684 // Registers a mock object and a mock method it owns.
686 void Mock::Register(const void* mock_obj,
692 // Tells Google Mock where in the source code mock_obj is used in an
696 void Mock::RegisterUseByOnCallOrExpectCall(
715 // Unregisters a mock method; removes the owning mock object from the
716 // registry when the last mock method associated with it has been
720 void Mock::UnregisterLocked(internal::UntypedFunctionMockerBase* mocker) {
736 // Clears all ON_CALL()s set on the given mock object.
738 void Mock::ClearDefaultActionsLocked(void* mock_obj) {
742 // No ON_CALL() was set on the given mock object.
746 // Clears the default actions for each mock method in the given mock