| 2466 | } |
| 2467 | |
| 2468 | bool match(std::vector<T> const &v) const override { |
| 2469 | // !TBD: This currently works if all elements can be compared using != |
| 2470 | // - a more general approach would be via a compare template that defaults |
| 2471 | // to using !=. but could be specialised for, e.g. std::vector<T> etc |
| 2472 | // - then just call that directly |
| 2473 | if (m_comparator.size() != v.size()) |
| 2474 | return false; |
| 2475 | for (std::size_t i = 0; i < v.size(); ++i) |
| 2476 | if (m_comparator[i] != v[i]) |
| 2477 | return false; |
| 2478 | return true; |
| 2479 | } |
| 2480 | std::string describe() const override { |
| 2481 | return "Equals: " + ::Catch::Detail::stringify(m_comparator); |
| 2482 | } |