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

Function test_pmr_insert_allocates

tests/misc/containers.cpp:1594–1603  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1592
1593template <typename Factory>
1594void test_pmr_insert_allocates() {
1595 tracking_memory_resource mr;
1596 typename Factory::container_type c = Factory::create(mr);
1597 for (int i = 0; i < kPmrInsertCount; ++i) {
1598 Factory::insert(c, i);
1599 }
1600 // PMR was used at some point (construction or insert that exceeds inline capacity)
1601 FL_CHECK(mr.allocate_count > 0);
1602 FL_CHECK(c.size() == static_cast<fl::size>(kPmrInsertCount));
1603}
1604
1605template <typename Factory>
1606void test_pmr_clear_empties() {

Callers

nothing calls this directly

Calls 3

createFunction · 0.85
insertFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected