| 840 | // Verifies: operator+, operator-, distance calculations |
| 841 | template<template<typename, typename> class MapTemplate> |
| 842 | void test_map_iterator_arithmetic() { |
| 843 | using MapContainer = MapTemplate<int, fl::shared_ptr<int>>; |
| 844 | |
| 845 | MapContainer c; |
| 846 | populate_map(c, 1, make_shared_int(10)); |
| 847 | populate_map(c, 2, make_shared_int(20)); |
| 848 | populate_map(c, 3, make_shared_int(30)); |
| 849 | |
| 850 | // Test operator+ on iterators |
| 851 | auto it0 = c.begin(); |
| 852 | auto it1 = c.begin() + 1; |
| 853 | auto it2 = c.begin() + 2; |
| 854 | |
| 855 | FL_CHECK(it1 - it0 == 1); // Distance check |
| 856 | FL_CHECK(it2 - it0 == 2); |
| 857 | FL_CHECK(it1 != it0); |
| 858 | FL_CHECK(it1 != it2); |
| 859 | } |
| 860 | |
| 861 | // Test map iteration with key-value access |
| 862 | // Verifies: pair<Key, Value> dereferencing |
nothing calls this directly
no test coverage detected