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

Function test_map_count

tests/misc/containers.cpp:579–589  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

577// Count method for map containers
578template<typename Map>
579void test_map_count() {
580 Map m;
581 m.insert(fl::make_pair(1, 100));
582 m.insert(fl::make_pair(2, 200));
583 m.insert(fl::make_pair(3, 300));
584
585 // count returns 0 or 1 for unique keys in map
586 FL_CHECK(m.count(1) > 0);
587 FL_CHECK(m.count(2) > 0);
588 FL_CHECK(m.count(99) == 0);
589}
590
591// Front and back element access for map containers
592template<typename Map>

Callers

nothing calls this directly

Calls 3

make_pairFunction · 0.85
insertMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected