class UntypedFunctionMockerBase

Defined at line 140 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h

Abstract base class of FunctionMocker. This is the

type-agnostic part of the function mocker interface. Its pure

virtual methods are implemented by FunctionMocker.

Protected Members

const void * mock_obj_
const char * name_
vector untyped_on_call_specs_
vector untyped_expectations_

Public Methods

void UntypedFunctionMockerBase ()
void ~UntypedFunctionMockerBase ()
bool VerifyAndClearExpectationsLocked ()

Verifies that all expectations on this mock function have been

satisfied. Reports one or more Google Test non-fatal failures

and returns false if not.

void ClearDefaultActionsLocked ()

Clears the ON_CALL()s set on this mock function.

void UntypedDescribeUninterestingCall (const void * untyped_args, ::std::ostream * os)

Writes a message that the call is uninteresting (i.e. neither

explicitly expected nor explicitly unexpected) to the given

ostream.

const ExpectationBase * UntypedFindMatchingExpectation (const void * untyped_args, const void ** untyped_action, bool * is_excessive, ::std::ostream * what, ::std::ostream * why)

Returns the expectation that matches the given function arguments

(or NULL is there's no match); when a match is found,

untyped_action is set to point to the action that should be

performed (or NULL if the action is "do default"), and

is_excessive is modified to indicate whether the call exceeds the

expected number.

void UntypedPrintArgs (const void * untyped_args, ::std::ostream * os)

Prints the given function arguments to the ostream.

void RegisterOwner (const void * mock_obj)

Sets the mock object this mock method belongs to, and registers

this information in the global mock registry. Will be called

whenever an EXPECT_CALL() or ON_CALL() is executed on this mock

method.

void SetOwnerAndName (const void * mock_obj, const char * name)

Sets the mock object this mock method belongs to, and sets the

name of the mock function. Will be called upon each invocation

of this mock function.

const void * MockObject ()

Returns the mock object this mock method belongs to. Must be

called after RegisterOwner() or SetOwnerAndName() has been

called.

const char * Name ()

Returns the name of this mock method. Must be called after

SetOwnerAndName() has been called.

Protected Methods

Expectation GetHandleOf (ExpectationBase * exp)

Returns an Expectation object that references and co-owns exp,

which must be an expectation on this mock function.

Records