| 2436 | } |
| 2437 | |
| 2438 | bool match(std::vector<T> const &v) const override { |
| 2439 | // !TBD: see note in EqualsMatcher |
| 2440 | if (m_comparator.size() > v.size()) |
| 2441 | return false; |
| 2442 | for (auto const &comparator : m_comparator) { |
| 2443 | auto present = false; |
| 2444 | for (const auto &el : v) { |
| 2445 | if (el == comparator) { |
| 2446 | present = true; |
| 2447 | break; |
| 2448 | } |
| 2449 | } |
| 2450 | if (!present) { |
| 2451 | return false; |
| 2452 | } |
| 2453 | } |
| 2454 | return true; |
| 2455 | } |
| 2456 | std::string describe() const override { |
| 2457 | return "Contains: " + ::Catch::Detail::stringify(m_comparator); |
| 2458 | } |