Fixing memory leak with RefPtr
This commit is contained in:
@@ -31,10 +31,13 @@ BOOST_AUTO_TEST_CASE(for_each)
|
||||
map[6] = 4;
|
||||
map[4] = 7;
|
||||
int count = 0;
|
||||
for (auto entry : map)
|
||||
std::cout << "Map start" << std::endl;
|
||||
for(auto it = map.begin(); it != map.end(); ++it)
|
||||
{
|
||||
std::cout << (*it).key << std::endl;
|
||||
count++;
|
||||
}
|
||||
std::cout << "Map end" << std::endl;
|
||||
BOOST_REQUIRE_EQUAL(count, 4);
|
||||
}
|
||||
|
||||
@@ -44,6 +47,8 @@ BOOST_AUTO_TEST_CASE(key_exists)
|
||||
map[2] = 3;
|
||||
BOOST_REQUIRE_EQUAL(map.exists(2), true);
|
||||
BOOST_REQUIRE_EQUAL(map.exists(4), false);
|
||||
map.erase(2);
|
||||
BOOST_REQUIRE_EQUAL(map.exists(2), false);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(custom_key)
|
||||
|
||||
Reference in New Issue
Block a user