| 862 | // Verifies: pair<Key, Value> dereferencing |
| 863 | template<template<typename, typename> class MapTemplate> |
| 864 | void test_map_iteration_key_value() { |
| 865 | using MapContainer = MapTemplate<int, fl::shared_ptr<int>>; |
| 866 | |
| 867 | MapContainer m; |
| 868 | populate_map(m, 100, make_shared_int(1000)); |
| 869 | populate_map(m, 200, make_shared_int(2000)); |
| 870 | |
| 871 | int key_sum = 0; |
| 872 | int value_sum = 0; |
| 873 | |
| 874 | for (auto it = m.begin(); it != m.end(); ++it) { |
| 875 | key_sum += it->first; |
| 876 | value_sum += *it->second; |
| 877 | } |
| 878 | |
| 879 | FL_CHECK(key_sum == 300); // 100 + 200 |
| 880 | FL_CHECK(value_sum == 3000); // 1000 + 2000 |
| 881 | } |
| 882 | |
| 883 | // Test map lookup and iteration consistency |
| 884 | // Verifies: find() returns valid iterator, dereferencing works |
nothing calls this directly
no test coverage detected