| 10847 | namespace Catch { |
| 10848 | |
| 10849 | WildcardPattern::WildcardPattern(std::string const &pattern, CaseSensitive::Choice caseSensitivity) |
| 10850 | : m_caseSensitivity(caseSensitivity), m_pattern(adjustCase(pattern)) { |
| 10851 | if (startsWith(m_pattern, '*')) { |
| 10852 | m_pattern = m_pattern.substr(1); |
| 10853 | m_wildcard = WildcardAtStart; |
| 10854 | } |
| 10855 | if (endsWith(m_pattern, '*')) { |
| 10856 | m_pattern = m_pattern.substr(0, m_pattern.size() - 1); |
| 10857 | m_wildcard = static_cast<WildcardPosition>(m_wildcard | WildcardAtEnd); |
| 10858 | } |
| 10859 | } |
| 10860 | |
| 10861 | bool WildcardPattern::matches(std::string const &str) const { |
| 10862 | switch (m_wildcard) { |
nothing calls this directly
no test coverage detected