Orxonox  0.0.5 Codename: Arcturus
Classes | Namespaces | Macros | Functions | Variables
gmock-matchers.h File Reference
#include <algorithm>
#include <limits>
#include <ostream>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#include "gmock/internal/gmock-internal-utils.h"
#include "gmock/internal/gmock-port.h"
#include "gtest/gtest.h"

Go to the source code of this file.

Classes

class  testing::internal::AnyMatcherImpl< T >
 
class  testing::internal::AnythingMatcher
 
class  testing::internal::BothOfMatcher< Matcher1, Matcher2 >
 
class  testing::internal::BothOfMatcherImpl< T >
 
struct  testing::internal::CallableTraits< Functor >
 
struct  testing::internal::CallableTraits< ResType(*)(ArgType)>
 
class  testing::internal::ContainerEqMatcher< Container >
 
class  testing::internal::ContainsMatcher< M >
 
class  testing::internal::ContainsMatcherImpl< Container >
 
class  testing::internal::DummyMatchResultListener
 
class  testing::internal::EachMatcher< M >
 
class  testing::internal::EachMatcherImpl< Container >
 
class  testing::internal::EitherOfMatcher< Matcher1, Matcher2 >
 
class  testing::internal::EitherOfMatcherImpl< T >
 
class  testing::internal::ElementsAreArrayMatcher< T >
 
class  testing::internal::ElementsAreMatcher0
 
class  testing::internal::ElementsAreMatcherImpl< Container >
 
class  testing::internal::EndsWithMatcher< StringType >
 
class  testing::internal::FieldMatcher< Class, FieldType >
 
class  testing::internal::FloatingEqMatcher< FloatType >
 
class  testing::internal::FloatingEqMatcher< FloatType >::Impl< T >
 
class  testing::internal::HasSubstrMatcher< StringType >
 
class  testing::internal::IsNullMatcher
 
class  testing::internal::KeyMatcher< M >
 
class  testing::internal::KeyMatcherImpl< PairType >
 
class  testing::internal::MatcherAsPredicate< M >
 
class  testing::internal::MatcherBase< T >
 
class  testing::internal::MatcherCastImpl< T, M >
 
class  testing::internal::MatcherCastImpl< T, Matcher< T > >
 
class  testing::internal::MatcherCastImpl< T, Matcher< U > >
 
class  testing::internal::MatcherCastImpl< T, Matcher< U > >::Impl
 
class  testing::internal::MatchesRegexMatcher
 
class  testing::internal::NotMatcher< InnerMatcher >
 
class  testing::internal::NotMatcherImpl< T >
 
class  testing::internal::NotNullMatcher
 
class  testing::internal::PairMatcher< FirstMatcher, SecondMatcher >
 
class  testing::internal::PairMatcherImpl< PairType >
 
class  testing::internal::PointeeMatcher< InnerMatcher >
 
class  testing::internal::PointeeMatcher< InnerMatcher >::Impl< Pointer >
 
class  testing::internal::PointwiseMatcher< TupleMatcher, RhsContainer >
 
class  testing::internal::PointwiseMatcher< TupleMatcher, RhsContainer >::Impl< LhsContainer >
 
class  testing::internal::PredicateFormatterFromMatcher< M >
 
class  testing::internal::PropertyMatcher< Class, PropertyType >
 
class  testing::internal::QuantifierMatcherImpl< Container >
 
class  testing::internal::RefMatcher< T >
 
class  testing::internal::RefMatcher< T & >
 
class  testing::internal::RefMatcher< T & >::Impl< Super >
 
class  testing::internal::ResultOfMatcher< Callable >
 
class  testing::internal::ResultOfMatcher< Callable >::Impl< T >
 
class  testing::internal::StartsWithMatcher< StringType >
 
class  testing::internal::StreamMatchResultListener
 
class  testing::internal::StrEqualityMatcher< StringType >
 
class  testing::internal::StringMatchResultListener
 
class  testing::internal::TrulyMatcher< Predicate >
 
class  testing::internal::TuplePrefix< N >
 
