MCPcopy Create free account
hub / github.com/FastLED/FastLED / test_pmr_clear_empties

Function test_pmr_clear_empties

tests/misc/containers.cpp:1606–1616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1604
1605template <typename Factory>
1606void test_pmr_clear_empties() {
1607 tracking_memory_resource mr;
1608 typename Factory::container_type c = Factory::create(mr);
1609 for (int i = 0; i < kPmrInsertCount; ++i) {
1610 Factory::insert(c, i);
1611 }
1612 FL_CHECK(mr.allocate_count > 0);
1613 c.clear();
1614 FL_CHECK(c.size() == 0);
1615 FL_CHECK(c.empty());
1616}
1617
1618template <typename Factory>
1619void test_pmr_remove_one() {

Callers

nothing calls this directly

Calls 5

createFunction · 0.85
insertFunction · 0.50
clearMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected