| 1008 | // Verifies: operator[] allows modification through iterator dereferencing |
| 1009 | template<template<typename, typename> class MapTemplate> |
| 1010 | void test_map_operator_bracket_access() { |
| 1011 | using MapContainer = MapTemplate<int, fl::shared_ptr<int>>; |
| 1012 | |
| 1013 | MapContainer m; |
| 1014 | auto original = make_shared_int(111); |
| 1015 | populate_map(m, 1, original); |
| 1016 | |
| 1017 | // Verify value through operator[] |
| 1018 | FL_CHECK(*m[1] == 111); |
| 1019 | |
| 1020 | // Modify through iterator |
| 1021 | auto it = m.find(1); |
| 1022 | FL_CHECK(it != m.end()); |
| 1023 | it->second = make_shared_int(222); |
| 1024 | FL_CHECK(*m[1] == 222); |
| 1025 | } |
| 1026 | |
| 1027 | // Test iteration order (for sorted maps) |
| 1028 | // Verifies: elements are visited in key order |
nothing calls this directly
no test coverage detected