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

Detailed Description

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

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

Constructor & Destructor Documentation

◆ StartsWithMatcher()

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

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

1431 : prefix_(prefix) {
1432 }

Member Function Documentation

◆ DescribeNegationTo()

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

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

1474 {
1475 *os << "doesn't start with ";
1476 UniversalPrint(prefix_, os);
1477 }
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::StartsWithMatcher< StringType >::DescribeTo ( ::std::ostream * os) const
inline

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

1469 {
1470 *os << "starts with ";
1471 UniversalPrint(prefix_, os);
1472 }
Here is the call graph for this function:

◆ MatchAndExplain() [1/2]

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

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

1453 {
1454 return s != NULL && MatchAndExplain(StringType(s), listener);
1455 }
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::StartsWithMatcher< StringType >::MatchAndExplain ( const MatcheeStringType & s,
MatchResultListener *  ) const
inline

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

1463 {
1464 const StringType& s2(s);
1465 return s2.length() >= prefix_.length() &&
1466 s2.substr(0, prefix_.length()) == prefix_;
1467 }

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