Electroneum
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 string &failure_message) const
void ExpectSpecProperty (bool property, const 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 285 of file gmock-spec-builders.h.

Member Typedef Documentation

◆ ArgumentMatcherTuple

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

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

◆ ArgumentTuple

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

Definition at line 287 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 292 of file gmock-spec-builders.h.

295 matchers_(matchers),
296 // By default, extra_matcher_ should match anything. However,
297 // we cannot initialize it with _ as that triggers a compiler
298 // bug in Symbian's C++ compiler (cannot decide between two
299 // overloaded constructors of Matcher<const ArgumentTuple&>).
300 extra_matcher_(A<const ArgumentTuple&>()) {
301 }
UntypedOnCallSpecBase(const char *a_file, int a_line)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ GetAction()

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

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

334 {
336 ".WillByDefault() must appear exactly "
337 "once in an ON_CALL().");
338 return action_;
339 }
void AssertSpecProperty(bool property, const string &failure_message) const
Here is the call graph for this function:
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 329 of file gmock-spec-builders.h.

329 {
330 return TupleMatches(matchers_, args) && extra_matcher_.Matches(args);
331 }
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 316 of file gmock-spec-builders.h.

316 {
318 ".WillByDefault() must appear "
319 "exactly once in an ON_CALL().");
321
322 ExpectSpecProperty(!action.IsDoDefault(),
323 "DoDefault() cannot be used in ON_CALL().");
324 action_ = action;
325 return *this;
326 }
void ExpectSpecProperty(bool property, const string &failure_message) const
Here is the call graph for this function:

◆ With()

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

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

304 {
305 // Makes sure this is called at most once.
307 ".With() cannot appear "
308 "more than once in an ON_CALL().");
310
311 extra_matcher_ = m;
312 return *this;
313 }
Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h