template <typename R, typename... Args>
class FunctionMocker
Defined at line 1440 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h
Public Methods
void FunctionMocker<R (Args...)> ()
Defined at line 1449 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h
void FunctionMocker<R (Args...)> (const FunctionMocker<R (Args...)> & )
There is no generally useful and implementable semantics of
copying a mock object, so copying a mock is usually a user error.
Thus we disallow copying function mockers. If the user really
wants to copy a mock object, they should implement their own copy
operation, for example:
class MockFoo : public Foo {
public:
// Defines a copy constructor explicitly.
MockFoo(const MockFoo
&
src) {}
...
};
Defined at line 1463 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h
FunctionMocker<R (Args...)> & operator= (const FunctionMocker<R (Args...)> & )
Defined at line 1464 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h
void ~FunctionMocker<R (Args...)> ()
The destructor verifies that all expectations on this mock
function have been satisfied. If not, it will report Google Test
non-fatal failures for the violations.
Defined at line 1469 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h
const OnCallSpec<F> * FindOnCallSpec (const ArgumentTuple & args)
Returns the ON_CALL spec that matches this mock function with the
given arguments; returns NULL if no matching ON_CALL is found.
L = *
Defined at line 1479 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h
Result PerformDefaultAction (ArgumentTuple && args, const std::string & call_description)
Performs the default action of this mock function on the given
arguments and returns the result. Asserts (or throws if
exceptions are enabled) with a helpful call description if there
is no valid return value. This method doesn't depend on the
mutable state of this object, and thus can be called concurrently
without locking.
L = *
Defined at line 1497 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h
void ClearDefaultActionsLocked ()
Implements UntypedFunctionMockerBase::ClearDefaultActionsLocked():
clears the ON_CALL()s set on this mock function.
Defined at line 1519 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h
Result Invoke (Args... args)
Returns the result of invoking this mock function with the given
arguments. This function can be safely called from multiple
threads concurrently.
Defined at line 1547 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h
MockSpec<F> With (Matcher<Args>... m)
Defined at line 1551 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h
Protected Methods
OnCallSpec<F> & AddNewOnCallSpec (const char * file, int line, const ArgumentMatcherTuple & m)
Adds and returns a default action spec for this mock function.
Defined at line 1560 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h
TypedExpectation<F> & AddNewExpectation (const char * file, int line, const std::string & source_text, const ArgumentMatcherTuple & m)
Adds and returns an expectation spec for this mock function.
Defined at line 1570 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h
Friends
template <typename Func>
class TypedExpectation
template <typename Function>
class MockSpec