Electroneum
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 1757 of file gmock-matchers.h.

Constructor & Destructor Documentation

◆ TrulyMatcher()

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

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

Member Function Documentation

◆ DescribeNegationTo()

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 }

◆ DescribeTo()

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 }

◆ MatchAndExplain()

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 }

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-matchers.h