Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
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
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ StrEqualityMatcher()

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

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

1299 : string_(str), expect_eq_(expect_eq), case_sensitive_(case_sensitive) {}

Member Function Documentation

◆ DescribeNegationTo()

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

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

1344 {
1345 DescribeToHelper(!expect_eq_, os);
1346 }
os_t os

◆ DescribeTo()

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

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

1340 {
1341 DescribeToHelper(expect_eq_, os);
1342 }

◆ MatchAndExplain() [1/2]

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

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

1320 {
1321 if (s == NULL) {
1322 return !expect_eq_;
1323 }
1324 return MatchAndExplain(StringType(s), listener);
1325 }
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::StrEqualityMatcher< StringType >::MatchAndExplain ( const MatcheeStringType & s,
MatchResultListener *  ) const
inline

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

1333 {
1334 const StringType& s2(s);
1335 const bool eq = case_sensitive_ ? s2 == string_ :
1336 CaseInsensitiveStringEquals(s2, string_);
1337 return expect_eq_ == eq;
1338 }
bool CaseInsensitiveStringEquals(const StringType &s1, const StringType &s2)
Here is the call graph for this function:

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