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

#include <gmock-matchers.h>

Public Member Functions

 HasSubstrMatcher (const StringType &substring)
 
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::HasSubstrMatcher< StringType >

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

Constructor & Destructor Documentation

◆ HasSubstrMatcher()

template<typename StringType >
testing::internal::HasSubstrMatcher< StringType >::HasSubstrMatcher ( const StringType & substring)
inlineexplicit

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

1372 : substring_(substring) {}

Member Function Documentation

◆ DescribeNegationTo()

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

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

1414 {
1415 *os << "has no substring ";
1416 UniversalPrint(substring_, os);
1417 }
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::HasSubstrMatcher< StringType >::DescribeTo ( ::std::ostream * os) const
inline

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

1409 {
1410 *os << "has substring ";
1411 UniversalPrint(substring_, os);
1412 }
Here is the call graph for this function:

◆ MatchAndExplain() [1/2]

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

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

1393 {
1394 return s != NULL && MatchAndExplain(StringType(s), listener);
1395 }
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::HasSubstrMatcher< StringType >::MatchAndExplain ( const MatcheeStringType & s,
MatchResultListener *  ) const
inline

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

1403 {
1404 const StringType& s2(s);
1405 return s2.find(substring_) != StringType::npos;
1406 }

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