Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
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
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ TrulyMatcher()

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

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

1955: predicate_(pred) {}

Member Function Documentation

◆ DescribeNegationTo()

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

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

1979 {
1980 *os << "doesn't satisfy the given predicate";
1981 }
os_t os

◆ DescribeTo()

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

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

1975 {
1976 *os << "satisfies the given predicate";
1977 }

◆ MatchAndExplain()

template<typename Predicate >
template<typename T >
bool testing::internal::TrulyMatcher< Predicate >::MatchAndExplain ( T & x,
MatchResultListener *  ) const
inline

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

1963 {
1964 // Without the if-statement, MSVC sometimes warns about converting
1965 // a value to bool (warning 4800).
1966 //
1967 // We cannot write 'return !!predicate_(x);' as that doesn't work
1968 // when predicate_(x) returns a class convertible to bool but
1969 // having no operator!().
1970 if (predicate_(x))
1971 return true;
1972 return false;
1973 }

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