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

Function test_sequential_insert_erase

tests/misc/containers.cpp:819–839  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

817
818template<typename Container>
819void test_sequential_insert_erase() {
820 Container c;
821 c.push_back(10);
822 c.push_back(30);
823
824 FL_CHECK(c.size() == 2);
825 FL_CHECK(c.front() == 10);
826 FL_CHECK(c.back() == 30);
827
828 // Test insert (if supported)
829 auto it = c.begin();
830 ++it;
831 c.insert(it, 20);
832 FL_CHECK(c.size() == 3);
833
834 // Test erase (if supported)
835 it = c.begin();
836 ++it;
837 c.erase(it);
838 FL_CHECK(c.size() == 2);
839}
840
841// ============================================================================
842// Capacity Management Contract Test Functions

Callers

nothing calls this directly

Calls 7

push_backMethod · 0.45
sizeMethod · 0.45
frontMethod · 0.45
backMethod · 0.45
beginMethod · 0.45
insertMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected