19 #include "gmock/gmock.h" 20 #include "gtest/gtest.h" 24 namespace container_internal {
27 using ::testing::Pointee;
29 struct Policy : node_hash_policy<int&, Policy> {
31 using init_type = int;
33 template <
class Alloc>
34 static int* new_element(Alloc*
alloc,
int value) {
35 return new int(value);
38 template <
class Alloc>
39 static void delete_element(Alloc*
alloc,
int* elem) {
44 using NodePolicy = hash_policy_traits<Policy>;
46 struct NodeTest : ::testing::Test {
52 TEST_F(NodeTest, ConstructDestroy) {
54 EXPECT_THAT(
a, Pointee(42));
static std::function< void(void *, Slot *)> destroy
TEST_F(GraphCyclesTest, NoCycle)
static std::function< void(void *, Slot *, Slot *)> transfer
static std::function< void(void *, Slot *, Slot)> construct
std::allocator< int > alloc