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

#include <gmock-matchers.h>

Public Member Functions

 StrEqualityMatcher (const StringType &str, bool expect_eq, bool case_sensitive)
 
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
 
 StrEqualityMatcher (const StringType &str, bool expect_eq, bool case_sensitive)
 
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
 
 StrEqualityMatcher (const StringType &str, bool expect_eq, bool case_sensitive)
 
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

void DescribeToHelper (bool expect_eq,::std::ostream *os) const
 
 GTEST_DISALLOW_ASSIGN_ (StrEqualityMatcher)
 
void DescribeToHelper (bool expect_eq,::std::ostream *os) const
 
 GTEST_DISALLOW_ASSIGN_ (StrEqualityMatcher)
 
void DescribeToHelper (bool expect_eq,::std::ostream *os) const
 
 GTEST_DISALLOW_ASSIGN_ (StrEqualityMatcher)
 

Private Attributes

const StringType string_
 
const bool expect_eq_
 
const bool case_sensitive_
 

Detailed Description

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

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

Constructor & Destructor Documentation

template<typename StringType >
testing::internal::StrEqualityMatcher< StringType >::StrEqualityMatcher ( const StringType &  str,
bool  expect_eq,
bool  case_sensitive 
)
inline

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

template<typename StringType >
testing::internal::StrEqualityMatcher< StringType >::StrEqualityMatcher ( const StringType &  str,
bool  expect_eq,
bool  case_sensitive 
)
inline

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

template<typename StringType >
testing::internal::StrEqualityMatcher< StringType >::StrEqualityMatcher ( const StringType &  str,
bool  expect_eq,
bool  case_sensitive 
)
inline

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

Member Function Documentation

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

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

1162  {
1164  }
void DescribeToHelper(bool expect_eq,::std::ostream *os) const
template<typename StringType >
void testing::internal::StrEqualityMatcher< StringType >::DescribeNegationTo ( ::std::ostream *  os) const
inline

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

1162  {
1164  }
void DescribeToHelper(bool expect_eq,::std::ostream *os) const
template<typename StringType >
void testing::internal::StrEqualityMatcher< StringType >::DescribeNegationTo ( ::std::ostream *  os) const
inline

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

1162  {
1164  }
void DescribeToHelper(bool expect_eq,::std::ostream *os) const
template<typename StringType >
void testing::internal::StrEqualityMatcher< StringType >::DescribeTo ( ::std::ostream *  os) const
inline

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

1158  {
1160  }
void DescribeToHelper(bool expect_eq,::std::ostream *os) const
template<typename StringType >
void testing::internal::StrEqualityMatcher< StringType >::DescribeTo ( ::std::ostream *  os) const
inline

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

1158  {
1160  }
void DescribeToHelper(bool expect_eq,::std::ostream *os) const
template<typename StringType >
void testing::internal::StrEqualityMatcher< StringType >::DescribeTo ( ::std::ostream *  os) const
inline

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

1158  {
1160  }
void DescribeToHelper(bool expect_eq,::std::ostream *os) const
template<typename StringType >
void testing::internal::StrEqualityMatcher< StringType >::DescribeToHelper ( bool  expect_eq,
::std::ostream *  os 
) const
inlineprivate

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

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

1167  {
1168  *os << (expect_eq ? "is " : "isn't ");
1169  *os << "equal to ";
1170  if (!case_sensitive_) {
1171  *os << "(ignoring case) ";
1172  }
1173  UniversalPrint(string_, os);
1174  }
void UniversalPrint(const T &value,::std::ostream *os)
template<typename StringType >
void testing::internal::StrEqualityMatcher< StringType >::DescribeToHelper ( bool  expect_eq,
::std::ostream *  os 
) const
inlineprivate

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

References testing::internal::UniversalPrint().

1167  {
1168  *os << (expect_eq ? "is " : "isn't ");
1169  *os << "equal to ";
1170  if (!case_sensitive_) {
1171  *os << "(ignoring case) ";
1172  }
1173  UniversalPrint(string_, os);
1174  }
void UniversalPrint(const T &value,::std::ostream *os)
template<typename StringType >
void testing::internal::StrEqualityMatcher< StringType >::DescribeToHelper ( bool  expect_eq,
::std::ostream *  os 
) const
inlineprivate

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

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

1167  {
1168  *os << (expect_eq ? "is " : "isn't ");
1169  *os << "equal to ";
1170  if (!case_sensitive_) {
1171  *os << "(ignoring case) ";
1172  }
1173  UniversalPrint(string_, os);
1174  }
void UniversalPrint(const T &value,::std::ostream *os)
template<typename StringType >
testing::internal::StrEqualityMatcher< StringType >::GTEST_DISALLOW_ASSIGN_ ( StrEqualityMatcher< StringType >  )
private
template<typename StringType >
testing::internal::StrEqualityMatcher< StringType >::GTEST_DISALLOW_ASSIGN_ ( StrEqualityMatcher< StringType >  )
private
template<typename StringType >
testing::internal::StrEqualityMatcher< StringType >::GTEST_DISALLOW_ASSIGN_ ( StrEqualityMatcher< StringType >  )
private
template<typename StringType >
template<typename CharType >
bool testing::internal::StrEqualityMatcher< StringType >::MatchAndExplain ( CharType *  s,
MatchResultListener listener 
) const
inline

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

1138  {
1139  if (s == NULL) {
1140  return !expect_eq_;
1141  }
1142  return MatchAndExplain(StringType(s), listener);
1143  }
bool MatchAndExplain(CharType *s, MatchResultListener *listener) const
static set< string > s
template<typename StringType >
template<typename CharType >
bool testing::internal::StrEqualityMatcher< StringType >::MatchAndExplain ( CharType *  s,
MatchResultListener listener 
) const
inline

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

1138  {
1139  if (s == NULL) {
1140  return !expect_eq_;
1141  }
1142  return MatchAndExplain(StringType(s), listener);
1143  }
bool MatchAndExplain(CharType *s, MatchResultListener *listener) const
static set< string > s
template<typename StringType >
template<typename CharType >
bool testing::internal::StrEqualityMatcher< StringType >::MatchAndExplain ( CharType *  s,
MatchResultListener listener 
) const
inline

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

1138  {
1139  if (s == NULL) {
1140  return !expect_eq_;
1141  }
1142  return MatchAndExplain(StringType(s), listener);
1143  }
bool MatchAndExplain(CharType *s, MatchResultListener *listener) const
static set< string > s
template<typename StringType >
template<typename MatcheeStringType >
bool testing::internal::StrEqualityMatcher< StringType >::MatchAndExplain ( const MatcheeStringType &  s,
MatchResultListener  
) const
inline

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

References testing::internal::CaseInsensitiveStringEquals().

1151  {
1152  const StringType& s2(s);
1153  const bool eq = case_sensitive_ ? s2 == string_ :
1155  return expect_eq_ == eq;
1156  }
static set< string > s
bool CaseInsensitiveStringEquals(const StringType &s1, const StringType &s2)
template<typename StringType >
template<typename MatcheeStringType >
bool testing::internal::StrEqualityMatcher< StringType >::MatchAndExplain ( const MatcheeStringType &  s,
MatchResultListener  
) const
inline

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

References testing::internal::CaseInsensitiveStringEquals().

1151  {
1152  const StringType& s2(s);
1153  const bool eq = case_sensitive_ ? s2 == string_ :
1155  return expect_eq_ == eq;
1156  }
static set< string > s
bool CaseInsensitiveStringEquals(const StringType &s1, const StringType &s2)
template<typename StringType >
template<typename MatcheeStringType >
bool testing::internal::StrEqualityMatcher< StringType >::MatchAndExplain ( const MatcheeStringType &  s,
MatchResultListener  
) const
inline

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

References testing::internal::CaseInsensitiveStringEquals().

1151  {
1152  const StringType& s2(s);
1153  const bool eq = case_sensitive_ ? s2 == string_ :
1155  return expect_eq_ == eq;
1156  }
static set< string > s
bool CaseInsensitiveStringEquals(const StringType &s1, const StringType &s2)

Member Data Documentation

template<typename StringType >
const bool testing::internal::StrEqualityMatcher< StringType >::case_sensitive_
private

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

template<typename StringType >
const bool testing::internal::StrEqualityMatcher< StringType >::expect_eq_
private

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

template<typename StringType >
const StringType testing::internal::StrEqualityMatcher< StringType >::string_
private

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


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