proxygen
testing::internal::StartsWithMatcher< StringType > Class Template Reference

#include <gmock-matchers.h>

Public Member Functions

 StartsWithMatcher (const StringType &prefix)
 
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
 
 StartsWithMatcher (const StringType &prefix)
 
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
 
 StartsWithMatcher (const StringType &prefix)
 
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_ (StartsWithMatcher)
 
 GTEST_DISALLOW_ASSIGN_ (StartsWithMatcher)
 
 GTEST_DISALLOW_ASSIGN_ (StartsWithMatcher)
 

Private Attributes

const StringType prefix_
 

Detailed Description

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

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

Constructor & Destructor Documentation

template<typename StringType >
testing::internal::StartsWithMatcher< StringType >::StartsWithMatcher ( const StringType &  prefix)
inlineexplicit

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

1236  : prefix_(prefix) {
1237  }
bool prefix(Cursor &c, uint32_t expected)
template<typename StringType >
testing::internal::StartsWithMatcher< StringType >::StartsWithMatcher ( const StringType &  prefix)
inlineexplicit

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

1236  : prefix_(prefix) {
1237  }
bool prefix(Cursor &c, uint32_t expected)
template<typename StringType >
testing::internal::StartsWithMatcher< StringType >::StartsWithMatcher ( const StringType &  prefix)
inlineexplicit

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

1236  : prefix_(prefix) {
1237  }
bool prefix(Cursor &c, uint32_t expected)

Member Function Documentation

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

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

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

1266  {
1267  *os << "doesn't start with ";
1268  UniversalPrint(prefix_, os);
1269  }
void UniversalPrint(const T &value,::std::ostream *os)
template<typename StringType >
void testing::internal::StartsWithMatcher< StringType >::DescribeNegationTo ( ::std::ostream *  os) const
inline

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

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

1266  {
1267  *os << "doesn't start with ";
1268  UniversalPrint(prefix_, os);
1269  }
void UniversalPrint(const T &value,::std::ostream *os)
template<typename StringType >
void testing::internal::StartsWithMatcher< StringType >::DescribeNegationTo ( ::std::ostream *  os) const
inline

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

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

1266  {
1267  *os << "doesn't start with ";
1268  UniversalPrint(prefix_, os);
1269  }
void UniversalPrint(const T &value,::std::ostream *os)
template<typename StringType >
void testing::internal::StartsWithMatcher< StringType >::DescribeTo ( ::std::ostream *  os) const
inline

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

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

1261  {
1262  *os << "starts with ";
1263  UniversalPrint(prefix_, os);
1264  }
void UniversalPrint(const T &value,::std::ostream *os)
template<typename StringType >
void testing::internal::StartsWithMatcher< StringType >::DescribeTo ( ::std::ostream *  os) const
inline

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

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

1261  {
1262  *os << "starts with ";
1263  UniversalPrint(prefix_, os);
1264  }
void UniversalPrint(const T &value,::std::ostream *os)
template<typename StringType >
void testing::internal::StartsWithMatcher< StringType >::DescribeTo ( ::std::ostream *  os) const
inline

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

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

1261  {
1262  *os << "starts with ";
1263  UniversalPrint(prefix_, os);
1264  }
void UniversalPrint(const T &value,::std::ostream *os)
template<typename StringType >
testing::internal::StartsWithMatcher< StringType >::GTEST_DISALLOW_ASSIGN_ ( StartsWithMatcher< StringType >  )
private
template<typename StringType >
testing::internal::StartsWithMatcher< StringType >::GTEST_DISALLOW_ASSIGN_ ( StartsWithMatcher< StringType >  )
private
template<typename StringType >
testing::internal::StartsWithMatcher< StringType >::GTEST_DISALLOW_ASSIGN_ ( StartsWithMatcher< StringType >  )
private
template<typename StringType >
template<typename CharType >
bool testing::internal::StartsWithMatcher< StringType >::MatchAndExplain ( CharType *  s,
MatchResultListener listener 
) const
inline

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

1245  {
1246  return s != NULL && MatchAndExplain(StringType(s), listener);
1247  }
bool MatchAndExplain(CharType *s, MatchResultListener *listener) const
static set< string > s
template<typename StringType >
template<typename CharType >
bool testing::internal::StartsWithMatcher< StringType >::MatchAndExplain ( CharType *  s,
MatchResultListener listener 
) const
inline

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

1245  {
1246  return s != NULL && MatchAndExplain(StringType(s), listener);
1247  }
bool MatchAndExplain(CharType *s, MatchResultListener *listener) const
static set< string > s
template<typename StringType >
template<typename CharType >
bool testing::internal::StartsWithMatcher< StringType >::MatchAndExplain ( CharType *  s,
MatchResultListener listener 
) const
inline

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

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

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

References prefix_.

1255  {
1256  const StringType& s2(s);
1257  return s2.length() >= prefix_.length() &&
1258  s2.substr(0, prefix_.length()) == prefix_;
1259  }
static set< string > s
template<typename StringType >
template<typename MatcheeStringType >
bool testing::internal::StartsWithMatcher< StringType >::MatchAndExplain ( const MatcheeStringType &  s,
MatchResultListener  
) const
inline

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

References prefix_.

1255  {
1256  const StringType& s2(s);
1257  return s2.length() >= prefix_.length() &&
1258  s2.substr(0, prefix_.length()) == prefix_;
1259  }
static set< string > s
template<typename StringType >
template<typename MatcheeStringType >
bool testing::internal::StartsWithMatcher< StringType >::MatchAndExplain ( const MatcheeStringType &  s,
MatchResultListener  
) const
inline

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

References prefix_.

1255  {
1256  const StringType& s2(s);
1257  return s2.length() >= prefix_.length() &&
1258  s2.substr(0, prefix_.length()) == prefix_;
1259  }
static set< string > s

Member Data Documentation

template<typename StringType >
const StringType testing::internal::StartsWithMatcher< StringType >::prefix_
private

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


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