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

Function test_container_reverse_iterators

tests/test_container_helpers.h:395–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

393// Verifies: rbegin/rend exist and work correctly after move
394template<typename Container>
395void test_container_reverse_iterators() {
396 Container source;
397 source.push_back(10);
398 source.push_back(20);
399 source.push_back(30);
400
401 // Test reverse iterators exist
402 FL_CHECK(source.rbegin() != source.rend());
403 auto rit = source.rbegin();
404 FL_CHECK(*rit == 30); // Last element first
405
406 // Move and verify
407 Container destination = fl::move(source);
408 FL_CHECK(source.rbegin() == source.rend()); // Empty
409 FL_CHECK(destination.rbegin() != destination.rend());
410 FL_CHECK(*destination.rbegin() == 30);
411}
412
413// ============================================================================
414// TIER 2: Sequential Container Operations (Insert, Erase, Resize, etc.)

Callers

nothing calls this directly

Calls 3

push_backMethod · 0.45
rbeginMethod · 0.45
rendMethod · 0.45

Tested by

no test coverage detected