class  testing::internal::TuplePrefix< 0 >
 
class  testing::Matcher< T >
 
class  testing::Matcher< const internal::string & >
 
class  testing::Matcher< internal::string >
 
class  testing::MatcherInterface< T >
 
class  testing::MatchResultListener
 
class  testing::PolymorphicMatcher< Impl >
 
class  testing::PolymorphicMatcher< Impl >::MonomorphicImpl< T >
 
class  testing::SafeMatcherCastImpl< T >
 

Namespaces

 testing
 
 testing::internal
 

Macros

#define ASSERT_THAT(value, matcher)
 
#define EXPECT_THAT(value, matcher)
 
#define GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(name, op, relation)
 
#define GMOCK_IMPLEMENT_COMPARISON_MATCHER_(name, op, relation, negated_relation)
 

Functions

template<typename T >
Matcher< T > testing::A ()
 
template<typename InnerMatcher >
InnerMatcher testing::AllArgs (const InnerMatcher &matcher)
 
template<typename T >
Matcher< T > testing::An ()
 
bool testing::internal::CaseInsensitiveCStringEquals (const char *lhs, const char *rhs)
 
bool testing::internal::CaseInsensitiveCStringEquals (const wchar_t *lhs, const wchar_t *rhs)
 
template<typename StringType >
bool testing::internal::CaseInsensitiveStringEquals (const StringType &s1, const StringType &s2)
 
template<typename Container >
PolymorphicMatcher< internal::ContainerEqMatcher< GTEST_REMOVE_CONST_(Container)> > testing::ContainerEq (const Container &rhs)
 
template<typename M >
internal::ContainsMatcher< M > testing::Contains (M matcher)
 
PolymorphicMatcher< internal::MatchesRegexMatcher > testing::ContainsRegex (const internal::RE *regex)
 
PolymorphicMatcher< internal::MatchesRegexMatcher > testing::ContainsRegex (const internal::string &regex)
 
internal::FloatingEqMatcher< double > testing::DoubleEq (double rhs)
 
template<typename M >
internal::EachMatcher< M > testing::Each (M matcher)
 
PolymorphicMatcher< internal::EndsWithMatcher< internal::string > > testing::EndsWith (const internal::string &suffix)
 
template<typename T >
internal::EqMatcher< T > testing::Eq (T x)
 
internal::Eq2Matcher testing::Eq ()
 
template<typename MatcherTuple , typename ValueTuple >
void testing::internal::ExplainMatchFailureTupleTo (const MatcherTuple &matchers, const ValueTuple &values,::std::ostream *os)
 
template<typename T , typename M >
bool testing::ExplainMatchResult (M matcher, const T &value, MatchResultListener *listener)
 
template<typename Class , typename FieldType , typename FieldMatcher >
PolymorphicMatcher< internal::FieldMatcher< Class, FieldType > > testing::Field (FieldType Class::*field, const FieldMatcher &matcher)
 
internal::FloatingEqMatcher< float > testing::FloatEq (float rhs)
 
string testing::internal::FormatMatcherDescription (bool negation, const char *matcher_name, const Strings &param_values)
 
template<typename Rhs >
internal::GeMatcher< Rhs > testing::Ge (Rhs x)
 
internal::Ge2Matcher testing::Ge ()
 
 testing::internal::GMOCK_IMPLEMENT_COMPARISON2_MATCHER_ (Eq,==,"an equal pair")
 
 testing::internal::GMOCK_IMPLEMENT_COMPARISON2_MATCHER_ (Ge, >=,"a pair where the first >= the second")
 
 testing::internal::GMOCK_IMPLEMENT_COMPARISON2_MATCHER_ (Gt, >,"a pair where the first > the second")
 
 testing::internal::GMOCK_IMPLEMENT_COMPARISON2_MATCHER_ (Le,<=,"a pair where the first <= the second")
 
 testing::internal::GMOCK_IMPLEMENT_COMPARISON2_MATCHER_ (Lt,<,"a pair where the first < the second")
 
 testing::internal::GMOCK_IMPLEMENT_COMPARISON2_MATCHER_ (Ne,!=,"an unequal pair")
 
 testing::internal::GMOCK_IMPLEMENT_COMPARISON_MATCHER_ (Eq,==,"is equal to","isn't equal to")
 
 testing::internal::GMOCK_IMPLEMENT_COMPARISON_MATCHER_ (Ge, >=,"is >=","isn't >=")
 
 testing::internal::GMOCK_IMPLEMENT_COMPARISON_MATCHER_ (Gt, >,"is >","isn't >")
 
 testing::internal::GMOCK_IMPLEMENT_COMPARISON_MATCHER_ (Le,<=,"is <=","isn't <=")
 
 testing::internal::GMOCK_IMPLEMENT_COMPARISON_MATCHER_ (Lt,<,"is <","isn't <")
 
 testing::internal::GMOCK_IMPLEMENT_COMPARISON_MATCHER_ (Ne,!=,"isn't equal to","is equal to")
 
template<typename Rhs >
internal::GtMatcher< Rhs > testing::Gt (Rhs x)
 
internal::Gt2Matcher testing::Gt ()
 
PolymorphicMatcher< internal::HasSubstrMatcher< internal::string > > testing::HasSubstr (const internal::string &substring)
 
PolymorphicMatcher< internal::IsNullMatcher > testing::IsNull ()
 
bool testing::internal::IsReadableTypeName (const string &type_name)
 
template<typename M >
internal::KeyMatcher< M > testing::Key (M inner_matcher)
 
template<typename Rhs >
internal::LeMatcher< Rhs > testing::Le (Rhs x)
 
internal::Le2Matcher testing::Le ()
 
template<typename Rhs >
internal::LtMatcher< Rhs > testing::Lt (Rhs x)
 
internal::Lt2Matcher testing::Lt ()
 
template<typename T >
Matcher< T > testing::MakeMatcher (const MatcherInterface< T > *impl)
 
template<class Impl >
PolymorphicMatcher< Impl > testing::MakePolymorphicMatcher (const Impl &impl)
 
template<typename M >
PredicateFormatterFromMatcher< M > testing::internal::MakePredicateFormatterFromMatcher (const M &matcher)
 
template<typename T , typename M >
Matcher< T > testing::MatcherCast (M m)
 
template<typename M >
internal::MatcherAsPredicate< M > testing::Matches (M matcher)
 
PolymorphicMatcher< internal::MatchesRegexMatcher > testing::MatchesRegex (const internal::RE *regex)
 
PolymorphicMatcher< internal::MatchesRegexMatcher > testing::MatchesRegex (const internal::string &regex)
 
template<typename Value , typename T >
bool testing::internal::MatchPrintAndExplain (Value &value, const Matcher< T > &matcher, MatchResultListener *listener)
 
internal::FloatingEqMatcher< double > testing::NanSensitiveDoubleEq (double rhs)
 
internal::FloatingEqMatcher< float > testing::NanSensitiveFloatEq (float rhs)
 
template<typename Rhs >
internal::NeMatcher< Rhs > testing::Ne (Rhs x)
 
internal::Ne2Matcher testing::Ne ()
 
template<typename InnerMatcher >
internal::NotMatcher< InnerMatcher > testing::Not (InnerMatcher m)
 
PolymorphicMatcher< internal::NotNullMatcher > testing::NotNull ()
 
template<typename FirstMatcher , typename SecondMatcher >
internal::PairMatcher< FirstMatcher, SecondMatcher > testing::Pair (FirstMatcher first_matcher, SecondMatcher second_matcher)
 
template<typename InnerMatcher >
internal::PointeeMatcher< InnerMatcher > testing::Pointee (const InnerMatcher &inner_matcher)
 
template<typename TupleMatcher , typename Container >
internal::PointwiseMatcher< TupleMatcher, GTEST_REMOVE_CONST_(Container)> testing::Pointwise (const TupleMatcher &tuple_matcher, const Container &rhs)
 
void testing::internal::PrintIfNotEmpty (const internal::string &explanation, std::ostream *os)
 
template<typename Class , typename PropertyType , typename PropertyMatcher >
PolymorphicMatcher< internal::PropertyMatcher< Class, PropertyType > > testing::Property (PropertyType(Class::*property)() const, const PropertyMatcher &matcher)
 
template<typename T >
internal::RefMatcher< T & > testing::Ref (T &x)
 
template<typename Callable , typename ResultOfMatcher >
internal::ResultOfMatcher< Callable > testing::ResultOf (Callable callable, const ResultOfMatcher &matcher)
 
template<typename T , typename M >
Matcher< T > testing::SafeMatcherCast (const M &polymorphic_matcher)
 
PolymorphicMatcher< internal::StartsWithMatcher< internal::string > > testing::StartsWith (const internal::string &prefix)
 
PolymorphicMatcher< internal::StrEqualityMatcher< internal::string > > testing::StrCaseEq (const internal::string &str)
 
PolymorphicMatcher< internal::StrEqualityMatcher< internal::string > > testing::StrCaseNe (const internal::string &str)
 
PolymorphicMatcher< internal::StrEqualityMatcher< internal::string > > testing::StrEq (const internal::string &str)
 
PolymorphicMatcher< internal::StrEqualityMatcher< internal::string > > testing::StrNe (const internal::string &str)
 
template<typename Predicate >
PolymorphicMatcher< internal::TrulyMatcher< Predicate > > testing::Truly (Predicate pred)
 
template<typename MatcherTuple , typename ValueTuple >
bool testing::internal::TupleMatches (const MatcherTuple &matcher_tuple, const ValueTuple &value_tuple)
 
template<typename Lhs , typename Rhs >
Matcher< Lhs > testing::TypedEq (const Rhs &rhs)
 
template<typename T , typename M >
bool testing::Value (const T &value, M matcher)
 

Variables

const internal::AnythingMatcher testing::_ = {}
 

Macro Definition Documentation

#define ASSERT_THAT (   value,
  matcher 
)
Value:
PredicateFormatterFromMatcher< M > MakePredicateFormatterFromMatcher(const M &matcher)
Definition: gmock-matchers.h:1503
#define ASSERT_PRED_FORMAT1(pred_format, v1)
Definition: gtest_pred_impl.h:117
#define EXPECT_THAT (   value,
  matcher 
)
Value:
PredicateFormatterFromMatcher< M > MakePredicateFormatterFromMatcher(const M &matcher)
Definition: gmock-matchers.h:1503
#define EXPECT_PRED_FORMAT1(pred_format, v1)
Definition: gtest_pred_impl.h:113
#define GMOCK_IMPLEMENT_COMPARISON2_MATCHER_ (   name,
  op,
  relation 
)
Value:
class name##2Matcher { \
public: \
template <typename T1, typename T2> \
operator Matcher< ::std::tr1::tuple<T1, T2> >() const { \
return MakeMatcher(new Impl< ::std::tr1::tuple<T1, T2> >); \
} \
template <typename T1, typename T2> \
operator Matcher<const ::std::tr1::tuple<T1, T2>&>() const { \
return MakeMatcher(new Impl<const ::std::tr1::tuple<T1, T2>&>); \
} \
private: \
template <typename Tuple> \
class Impl : public MatcherInterface<Tuple> { \
public: \
virtual bool MatchAndExplain( \
Tuple args, \
MatchResultListener* /* listener */) const { \
return ::std::tr1::get<0>(args) op ::std::tr1::get<1>(args); \
} \
virtual void DescribeTo(::std::ostream* os) const { \
*os << "are " relation; \
} \
virtual void DescribeNegationTo(::std::ostream* os) const { \
*os << "aren't " relation; \
} \
}; \
}
Definition: gtest-tuple.h:109
Matcher< T > MakeMatcher(const MatcherInterface< T > *impl)
Definition: gmock-matchers.h:371
#define GMOCK_IMPLEMENT_COMPARISON_MATCHER_ (   name,
  op,
  relation,
  negated_relation 
)