#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "base/containers/id_map.h"
#include <stdint.h>
#include <functional>
#include <memory>
#include "base/memory/raw_ptr.h"
#include "base/test/gtest_util.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base::test::id_map {
struct RepeatingKeyType { … };
}
namespace std {
template <>
struct hash<::base::test::id_map::RepeatingKeyType> { … };
}
namespace base {
namespace {
class TestObject { … };
class DestructorCounter { … };
}
TEST(IDMapTest, Basic) { … }
TEST(IDMapTest, IteratorRemainsValidWhenRemovingCurrentElement) { … }
TEST(IDMapTest, IteratorRemainsValidWhenRemovingOtherElements) { … }
TEST(IDMapTest, CopyIterator) { … }
TEST(IDMapTest, AssignIterator) { … }
TEST(IDMapTest, IteratorRemainsValidWhenClearing) { … }
TEST(IDMapTest, OwningPointersDeletesThemOnRemove) { … }
TEST(IDMapTest, OwningPointersDeletesThemOnClear) { … }
TEST(IDMapTest, OwningPointersDeletesThemOnDestruct) { … }
TEST(IDMapTest, Int64KeyType) { … }
TEST(IDMapTest, RemovedValueHandling) { … }
}