| 1042 | inline std::string makeString( const char* str ) { return str ? std::string( str ) : std::string(); } |
| 1043 | |
| 1044 | struct CasedString |
| 1045 | { |
| 1046 | CasedString( std::string const& str, CaseSensitive::Choice caseSensitivity ) |
| 1047 | : m_caseSensitivity( caseSensitivity ), |
| 1048 | m_str( adjustString( str ) ) |
| 1049 | {} |
| 1050 | std::string adjustString( std::string const& str ) const { |
| 1051 | return m_caseSensitivity == CaseSensitive::No |
| 1052 | ? toLower( str ) |
| 1053 | : str; |
| 1054 | |
| 1055 | } |
| 1056 | std::string toStringSuffix() const |
| 1057 | { |
| 1058 | return m_caseSensitivity == CaseSensitive::No |
| 1059 | ? " (case insensitive)" |
| 1060 | : ""; |
| 1061 | } |
| 1062 | CaseSensitive::Choice m_caseSensitivity; |
| 1063 | std::string m_str; |
| 1064 | }; |
| 1065 | |
| 1066 | struct Equals : MatcherImpl<Equals, std::string> { |
| 1067 | Equals( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes ) |
nothing calls this directly
no outgoing calls
no test coverage detected