Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
testing::internal::EndsWithMatcher< StringType > Class Template Reference

#include <gmock-matchers.h>

Public Member Functions

 EndsWithMatcher (const StringType &suffix)
 
template<typename CharType >
bool MatchAndExplain (CharType *s, MatchResultListener *listener) const
 
template<typename MatcheeStringType >
bool MatchAndExplain (const MatcheeStringType &s, MatchResultListener *) const
 
void DescribeTo (::std::ostream *os) const
 
void DescribeNegationTo (::std::ostream *os) const
 

Detailed Description

template<typename StringType>
class testing::internal::EndsWithMatcher< StringType >

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

Constructor & Destructor Documentation

◆ EndsWithMatcher()

template<typename StringType >
testing::internal::EndsWithMatcher< StringType >::EndsWithMatcher ( const StringType & suffix)
inlineexplicit

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

1491: suffix_(suffix) {}

Member Function Documentation

◆ DescribeNegationTo()

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

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

1533 {
1534 *os << "doesn't end with ";
1535 UniversalPrint(suffix_, os);
1536 }
os_t os
void UniversalPrint(const T &value, ::std::ostream *os)
Here is the call graph for this function:

◆ DescribeTo()

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

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

1528 {
1529 *os << "ends with ";
1530 UniversalPrint(suffix_, os);
1531 }
Here is the call graph for this function:

◆ MatchAndExplain() [1/2]

template<typename StringType >
template<typename CharType >
bool testing::internal::EndsWithMatcher< StringType >::MatchAndExplain ( CharType * s,
MatchResultListener * listener ) const
inline

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

1512 {
1513 return s != NULL && MatchAndExplain(StringType(s), listener);
1514 }
bool MatchAndExplain(CharType *s, MatchResultListener *listener) const
char * s
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatchAndExplain() [2/2]

template<typename StringType >
template<typename MatcheeStringType >
bool testing::internal::EndsWithMatcher< StringType >::MatchAndExplain ( const MatcheeStringType & s,
MatchResultListener *  ) const
inline

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

1522 {
1523 const StringType& s2(s);
1524 return s2.length() >= suffix_.length() &&
1525 s2.substr(s2.length() - suffix_.length()) == suffix_;
1526 }

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