60#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_
61#define GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_
69#if GTEST_HAS_EXCEPTIONS
78#include "gtest/gtest.h"
102class ExpectationTester;
151 const
void* untyped_args,
152 const
string& call_description) const = 0;
158 const
void* untyped_action,
159 const
void* untyped_args) const = 0;
165 const
void* untyped_args,
166 ::
std::ostream* os) const
176 const
void* untyped_args,
177 const
void** untyped_action,
bool* is_excessive,
178 ::
std::ostream* what, ::
std::ostream* why)
183 ::
std::ostream* os) const = 0;
215 const
void* untyped_args)
307 ".With() cannot appear "
308 "more than once in an ON_CALL().");
318 ".WillByDefault() must appear "
319 "exactly once in an ON_CALL().");
323 "DoDefault() cannot be used in ON_CALL().");
330 return TupleMatches(matchers_, args) && extra_matcher_.Matches(args);
336 ".WillByDefault() must appear exactly "
337 "once in an ON_CALL().");
377 static void AllowLeak(
const void* mock_obj)
383 static bool VerifyAndClearExpectations(
void* mock_obj)
389 static bool VerifyAndClear(
void* mock_obj)
397 template <
typename F>
400 template <
typename M>
403 template <
typename M>
406 template <
typename M>
411 static void AllowUninterestingCalls(
const void* mock_obj)
416 static void WarnUninterestingCalls(
const void* mock_obj)
421 static void FailUninterestingCalls(
const void* mock_obj)
426 static void UnregisterCallReaction(
const void* mock_obj)
432 const void* mock_obj)
438 static bool VerifyAndClearExpectationsLocked(
void* mock_obj)
442 static void ClearDefaultActionsLocked(
void* mock_obj)
446 static void Register(
447 const void* mock_obj,
454 static void RegisterUseByOnCallOrExpectCall(
455 const void* mock_obj,
const char* file,
int line)
510 return expectation_base_ == rhs.expectation_base_;
518 friend class ::testing::internal::ExpectationBase;
519 friend class ::testing::internal::UntypedFunctionMockerBase;
521 template <
typename F>
522 friend class ::testing::internal::FunctionMockerBase;
524 template <
typename F>
525 friend class ::testing::internal::TypedExpectation;
531 return lhs.expectation_base_.get() < rhs.expectation_base_.get();
535 typedef ::std::set<Expectation, Less> Set;
542 expectation_base()
const {
543 return expectation_base_;
547 internal::linked_ptr<internal::ExpectationBase> expectation_base_;
594 return expectations_ == rhs.expectations_;
602 expectations_.insert(e);
606 int size()
const {
return static_cast<int>(expectations_.size()); }
612 Expectation::Set expectations_;
665 bool sequence_created_;
674GTEST_API_ extern ThreadLocal<Sequence*> g_gmock_implicit_sequence;
719 friend class ::testing::Expectation;
774 g_gmock_mutex.AssertHeld();
781 g_gmock_mutex.AssertHeld();
788 g_gmock_mutex.AssertHeld();
795 g_gmock_mutex.AssertHeld();
802 g_gmock_mutex.AssertHeld();
817 g_gmock_mutex.AssertHeld();
824 g_gmock_mutex.AssertHeld();
884 const char* a_file,
int a_line,
const string& a_source_text,
902 delete static_cast<const Action<F>*
>(*it);
910 ".With() cannot appear "
911 "more than once in an EXPECT_CALL().");
914 ".With() must be the first "
915 "clause in an EXPECT_CALL().");
938 ".InSequence() cannot appear after .After(),"
939 " .WillOnce(), .WillRepeatedly(), or "
940 ".RetiresOnSaturation().");
960 return InSequence(s1, s2, s3, s4).InSequence(s5);
966 ".After() cannot appear after .WillOnce(),"
967 " .WillRepeatedly(), or "
968 ".RetiresOnSaturation().");
977 return After(s1).After(s2);
981 return After(s1, s2).After(s3);
985 return After(s1, s2, s3).After(s4);
990 return After(s1, s2, s3, s4).After(s5);
996 ".WillOnce() cannot appear after "
997 ".WillRepeatedly() or .RetiresOnSaturation().");
1011 ".WillRepeatedly() cannot appear "
1012 "more than once in an EXPECT_CALL().");
1015 ".WillRepeatedly() cannot appear "
1016 "after .RetiresOnSaturation().");
1021 repeated_action_ =
action;
1035 ".RetiresOnSaturation() cannot appear "
1054 return extra_matcher_;
1064 *os <<
" Expected args: ";
1065 extra_matcher_.DescribeTo(os);
1071 template <
typename Function>
1077 return owner_->GetHandleOf(
this);
1087 g_gmock_mutex.AssertHeld();
1088 return TupleMatches(matchers_, args) && extra_matcher_.Matches(args);
1092 bool ShouldHandleArguments(
const ArgumentTuple& args)
const
1094 g_gmock_mutex.AssertHeld();
1100 CheckActionCountIfNotDone();
1101 return !is_retired() && AllPrerequisitesAreSatisfied() &&
Matches(args);
1106 void ExplainMatchResultTo(
1107 const ArgumentTuple& args,
1108 ::std::ostream* os)
const
1110 g_gmock_mutex.AssertHeld();
1113 *os <<
" Expected: the expectation is active\n"
1114 <<
" Actual: it is retired\n";
1119 StringMatchResultListener listener;
1120 if (!extra_matcher_.MatchAndExplain(args, &listener)) {
1121 *os <<
" Expected args: ";
1122 extra_matcher_.DescribeTo(os);
1123 *os <<
"\n Actual: don't match";
1125 internal::PrintIfNotEmpty(listener.str(), os);
1128 }
else if (!AllPrerequisitesAreSatisfied()) {
1129 *os <<
" Expected: all pre-requisites are satisfied\n"
1130 <<
" Actual: the following immediate pre-requisites "
1131 <<
"are not satisfied:\n";
1132 ExpectationSet unsatisfied_prereqs;
1133 FindUnsatisfiedPrerequisites(&unsatisfied_prereqs);
1135 for (ExpectationSet::const_iterator it = unsatisfied_prereqs.begin();
1136 it != unsatisfied_prereqs.end(); ++it) {
1137 it->expectation_base()->DescribeLocationTo(os);
1138 *os <<
"pre-requisite #" << i++ <<
"\n";
1140 *os <<
" (end of pre-requisites)\n";
1146 *os <<
"The call matches the expectation.\n";
1151 const Action<F>& GetCurrentAction(
1152 const FunctionMockerBase<F>* mocker,
1153 const ArgumentTuple& args)
const
1155 g_gmock_mutex.AssertHeld();
1156 const int count = call_count();
1157 Assert(count >= 1, __FILE__, __LINE__,
1158 "call_count() is <= 0 when GetCurrentAction() is "
1159 "called - this should never happen.");
1161 const int action_count =
static_cast<int>(untyped_actions_.size());
1162 if (action_count > 0 && !repeated_action_specified_ &&
1163 count > action_count) {
1166 ::std::stringstream ss;
1167 DescribeLocationTo(&ss);
1168 ss <<
"Actions ran out in " << source_text() <<
"...\n"
1169 <<
"Called " <<
count <<
" times, but only "
1170 << action_count <<
" WillOnce()"
1171 << (action_count == 1 ?
" is" :
"s are") <<
" specified - ";
1172 mocker->DescribeDefaultActionTo(args, &ss);
1173 Log(kWarning, ss.str(), 1);
1176 return count <= action_count ?
1177 *
static_cast<const Action<F>*
>(untyped_actions_[
count - 1]) :
1188 const Action<F>* GetActionForArguments(
1189 const FunctionMockerBase<F>* mocker,
1190 const ArgumentTuple& args,
1191 ::std::ostream* what,
1192 ::std::ostream* why)
1194 g_gmock_mutex.AssertHeld();
1195 if (IsSaturated()) {
1197 IncrementCallCount();
1198 *what <<
"Mock function called more times than expected - ";
1199 mocker->DescribeDefaultActionTo(args, what);
1200 DescribeCallCountTo(why);
1208 IncrementCallCount();
1209 RetireAllPreRequisites();
1211 if (retires_on_saturation_ && IsSaturated()) {
1216 *what <<
"Mock function call matches " << source_text() <<
"...\n";
1217 return &(GetCurrentAction(mocker, args));
1222 FunctionMockerBase<F>*
const owner_;
1223 ArgumentMatcherTuple matchers_;
1224 Matcher<const ArgumentTuple&> extra_matcher_;
1225 Action<F> repeated_action_;
1242 const char* file,
int line,
1245template <
typename F>
1255 : function_mocker_(function_mocker) {}
1260 const char* file,
int line,
const char* obj,
const char* call) {
1262 string(
"ON_CALL(") + obj +
", " + call +
") invoked");
1263 return function_mocker_->AddNewOnCallSpec(file, line, matchers_);
1269 const char* file,
int line,
const char* obj,
const char* call) {
1270 const string source_text(
string(
"EXPECT_CALL(") + obj +
", " + call +
")");
1272 return function_mocker_->AddNewExpectation(
1273 file, line, source_text, matchers_);
1277 template <
typename Function>
1281 matchers_ = matchers;
1301template <
typename T>
1312 T Unwrap() { return ::testing::internal::move(value_); }
1328template <
typename T>
1335 : value_ptr_(&ref) {}
1337 const T&
Peek()
const {
return *value_ptr_; }
1349# pragma warning(push)
1350# pragma warning(disable:4355)
1371template <
typename T>
1376 return result_.Unwrap();
1381 *os <<
"\n Returns: ";
1388 template <
typename F>
1392 const string& call_description) {
1393 return new ActionResultHolder(Wrapper(
1399 template <
typename F>
1403 return new ActionResultHolder(Wrapper(
action.Perform(args)));
1428 template <
typename F>
1432 const string& call_description) {
1434 return new ActionResultHolder;
1439 template <
typename F>
1444 return new ActionResultHolder;
1455template <
typename F>
1471 Mock::UnregisterLocked(
this);
1480 for (UntypedOnCallSpecs::const_reverse_iterator it
1499 const string& call_description)
const {
1505 const string message = call_description +
1506 "\n The mock function has no default action "
1507 "set, and its return type has no default value set.";
1508#if GTEST_HAS_EXCEPTIONS
1510 throw std::runtime_error(
message);
1524 const void* untyped_args,
1525 const string& call_description)
const {
1536 const void* untyped_action,
const void* untyped_args)
const {
1549 g_gmock_mutex.AssertHeld();
1561 g_gmock_mutex.Unlock();
1562 for (UntypedOnCallSpecs::const_iterator it =
1563 specs_to_delete.begin();
1564 it != specs_to_delete.end(); ++it) {
1565 delete static_cast<const OnCallSpec<F>*>(*it);
1570 g_gmock_mutex.Lock();
1574 template <
typename Function>
1586 return holder->Unwrap();
1591 const char* file,
int line,
1594 Mock::RegisterUseByOnCallOrExpectCall(
MockObject(), file, line);
1597 return *on_call_spec;
1604 const string& source_text,
1607 Mock::RegisterUseByOnCallOrExpectCall(
MockObject(), file, line);
1615 if (implicit_sequence != NULL) {
1619 return *expectation;
1635 ::std::ostream* os)
const {
1640 "returning directly.\n" :
1641 "returning default value.\n");
1643 *os <<
"taking default action specified at:\n"
1651 virtual void UntypedDescribeUninterestingCall(
1652 const void* untyped_args,
1653 ::std::ostream* os)
const
1655 const ArgumentTuple& args =
1656 *
static_cast<const ArgumentTuple*
>(untyped_args);
1657 *os <<
"Uninteresting mock function call - ";
1658 DescribeDefaultActionTo(args, os);
1659 *os <<
" Function call: " << Name();
1660 UniversalPrint(args, os);
1679 virtual const ExpectationBase* UntypedFindMatchingExpectation(
1680 const void* untyped_args,
1681 const void** untyped_action,
bool* is_excessive,
1682 ::std::ostream* what, ::std::ostream* why)
1684 const ArgumentTuple& args =
1685 *
static_cast<const ArgumentTuple*
>(untyped_args);
1687 TypedExpectation<F>* exp = this->FindMatchingExpectationLocked(args);
1689 this->FormatUnexpectedCallMessageLocked(args, what, why);
1696 *is_excessive = exp->IsSaturated();
1697 const Action<F>* action = exp->GetActionForArguments(
this, args, what, why);
1698 if (action != NULL && action->IsDoDefault())
1700 *untyped_action = action;
1705 virtual void UntypedPrintArgs(
const void* untyped_args,
1706 ::std::ostream* os)
const {
1707 const ArgumentTuple& args =
1708 *
static_cast<const ArgumentTuple*
>(untyped_args);
1714 TypedExpectation<F>* FindMatchingExpectationLocked(
1715 const ArgumentTuple& args)
const
1717 g_gmock_mutex.AssertHeld();
1718 for (
typename UntypedExpectations::const_reverse_iterator it =
1719 untyped_expectations_.rbegin();
1720 it != untyped_expectations_.rend(); ++it) {
1721 TypedExpectation<F>*
const exp =
1722 static_cast<TypedExpectation<F>*
>(it->get());
1723 if (exp->ShouldHandleArguments(args)) {
1731 void FormatUnexpectedCallMessageLocked(
1732 const ArgumentTuple& args,
1734 ::std::ostream* why)
const
1736 g_gmock_mutex.AssertHeld();
1737 *os <<
"\nUnexpected mock function call - ";
1738 DescribeDefaultActionTo(args, os);
1739 PrintTriedExpectationsLocked(args, why);
1744 void PrintTriedExpectationsLocked(
1745 const ArgumentTuple& args,
1746 ::std::ostream* why)
const
1748 g_gmock_mutex.AssertHeld();
1749 const int count =
static_cast<int>(untyped_expectations_.size());
1750 *why <<
"Google Mock tried the following " <<
count <<
" "
1751 << (
count == 1 ?
"expectation, but it didn't match" :
1752 "expectations, but none matched")
1754 for (
int i = 0; i <
count; i++) {
1755 TypedExpectation<F>*
const expectation =
1756 static_cast<TypedExpectation<F>*
>(untyped_expectations_[i].get());
1758 expectation->DescribeLocationTo(why);
1760 *why <<
"tried expectation #" << i <<
": ";
1762 *why << expectation->source_text() <<
"...\n";
1763 expectation->ExplainMatchResultTo(args, why);
1764 expectation->DescribeCallCountTo(why);
1770 MockSpec<F> current_spec_;
1788# pragma warning(pop)
1825template <
typename T>
1830 : expectation_base_(exp.GetHandle().expectation_base()) {}
1838#define GMOCK_ON_CALL_IMPL_(obj, call) \
1839 ((obj).gmock_##call).InternalDefaultActionSetAt(__FILE__, __LINE__, \
1841#define ON_CALL(obj, call) GMOCK_ON_CALL_IMPL_(obj, call)
1843#define GMOCK_EXPECT_CALL_IMPL_(obj, call) \
1844 ((obj).gmock_##call).InternalExpectedAt(__FILE__, __LINE__, #obj, #call)
1845#define EXPECT_CALL(obj, call) GMOCK_EXPECT_CALL_IMPL_(obj, call)
bool operator==(const Expectation &rhs) const
bool operator!=(const Expectation &rhs) const
friend class ExpectationSet
bool operator==(const ExpectationSet &rhs) const
ExpectationSet(internal::ExpectationBase &exp)
ExpectationSet(const Expectation &e)
ExpectationSet & operator+=(const Expectation &e)
Expectation::Set::value_type value_type
const_iterator end() const
Expectation::Set::const_iterator const_iterator
const_iterator begin() const
bool operator!=(const ExpectationSet &rhs) const
void AddExpectation(const Expectation &expectation) const
static ActionResultHolder * PerformAction(const Action< F > &action, const typename Function< F >::ArgumentTuple &args)
virtual void PrintAsActionResult(::std::ostream *) const
static ActionResultHolder * PerformDefaultAction(const FunctionMockerBase< F > *func_mocker, const typename Function< F >::ArgumentTuple &args, const string &call_description)
static ActionResultHolder * PerformAction(const Action< F > &action, const typename Function< F >::ArgumentTuple &args)
virtual void PrintAsActionResult(::std::ostream *os) const
static ActionResultHolder * PerformDefaultAction(const FunctionMockerBase< F > *func_mocker, const typename Function< F >::ArgumentTuple &args, const string &call_description)
void UntypedTimes(const Cardinality &a_cardinality)
bool IsOverSaturated() const GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex)
void Retire() GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex)
ExpectationSet immediate_prerequisites_
bool action_count_checked_
void AssertSpecProperty(bool property, const string &failure_message) const
void DescribeCallCountTo(::std::ostream *os) const GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex)
const char * source_text() const
bool extra_matcher_specified_
void SpecifyCardinality(const Cardinality &cardinality)
friend class UntypedFunctionMockerBase
const char * file() const
friend class TypedExpectation
virtual ~ExpectationBase()
virtual void MaybeDescribeExtraMatcherTo(::std::ostream *os)=0
void ExpectSpecProperty(bool property, const string &failure_message) const
void DescribeLocationTo(::std::ostream *os) const
virtual Expectation GetHandle()=0
void set_cardinality(const Cardinality &a_cardinality)
bool retires_on_saturation_
bool AllPrerequisitesAreSatisfied() const GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex)
friend class ::testing::internal::ExpectationTester
friend class ::testing::Expectation
const string source_text_
bool cardinality_specified() const
ExpectationBase(const char *file, int line, const string &source_text)
UntypedActions untyped_actions_
GTEST_DISALLOW_ASSIGN_(ExpectationBase)
std::vector< const void * > UntypedActions
void FindUnsatisfiedPrerequisites(ExpectationSet *result) const GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex)
int call_count() const GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex)
void CheckActionCountIfNotDone() const GTEST_LOCK_EXCLUDED_(mutex_)
bool repeated_action_specified_
bool cardinality_specified_
bool IsSaturated() const GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex)
const Cardinality & cardinality() const
bool IsSatisfied() const GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex)
friend class ::testing::Sequence
void IncrementCallCount() GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex)
void RetireAllPreRequisites() GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex)
bool is_retired() const GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex)
MockSpec< F > & current_spec()
OnCallSpec< F > & AddNewOnCallSpec(const char *file, int line, const ArgumentMatcherTuple &m) GTEST_LOCK_EXCLUDED_(g_gmock_mutex)
Function< F >::ArgumentTuple ArgumentTuple
virtual ~FunctionMockerBase() GTEST_LOCK_EXCLUDED_(g_gmock_mutex)
TypedExpectation< F > & AddNewExpectation(const char *file, int line, const string &source_text, const ArgumentMatcherTuple &m) GTEST_LOCK_EXCLUDED_(g_gmock_mutex)
friend class TypedExpectation
Result InvokeWith(const ArgumentTuple &args) GTEST_LOCK_EXCLUDED_(g_gmock_mutex)
ActionResultHolder< Result > ResultHolder
Function< F >::Result Result
Function< F >::ArgumentMatcherTuple ArgumentMatcherTuple
virtual UntypedActionResultHolderBase * UntypedPerformAction(const void *untyped_action, const void *untyped_args) const
virtual void ClearDefaultActionsLocked() GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex)
Result PerformDefaultAction(const ArgumentTuple &args, const string &call_description) const
const OnCallSpec< F > * FindOnCallSpec(const ArgumentTuple &args) const
virtual UntypedActionResultHolderBase * UntypedPerformDefaultAction(const void *untyped_args, const string &call_description) const
MockSpec(internal::FunctionMockerBase< F > *function_mocker)
internal::Function< F >::ArgumentMatcherTuple ArgumentMatcherTuple
internal::OnCallSpec< F > & InternalDefaultActionSetAt(const char *file, int line, const char *obj, const char *call)
internal::Function< F >::ArgumentTuple ArgumentTuple
internal::TypedExpectation< F > & InternalExpectedAt(const char *file, int line, const char *obj, const char *call)
Function< F >::ArgumentMatcherTuple ArgumentMatcherTuple
Function< F >::ArgumentTuple ArgumentTuple
OnCallSpec & With(const Matcher< const ArgumentTuple & > &m)
bool Matches(const ArgumentTuple &args) const
OnCallSpec & WillByDefault(const Action< F > &action)
const Action< F > & GetAction() const
OnCallSpec(const char *a_file, int a_line, const ArgumentMatcherTuple &matchers)
ReferenceOrValueWrapper(reference ref)
ReferenceOrValueWrapper(T value)
TypedExpectation & InSequence(const Sequence &s1, const Sequence &s2, const Sequence &s3, const Sequence &s4)
TypedExpectation & After(const ExpectationSet &s)
TypedExpectation(FunctionMockerBase< F > *owner, const char *a_file, int a_line, const string &a_source_text, const ArgumentMatcherTuple &m)
TypedExpectation & InSequence(const Sequence &s)
friend class FunctionMockerBase
TypedExpectation & After(const ExpectationSet &s1, const ExpectationSet &s2, const ExpectationSet &s3, const ExpectationSet &s4)
const ArgumentMatcherTuple & matchers() const
TypedExpectation & WillRepeatedly(const Action< F > &action)
TypedExpectation & WillOnce(const Action< F > &action)
TypedExpectation & After(const ExpectationSet &s1, const ExpectationSet &s2, const ExpectationSet &s3)
TypedExpectation & With(const Matcher< const ArgumentTuple & > &m)
virtual ~TypedExpectation()
TypedExpectation & InSequence(const Sequence &s1, const Sequence &s2, const Sequence &s3)
Function< F >::Result Result
Function< F >::ArgumentMatcherTuple ArgumentMatcherTuple
TypedExpectation & RetiresOnSaturation()
Function< F >::ArgumentTuple ArgumentTuple
const Action< F > & repeated_action() const
TypedExpectation & InSequence(const Sequence &s1, const Sequence &s2, const Sequence &s3, const Sequence &s4, const Sequence &s5)
TypedExpectation & Times(const Cardinality &a_cardinality)
virtual void MaybeDescribeExtraMatcherTo(::std::ostream *os)
TypedExpectation & Times(int n)
TypedExpectation & After(const ExpectationSet &s1, const ExpectationSet &s2)
const Matcher< const ArgumentTuple & > & extra_matcher() const
TypedExpectation & After(const ExpectationSet &s1, const ExpectationSet &s2, const ExpectationSet &s3, const ExpectationSet &s4, const ExpectationSet &s5)
TypedExpectation & InSequence(const Sequence &s1, const Sequence &s2)
static void Print(const T &value, ::std::ostream *os)
virtual ~UntypedActionResultHolderBase()
virtual void PrintAsActionResult(::std::ostream *os) const =0
void RegisterOwner(const void *mock_obj) GTEST_LOCK_EXCLUDED_(g_gmock_mutex)
void SetOwnerAndName(const void *mock_obj, const char *name) GTEST_LOCK_EXCLUDED_(g_gmock_mutex)
std::vector< const void * > UntypedOnCallSpecs
std::vector< internal::linked_ptr< ExpectationBase > > UntypedExpectations
bool VerifyAndClearExpectationsLocked() GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex)
virtual void ClearDefaultActionsLocked() GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex)=0
virtual void UntypedDescribeUninterestingCall(const void *untyped_args, ::std::ostream *os) const GTEST_LOCK_EXCLUDED_(g_gmock_mutex)=0
virtual const ExpectationBase * UntypedFindMatchingExpectation(const void *untyped_args, const void **untyped_action, bool *is_excessive, ::std::ostream *what, ::std::ostream *why) GTEST_LOCK_EXCLUDED_(g_gmock_mutex)=0
const void * MockObject() const GTEST_LOCK_EXCLUDED_(g_gmock_mutex)
Expectation GetHandleOf(ExpectationBase *exp)
virtual ~UntypedFunctionMockerBase()
UntypedExpectations untyped_expectations_
virtual UntypedActionResultHolderBase * UntypedPerformDefaultAction(const void *untyped_args, const string &call_description) const =0
virtual UntypedActionResultHolderBase * UntypedPerformAction(const void *untyped_action, const void *untyped_args) const =0
UntypedActionResultHolderBase * UntypedInvokeWith(const void *untyped_args) GTEST_LOCK_EXCLUDED_(g_gmock_mutex)
virtual void UntypedPrintArgs(const void *untyped_args, ::std::ostream *os) const =0
const char * Name() const GTEST_LOCK_EXCLUDED_(g_gmock_mutex)
UntypedOnCallSpecs untyped_on_call_specs_
UntypedFunctionMockerBase()
void ExpectSpecProperty(bool property, const string &failure_message) const
const char * file() const
void AssertSpecProperty(bool property, const string &failure_message) const
UntypedOnCallSpecBase(const char *a_file, int a_line)
std::string message("Message requiring signing")
#define GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)
#define GTEST_LOCK_EXCLUDED_(locks)
#define GTEST_DISALLOW_ASSIGN_(type)
#define GTEST_ATTRIBUTE_UNUSED_
#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)
#define GTEST_DECLARE_STATIC_MUTEX_(mutex)
mdb_size_t count(MDB_cursor *cur)
bool TupleMatches(const MatcherTuple &matcher_tuple, const ValueTuple &value_tuple)
GTEST_API_ ThreadLocal< Sequence * > g_gmock_implicit_sequence
void UniversalPrint(const T &value, ::std::ostream *os)
GTEST_API_::std::string FormatFileLocation(const char *file, int line)
void Assert(bool condition, const char *file, int line)
void ReportUninterestingCall(CallReaction reaction, const string &msg)
const T & move(const T &t)
const bool ImplicitlyConvertible< From, To >::value
void Expect(bool condition, const char *file, int line, const string &msg)
GTEST_API_ void Log(LogSeverity severity, const string &message, int stack_frames_to_skip)
GTEST_API_ void LogWithLocation(testing::internal::LogSeverity severity, const char *file, int line, const string &message)
void ExplainMatchFailureTupleTo(const MatcherTuple &matchers, const ValueTuple &values, ::std::ostream *os)
GTEST_API_ Cardinality AtLeast(int n)
const T & Const(const T &x)
GTEST_API_ Cardinality Exactly(int n)
internal::DoDefaultAction DoDefault()
internal::MatcherAsPredicate< M > Matches(M matcher)