Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
testing::internal::OnCallSpec< F > Class Template Reference

#include <gmock-spec-builders.h>

Inheritance diagram for testing::internal::OnCallSpec< F >:
Collaboration diagram for testing::internal::OnCallSpec< F >:

Public Types

typedef Function< F >::ArgumentTuple ArgumentTuple
 
typedef Function< F >::ArgumentMatcherTuple ArgumentMatcherTuple
 

Public Member Functions

 OnCallSpec (const char *a_file, int a_line, const ArgumentMatcherTuple &matchers)
 
OnCallSpecWith (const Matcher< const ArgumentTuple & > &m)
 
OnCallSpecWillByDefault (const Action< F > &action)
 
bool Matches (const ArgumentTuple &args) const
 
const Action< F > & GetAction () const
 
- Public Member Functions inherited from testing::internal::UntypedOnCallSpecBase
 UntypedOnCallSpecBase (const char *a_file, int a_line)
 
const char * file () const
 
int line () const
 

Additional Inherited Members

- Protected Types inherited from testing::internal::UntypedOnCallSpecBase
enum  Clause { kNone , kWith , kWillByDefault }
 
- Protected Member Functions inherited from testing::internal::UntypedOnCallSpecBase
void AssertSpecProperty (bool property, const std::string &failure_message) const
 
void ExpectSpecProperty (bool property, const std::string &failure_message) const
 
- Protected Attributes inherited from testing::internal::UntypedOnCallSpecBase
const char * file_
 
int line_
 
Clause last_clause_
 

Detailed Description

template<typename F>
class testing::internal::OnCallSpec< F >

Definition at line 291 of file gmock-spec-builders.h.

Member Typedef Documentation

◆ ArgumentMatcherTuple

template<typename F >
Function<F>::ArgumentMatcherTuple testing::internal::OnCallSpec< F >::ArgumentMatcherTuple

Definition at line 294 of file gmock-spec-builders.h.

◆ ArgumentTuple

template<typename F >
Function<F>::ArgumentTuple testing::internal::OnCallSpec< F >::ArgumentTuple

Definition at line 293 of file gmock-spec-builders.h.

Constructor & Destructor Documentation

◆ OnCallSpec()

template<typename F >
testing::internal::OnCallSpec< F >::OnCallSpec ( const char * a_file,
int a_line,
const ArgumentMatcherTuple & matchers )
inline

Definition at line 298 of file gmock-spec-builders.h.

300 : UntypedOnCallSpecBase(a_file, a_line),
301 matchers_(matchers),
302 // By default, extra_matcher_ should match anything. However,
303 // we cannot initialize it with _ as that triggers a compiler
304 // bug in Symbian's C++ compiler (cannot decide between two
305 // overloaded constructors of Matcher<const ArgumentTuple&>).
306 extra_matcher_(A<const ArgumentTuple&>()) {
307 }
UntypedOnCallSpecBase(const char *a_file, int a_line)

Member Function Documentation

◆ GetAction()

template<typename F >
const Action< F > & testing::internal::OnCallSpec< F >::GetAction ( ) const
inline

Definition at line 340 of file gmock-spec-builders.h.

340 {
342 ".WillByDefault() must appear exactly "
343 "once in an ON_CALL().");
344 return action_;
345 }
void AssertSpecProperty(bool property, const std::string &failure_message) const
Here is the caller graph for this function:

◆ Matches()

template<typename F >
bool testing::internal::OnCallSpec< F >::Matches ( const ArgumentTuple & args) const
inline

Definition at line 335 of file gmock-spec-builders.h.

335 {
336 return TupleMatches(matchers_, args) && extra_matcher_.Matches(args);
337 }
bool Matches(GTEST_REFERENCE_TO_CONST_(T) x) const
bool TupleMatches(const MatcherTuple &matcher_tuple, const ValueTuple &value_tuple)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ WillByDefault()

template<typename F >
OnCallSpec & testing::internal::OnCallSpec< F >::WillByDefault ( const Action< F > & action)
inline

Definition at line 322 of file gmock-spec-builders.h.

322 {
324 ".WillByDefault() must appear "
325 "exactly once in an ON_CALL().");
327
328 ExpectSpecProperty(!action.IsDoDefault(),
329 "DoDefault() cannot be used in ON_CALL().");
330 action_ = action;
331 return *this;
332 }
void ExpectSpecProperty(bool property, const std::string &failure_message) const

◆ With()

template<typename F >
OnCallSpec & testing::internal::OnCallSpec< F >::With ( const Matcher< const ArgumentTuple & > & m)
inline

Definition at line 310 of file gmock-spec-builders.h.

310 {
311 // Makes sure this is called at most once.
313 ".With() cannot appear "
314 "more than once in an ON_CALL().");
316
317 extra_matcher_ = m;
318 return *this;
319 }

The documentation for this class was generated from the following file: