Fixing memory leak with RefPtr

This commit is contained in:
Dynamitos
2020-04-01 02:17:49 +02:00
parent 62c2d37cb3
commit 3ba8f2c2a0
37 changed files with 1675 additions and 270 deletions
+6 -1
View File
@@ -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)