5#include <unordered_map>
9#include "gtest/gtest.h"
14TEST(ContainerTest, MapEraseIf) {
15 std::unordered_map<int, int> map = {{0, 1}, {2, 3}, {4, 5}};
17 fml::erase_if(map, [](std::unordered_map<int, int>::iterator it) {
18 return it->first == 0 || it->second == 5;
21 EXPECT_EQ(map.size(), 1u);
22 EXPECT_TRUE(map.find(2) != map.end());
void erase_if(Collection &container, const std::function< bool(typename Collection::iterator)> &predicate)
TEST(MallocMapping, EmptyContructor)