MCPcopy Create free account
hub / github.com/Tessil/ordered-map / BOOST_AUTO_TEST_CASE

Function BOOST_AUTO_TEST_CASE

tests/custom_allocator_tests.cpp:122–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120BOOST_AUTO_TEST_SUITE(test_custom_allocator)
121
122BOOST_AUTO_TEST_CASE(test_custom_allocator_1) {
123 // nb_global_new = 0;
124 nb_custom_allocs = 0;
125
126 tsl::ordered_map<int, int, std::hash<int>, std::equal_to<int>,
127 custom_allocator<std::pair<int, int>>>
128 map;
129
130 const int nb_elements = 1000;
131 for (int i = 0; i < nb_elements; i++) {
132 map.insert({i, i * 2});
133 }
134
135 BOOST_CHECK_NE(nb_custom_allocs, 0u);
136 // BOOST_CHECK_EQUAL(nb_global_new, 0);
137}
138
139BOOST_AUTO_TEST_SUITE_END()

Callers

nothing calls this directly

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected