proxygen
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
 
 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
 
 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
 

Private Member Functions

 GTEST_DISALLOW_ASSIGN_ (EndsWithMatcher)
 
 GTEST_DISALLOW_ASSIGN_ (EndsWithMatcher)
 
 GTEST_DISALLOW_ASSIGN_ (EndsWithMatcher)
 

Private Attributes

const StringType suffix_
 

Detailed Description

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

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

Constructor & Destructor Documentation

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

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

1283 : suffix_(suffix) {}
const char * suffix
Definition: String.cpp:272
template<typename StringType >
testing::internal::EndsWithMatcher< StringType >::EndsWithMatcher ( const StringType &  suffix)
inlineexplicit

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

1283 : suffix_(suffix) {}
const char * suffix
Definition: String.cpp:272
template<typename StringType >
testing::internal::EndsWithMatcher< StringType >::EndsWithMatcher ( const StringType &  suffix)
inlineexplicit

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

1283 : suffix_(suffix) {}
const char * suffix
Definition: String.cpp:272

Member Function Documentation

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

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

References testing::internal::UniversalPrint().

1312  {
1313  *os << "doesn't end with ";
1314  UniversalPrint(suffix_, os);
1315  }
void UniversalPrint(const T &value,::std::ostream *os)
template<typename StringType >
void testing::internal::EndsWithMatcher< StringType >::DescribeNegationTo ( ::std::ostream *  os) const
inline

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

References GTEST_DISALLOW_ASSIGN_, and testing::internal::UniversalPrint().

1312  {
1313  *os << "doesn't end with ";
1314  UniversalPrint(suffix_, os);
1315  }
void UniversalPrint(const T &value,::std::ostream *os)
template<typename StringType >
void testing::internal::EndsWithMatcher< StringType >::DescribeNegationTo ( ::std::ostream *  os) const
inline

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

References GTEST_DISALLOW_ASSIGN_, and testing::internal::UniversalPrint().

1312  {
1313  *os << "doesn't end with ";
1314  UniversalPrint(suffix_, os);
1315  }
void UniversalPrint(const T &value,::std::ostream *os)
template<typename StringType >
void testing::internal::EndsWithMatcher< StringType >::DescribeTo ( ::std::ostream *  os) const
inline

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

References testing::internal::UniversalPrint().

1307  {
1308  *os << "ends with ";
1309  UniversalPrint(suffix_, os);
1310  }
void UniversalPrint(const T &value,::std::ostream *os)
template<typename StringType >
void testing::internal::EndsWithMatcher< StringType >::DescribeTo ( ::std::ostream *  os) const
inline

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

References testing::internal::UniversalPrint().

1307  {
1308  *os << "ends with ";
1309  UniversalPrint(suffix_, os);
1310  }
void UniversalPrint(const T &value,::std::ostream *os)
template<typename StringType >
void testing::internal::EndsWithMatcher< StringType >::DescribeTo ( ::std::ostream *  os) const
inline

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

References testing::internal::UniversalPrint().

1307  {
1308  *os << "ends with ";
1309  UniversalPrint(suffix_, os);
1310  }
void UniversalPrint(const T &value,::std::ostream *os)
template<typename StringType >
testing::internal::EndsWithMatcher< StringType >::GTEST_DISALLOW_ASSIGN_ ( EndsWithMatcher< StringType >  )
private
template<typename StringType >
testing::internal::EndsWithMatcher< StringType >::GTEST_DISALLOW_ASSIGN_ ( EndsWithMatcher< StringType >  )
private
template<typename StringType >
testing::internal::EndsWithMatcher< StringType >::GTEST_DISALLOW_ASSIGN_ ( EndsWithMatcher< StringType >  )
private
template<typename StringType >
template<typename CharType >
bool testing::internal::EndsWithMatcher< StringType >::MatchAndExplain ( CharType *  s,
MatchResultListener listener 
) const
inline

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

1291  {
1292  return s != NULL && MatchAndExplain(StringType(s), listener);
1293  }
bool MatchAndExplain(CharType *s, MatchResultListener *listener) const
static set< string > s
template<typename StringType >
template<typename CharType >
bool testing::internal::EndsWithMatcher< StringType >::MatchAndExplain ( CharType *  s,
MatchResultListener listener 
) const
inline

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

1291  {
1292  return s != NULL && MatchAndExplain(StringType(s), listener);
1293  }
bool MatchAndExplain(CharType *s, MatchResultListener *listener) const
static set< string > s
template<typename StringType >
template<typename CharType >
bool testing::internal::EndsWithMatcher< StringType >::MatchAndExplain ( CharType *  s,
MatchResultListener listener 
) const
inline

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

1291  {
1292  return s != NULL && MatchAndExplain(StringType(s), listener);
1293  }
bool MatchAndExplain(CharType *s, MatchResultListener *listener) const
static set< string > s
template<typename StringType >
template<typename MatcheeStringType >
bool testing::internal::EndsWithMatcher< StringType >::MatchAndExplain ( const MatcheeStringType &  s,
MatchResultListener  
) const
inline

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

1301  {
1302  const StringType& s2(s);
1303  return s2.length() >= suffix_.length() &&
1304  s2.substr(s2.length() - suffix_.length()) == suffix_;
1305  }
static set< string > s
template<typename StringType >
template<typename MatcheeStringType >
bool testing::internal::EndsWithMatcher< StringType >::MatchAndExplain ( const MatcheeStringType &  s,
MatchResultListener  
) const
inline

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

1301  {
1302  const StringType& s2(s);
1303  return s2.length() >= suffix_.length() &&
1304  s2.substr(s2.length() - suffix_.length()) == suffix_;
1305  }
static set< string > s
template<typename StringType >
template<typename MatcheeStringType >
bool testing::internal::EndsWithMatcher< StringType >::MatchAndExplain ( const MatcheeStringType &  s,
MatchResultListener  
) const
inline

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

1301  {
1302  const StringType& s2(s);
1303  return s2.length() >= suffix_.length() &&
1304  s2.substr(s2.length() - suffix_.length()) == suffix_;
1305  }
static set< string > s

Member Data Documentation

template<typename StringType >
const StringType testing::internal::EndsWithMatcher< StringType >::suffix_
private

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


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