MCPcopy Create free account
hub / github.com/comaps/comaps / Sort

Function Sort

generator/generator_tests/cluster_finder_tests.cpp:80–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78using ClusterT = std::vector<NamedPoint const *>;
79
80void Sort(std::vector<ClusterT> & data)
81{
82 for (auto & d : data)
83 std::sort(std::begin(d), std::end(d), [](NamedPoint const * l, NamedPoint const * r) { return l->m_id < r->m_id; });
84 std::sort(std::begin(data), std::end(data), [](ClusterT const & l, ClusterT const & r)
85 {
86 TEST(!l.empty(), ());
87 TEST(!r.empty(), ());
88 return l.front()->m_id < r.front()->m_id;
89 });
90}
91
92void Test(std::vector<NamedPoint> const & input, std::vector<ClusterT> & expected)
93{

Callers 1

TestFunction · 0.70

Calls 5

TESTFunction · 0.85
frontMethod · 0.80
beginFunction · 0.50
endFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected