Lines Matching defs:const

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
175 virtual const ExpectationBase* UntypedFindMatchingExpectation(
176 const void* untyped_args,
177 const void** untyped_action, bool* is_excessive,
182 virtual void UntypedPrintArgs(const void* untyped_args,
183 ::std::ostream* os) const = 0;
190 void RegisterOwner(const void* mock_obj)
196 void SetOwnerAndName(const void* mock_obj, const char* name)
202 const void* MockObject() const
207 const char* Name() const
215 const void* untyped_args)
219 typedef std::vector<const void*> UntypedOnCallSpecs;
231 const void* mock_obj_; // Protected by g_gmock_mutex.
235 const char* name_; // Protected by g_gmock_mutex.
248 UntypedOnCallSpecBase(const char* a_file, int a_line)
252 const char* file() const { return file_; }
253 int line() const { return line_; }
266 void AssertSpecProperty(bool property, const string& failure_message) const {
271 void ExpectSpecProperty(bool property, const string& failure_message) const {
275 const char* file_;
292 OnCallSpec(const char* a_file, int a_line,
293 const ArgumentMatcherTuple& matchers)
299 // overloaded constructors of Matcher<const ArgumentTuple&>).
300 extra_matcher_(A<const ArgumentTuple&>()) {
304 OnCallSpec& With(const Matcher<const ArgumentTuple&>& m) {
316 OnCallSpec& WillByDefault(const Action<F>& action) {
329 bool Matches(const ArgumentTuple& args) const {
334 const Action<F>& GetAction() const {
356 Matcher<const ArgumentTuple&> extra_matcher_;
377 static void AllowLeak(const void* mock_obj)
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)
447 const void* mock_obj,
455 const void* mock_obj, const char* file, int line)
478 // - Constness is shallow: a const Expectation object itself cannot
499 // Expectation objects, and needs to call the non-const Retire()
501 // Expectation must receive a *non-const* reference to the
509 bool operator==(const Expectation& rhs) const {
513 bool operator!=(const Expectation& rhs) const { return !(*this == rhs); }
530 bool operator()(const Expectation& lhs, const Expectation& rhs) const {
538 const internal::linked_ptr<internal::ExpectationBase>& expectation_base);
541 const internal::linked_ptr<internal::ExpectationBase>&
542 expectation_base() const {
565 // A bidirectional iterator that can read a const element in the set.
584 ExpectationSet(const Expectation& e) { // NOLINT
593 bool operator==(const ExpectationSet& rhs) const {
597 bool operator!=(const ExpectationSet& rhs) const { return !(*this == rhs); }
601 ExpectationSet& operator+=(const Expectation& e) {
606 int size() const { return static_cast<int>(expectations_.size()); }
608 const_iterator begin() const { return expectations_.begin(); }
609 const_iterator end() const { return expectations_.end(); }
626 void AddExpectation(const Expectation& expectation) const;
693 ExpectationBase(const char* file, int line, const string& source_text);
698 const char* file() const { return file_; }
699 int line() const { return line_; }
700 const char* source_text() const { return source_text_.c_str(); }
702 const Cardinality& cardinality() const { return cardinality_; }
705 void DescribeLocationTo(::std::ostream* os) const {
711 void DescribeCallCountTo(::std::ostream* os) const
734 typedef std::vector<const void*> UntypedActions;
741 void AssertSpecProperty(bool property, const string& failure_message) const {
746 void ExpectSpecProperty(bool property, const string& failure_message) const {
752 void SpecifyCardinality(const Cardinality& cardinality);
756 bool cardinality_specified() const { return cardinality_specified_; }
759 void set_cardinality(const Cardinality& a_cardinality) {
772 bool is_retired() const
786 bool IsSatisfied() const
793 bool IsSaturated() const
800 bool IsOverSaturated() const
807 bool AllPrerequisitesAreSatisfied() const
811 void FindUnsatisfiedPrerequisites(ExpectationSet* result) const
815 int call_count() const
832 void CheckActionCountIfNotDone() const
842 void UntypedTimes(const Cardinality& a_cardinality);
846 const char* file_; // The file that contains the expectation.
848 const string source_text_; // The EXPECT_CALL(...) source text.
884 const char* a_file, int a_line, const string& a_source_text,
885 const ArgumentMatcherTuple& m)
892 // overloaded constructors of Matcher<const ArgumentTuple&>).
893 extra_matcher_(A<const ArgumentTuple&>()),
902 delete static_cast<const Action<F>*>(*it);
907 TypedExpectation& With(const Matcher<const ArgumentTuple&>& m) {
925 TypedExpectation& Times(const Cardinality& a_cardinality) {
936 TypedExpectation& InSequence(const Sequence& s) {
946 TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2) {
949 TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2,
950 const Sequence& s3) {
953 TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2,
954 const Sequence& s3, const Sequence& s4) {
957 TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2,
958 const Sequence& s3, const Sequence& s4,
959 const Sequence& s5) {
964 TypedExpectation& After(const ExpectationSet& s) {
976 TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2) {
979 TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2,
980 const ExpectationSet& s3) {
983 TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2,
984 const ExpectationSet& s3, const ExpectationSet& s4) {
987 TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2,
988 const ExpectationSet& s3, const ExpectationSet& s4,
989 const ExpectationSet& s5) {
994 TypedExpectation& WillOnce(const Action<F>& action) {
1008 TypedExpectation& WillRepeatedly(const Action<F>& action) {
1048 const ArgumentMatcherTuple& matchers() const {
1053 const Matcher<const ArgumentTuple&>& extra_matcher() const {
1058 const Action<F>& repeated_action() const { return repeated_action_; }
1085 bool Matches(const ArgumentTuple& args) const
1092 bool ShouldHandleArguments(const ArgumentTuple& args) const
1107 const ArgumentTuple& args,
1108 ::std::ostream* os) const
1151 const Action<F>& GetCurrentAction(
1152 const FunctionMockerBase<F>* mocker,
1153 const ArgumentTuple& args) const
1156 const int count = call_count();
1161 const int action_count = static_cast<int>(untyped_actions_.size());
1177 *static_cast<const Action<F>*>(untyped_actions_[count - 1]) :
1185 // Mock does it to 'why'. This method is not const as it calls
1188 const Action<F>* GetActionForArguments(
1189 const FunctionMockerBase<F>* mocker,
1190 const ArgumentTuple& args,
1222 FunctionMockerBase<F>* const owner_;
1224 Matcher<const ArgumentTuple&> extra_matcher_;
1242 const char* file, int line,
1243 const string& message);
1260 const char* file, int line, const char* obj, const char* call) {
1269 const char* file, int line, const char* obj, const char* call) {
1270 const string source_text(string("EXPECT_CALL(") + obj + ", " + call + ")");
1280 void SetMatchers(const ArgumentMatcherTuple& matchers) {
1285 internal::FunctionMockerBase<F>* const function_mocker_;
1315 // Always returns a const reference (more precisely,
1316 // const RemoveReference<T>&). The behavior of calling this after
1318 const T& Peek() const {
1337 const T& Peek() const { return *value_ptr_; }
1367 virtual void PrintAsActionResult(::std::ostream* os) const = 0;
1380 virtual void PrintAsActionResult(::std::ostream* os) const {
1390 const FunctionMockerBase<F>* func_mocker,
1391 const typename Function<F>::ArgumentTuple& args,
1392 const string& call_description) {
1401 PerformAction(const Action<F>& action,
1402 const typename Function<F>::ArgumentTuple& args) {
1424 virtual void PrintAsActionResult(::std::ostream* /* os */) const {}
1430 const FunctionMockerBase<F>* func_mocker,
1431 const typename Function<F>::ArgumentTuple& args,
1432 const string& call_description) {
1441 const Action<F>& action,
1442 const typename Function<F>::ArgumentTuple& args) {
1478 const OnCallSpec<F>* FindOnCallSpec(
1479 const ArgumentTuple& args) const {
1483 const OnCallSpec<F>* spec = static_cast<const OnCallSpec<F>*>(*it);
1498 Result PerformDefaultAction(const ArgumentTuple& args,
1499 const string& call_description) const {
1500 const OnCallSpec<F>* const spec =
1505 const string message = call_description +
1524 const void* untyped_args, // must point to an ArgumentTuple
1525 const string& call_description) const {
1526 const ArgumentTuple& args =
1527 *static_cast<const ArgumentTuple*>(untyped_args);
1536 const void* untyped_action, const void* untyped_args) const {
1539 const Action<F> action = *static_cast<const Action<F>*>(untyped_action);
1540 const ArgumentTuple& args =
1541 *static_cast<const ArgumentTuple*>(untyped_args);
1565 delete static_cast<const OnCallSpec<F>*>(*it);
1582 Result InvokeWith(const ArgumentTuple& args)
1591 const char* file, int line,
1592 const ArgumentMatcherTuple& m)
1595 OnCallSpec<F>* const on_call_spec = new OnCallSpec<F>(file, line, m);
1602 const char* file,
1604 const string& source_text,
1605 const ArgumentMatcherTuple& m)
1608 TypedExpectation<F>* const expectation =
1610 const linked_ptr<ExpectationBase> untyped_expectation(expectation);
1614 Sequence* const implicit_sequence = g_gmock_implicit_sequence.get();
1634 void DescribeDefaultActionTo(const ArgumentTuple& args,
1635 ::std::ostream* os) const {
1636 const OnCallSpec<F>* const spec = FindOnCallSpec(args);
1652 const void* untyped_args,
1653 ::std::ostream* os) const
1655 const ArgumentTuple& args =
1656 *static_cast<const ArgumentTuple*>(untyped_args);
1679 virtual const ExpectationBase* UntypedFindMatchingExpectation(
1680 const void* untyped_args,
1681 const void** untyped_action, bool* is_excessive,
1684 const ArgumentTuple& args =
1685 *static_cast<const ArgumentTuple*>(untyped_args);
1697 const Action<F>* action = exp->GetActionForArguments(this, args, what, why);
1705 virtual void UntypedPrintArgs(const void* untyped_args,
1706 ::std::ostream* os) const {
1707 const ArgumentTuple& args =
1708 *static_cast<const ArgumentTuple*>(untyped_args);
1715 const ArgumentTuple& args) const
1721 TypedExpectation<F>* const exp =
1732 const ArgumentTuple& args,
1734 ::std::ostream* why) const
1745 const ArgumentTuple& args,
1746 ::std::ostream* why) const
1749 const int count = static_cast<int>(untyped_expectations_.size());
1755 TypedExpectation<F>* const expectation =
1781 // MockFoo(const MockFoo& src) {}
1799 void ReportUninterestingCall(CallReaction reaction, const string& msg);
1810 // Const(x) is a convenient function for obtaining a const reference
1812 // const mock method, e.g.
1821 // // Expects a call to non-const MockFoo::Bar().
1823 // // Expects a call to const MockFoo::Bar().
1826 inline const T& Const(const T& x) { return x; }