---------------------------------------------------------------------
| 122 | |
| 123 | //--------------------------------------------------------------------- |
| 124 | bool WildcardCoverageFilter::Match( |
| 125 | const std::wstring& str, |
| 126 | const Filter& filter, |
| 127 | std::wostream& ostr) const |
| 128 | { |
| 129 | const auto* selectedRegEx = MatchAny(str, filter.selectedWildcards); |
| 130 | |
| 131 | if (!selectedRegEx) |
| 132 | { |
| 133 | ostr << L": " << str << L" is skipped because it matches no selected patterns"; |
| 134 | return false; |
| 135 | } |
| 136 | |
| 137 | const auto* excludedRegEx = MatchAny(str, filter.excludedWildcards); |
| 138 | |
| 139 | if (excludedRegEx) |
| 140 | { |
| 141 | ostr << L": " << str << L" is not selected because it matches excluded pattern: " << *excludedRegEx; |
| 142 | return false; |
| 143 | } |
| 144 | |
| 145 | ostr << L": " << str << L" is selected because it matches selected pattern: " << *selectedRegEx;; |
| 146 | return true; |
| 147 | } |
| 148 | } |