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

Function test_map_iteration

tests/misc/containers.cpp:546–558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544// Iteration for map containers
545template<typename Map>
546void test_map_iteration() {
547 Map m;
548 m.insert(fl::make_pair(1, 100));
549 m.insert(fl::make_pair(2, 200));
550 m.insert(fl::make_pair(3, 300));
551
552 int sum = 0;
553 for (auto it = m.begin(); it != m.end(); ++it) {
554 sum += it->second;
555 }
556
557 FL_CHECK(sum == 600);
558}
559
560// Size and clear for map containers
561template<typename Map>

Callers

nothing calls this directly

Calls 4

make_pairFunction · 0.85
insertMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected