proxygen
testing::internal::TrulyMatcher< Predicate > Class Template Reference

#include <gmock-matchers.h>

Public Member Functions

 TrulyMatcher (Predicate pred)
 
template<typename T >
bool MatchAndExplain (T &x, MatchResultListener *) const
 
void DescribeTo (::std::ostream *os) const
 
void DescribeNegationTo (::std::ostream *os) const
 
 TrulyMatcher (Predicate pred)
 
template<typename T >
bool MatchAndExplain (T &x, MatchResultListener *) const
 
void DescribeTo (::std::ostream *os) const
 
void DescribeNegationTo (::std::ostream *os) const
 
 TrulyMatcher (Predicate pred)
 
template<typename T >
bool MatchAndExplain (T &x, MatchResultListener *) const
 
void DescribeTo (::std::ostream *os) const
 
void DescribeNegationTo (::std::ostream *os) const
 

Private Member Functions

 GTEST_DISALLOW_ASSIGN_ (TrulyMatcher)
 
 GTEST_DISALLOW_ASSIGN_ (TrulyMatcher)
 
 GTEST_DISALLOW_ASSIGN_ (TrulyMatcher)
 

Private Attributes

Predicate predicate_
 

Detailed Description

template<typename Predicate>
class testing::internal::TrulyMatcher< Predicate >

Definition at line 1757 of file gmock-matchers.h.

Constructor & Destructor Documentation

template<typename Predicate >
testing::internal::TrulyMatcher< Predicate >::TrulyMatcher ( Predicate  pred)
inlineexplicit

Definition at line 1759 of file gmock-matchers.h.

1759 : predicate_(pred) {}
template<typename Predicate >
testing::internal::TrulyMatcher< Predicate >::TrulyMatcher ( Predicate  pred)
inlineexplicit

Definition at line 1759 of file gmock-matchers.h.

1759 : predicate_(pred) {}
template<typename Predicate >
testing::internal::TrulyMatcher< Predicate >::TrulyMatcher ( Predicate  pred)
inlineexplicit

Definition at line 1759 of file gmock-matchers.h.

1759 : predicate_(pred) {}

Member Function Documentation

template<typename Predicate >
void testing::internal::TrulyMatcher< Predicate >::DescribeNegationTo ( ::std::ostream *  os) const
inline

Definition at line 1783 of file gmock-matchers.h.

1783  {
1784  *os << "doesn't satisfy the given predicate";
1785  }
template<typename Predicate >
void testing::internal::TrulyMatcher< Predicate >::DescribeNegationTo ( ::std::ostream *  os) const
inline

Definition at line 1783 of file gmock-matchers.h.

References GTEST_DISALLOW_ASSIGN_.

1783  {
1784  *os << "doesn't satisfy the given predicate";
1785  }
template<typename Predicate >
void testing::internal::TrulyMatcher< Predicate >::DescribeNegationTo ( ::std::ostream *  os) const
inline

Definition at line 1783 of file gmock-matchers.h.

References GTEST_DISALLOW_ASSIGN_.

1783  {
1784  *os << "doesn't satisfy the given predicate";
1785  }
template<typename Predicate >
void testing::internal::TrulyMatcher< Predicate >::DescribeTo ( ::std::ostream *  os) const
inline

Definition at line 1779 of file gmock-matchers.h.

1779  {
1780  *os << "satisfies the given predicate";
1781  }
template<typename Predicate >
void testing::internal::TrulyMatcher< Predicate >::DescribeTo ( ::std::ostream *  os) const
inline

Definition at line 1779 of file gmock-matchers.h.

1779  {
1780  *os << "satisfies the given predicate";
1781  }
template<typename Predicate >
void testing::internal::TrulyMatcher< Predicate >::DescribeTo ( ::std::ostream *  os) const
inline

Definition at line 1779 of file gmock-matchers.h.

1779  {
1780  *os << "satisfies the given predicate";
1781  }
template<typename Predicate >
testing::internal::TrulyMatcher< Predicate >::GTEST_DISALLOW_ASSIGN_ ( TrulyMatcher< Predicate >  )
private
template<typename Predicate >
testing::internal::TrulyMatcher< Predicate >::GTEST_DISALLOW_ASSIGN_ ( TrulyMatcher< Predicate >  )
private
template<typename Predicate >
testing::internal::TrulyMatcher< Predicate >::GTEST_DISALLOW_ASSIGN_ ( TrulyMatcher< Predicate >  )
private
template<typename Predicate >
template<typename T >
bool testing::internal::TrulyMatcher< Predicate >::MatchAndExplain ( T x,
MatchResultListener  
) const
inline

Definition at line 1766 of file gmock-matchers.h.

1767  {
1768  // Without the if-statement, MSVC sometimes warns about converting
1769  // a value to bool (warning 4800).
1770  //
1771  // We cannot write 'return !!predicate_(x);' as that doesn't work
1772  // when predicate_(x) returns a class convertible to bool but
1773  // having no operator!().
1774  if (predicate_(x))
1775  return true;
1776  return false;
1777  }
Definition: InvokeTest.cpp:58
template<typename Predicate >
template<typename T >
bool testing::internal::TrulyMatcher< Predicate >::MatchAndExplain ( T x,
MatchResultListener  
) const
inline

Definition at line 1766 of file gmock-matchers.h.

1767  {
1768  // Without the if-statement, MSVC sometimes warns about converting
1769  // a value to bool (warning 4800).
1770  //
1771  // We cannot write 'return !!predicate_(x);' as that doesn't work
1772  // when predicate_(x) returns a class convertible to bool but
1773  // having no operator!().
1774  if (predicate_(x))
1775  return true;
1776  return false;
1777  }
Definition: InvokeTest.cpp:58
template<typename Predicate >
template<typename T >
bool testing::internal::TrulyMatcher< Predicate >::MatchAndExplain ( T x,
MatchResultListener  
) const
inline

Definition at line 1766 of file gmock-matchers.h.

1767  {
1768  // Without the if-statement, MSVC sometimes warns about converting
1769  // a value to bool (warning 4800).
1770  //
1771  // We cannot write 'return !!predicate_(x);' as that doesn't work
1772  // when predicate_(x) returns a class convertible to bool but
1773  // having no operator!().
1774  if (predicate_(x))
1775  return true;
1776  return false;
1777  }
Definition: InvokeTest.cpp:58

Member Data Documentation

template<typename Predicate >
Predicate testing::internal::TrulyMatcher< Predicate >::predicate_
private

Definition at line 1788 of file gmock-matchers.h.


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