Commit 28c95215 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Add unit test to check that connected components are deallocated.

parent 41c7f678
......@@ -315,6 +315,17 @@ BOOST_AUTO_TEST_CASE (Roadmap1) {
BOOST_CHECK (r->pathExists ());
std::cout << *r << std::endl;
// Check that memory if well deallocated.
std::set<ConnectedComponentWkPtr_t> ccs;
for (ConnectedComponents_t::const_iterator _cc = r->connectedComponents().begin();
_cc != r->connectedComponents().end(); ++_cc)
ccs.insert(*_cc);
r.reset();
for (std::set<ConnectedComponentWkPtr_t>::const_iterator _cc = ccs.begin();
_cc != ccs.begin(); ++_cc) {
BOOST_CHECK (! _cc->lock());
}
}
BOOST_AUTO_TEST_CASE (nearestNeighbor) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment