MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/TriangleMeshDistance / match

Method match

tests/catch.hpp:3230–3247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3228 ContainsMatcher(std::vector<T> const &comparator) : m_comparator( comparator ) {}
3229
3230 bool match(std::vector<T> const &v) const override {
3231 // !TBD: see note in EqualsMatcher
3232 if (m_comparator.size() > v.size())
3233 return false;
3234 for (auto const& comparator : m_comparator) {
3235 auto present = false;
3236 for (const auto& el : v) {
3237 if (el == comparator) {
3238 present = true;
3239 break;
3240 }
3241 }
3242 if (!present) {
3243 return false;
3244 }
3245 }
3246 return true;
3247 }
3248 std::string describe() const override {
3249 return "Contains: " + ::Catch::Detail::stringify( m_comparator );
3250 }

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected