| 935 | // Verifies: binary search operations return valid iterators |
| 936 | template<template<typename, typename> class MapTemplate> |
| 937 | void test_map_bounds() { |
| 938 | using MapContainer = MapTemplate<int, fl::shared_ptr<int>>; |
| 939 | |
| 940 | MapContainer m; |
| 941 | populate_map(m, 10, make_shared_int(100)); |
| 942 | populate_map(m, 20, make_shared_int(200)); |
| 943 | populate_map(m, 30, make_shared_int(300)); |
| 944 | |
| 945 | // Test lower_bound |
| 946 | auto lower = m.lower_bound(15); |
| 947 | FL_CHECK(lower != m.end()); |
| 948 | FL_CHECK(lower->first >= 15); |
| 949 | |
| 950 | // Test upper_bound |
| 951 | auto upper = m.upper_bound(20); |
| 952 | FL_CHECK(upper != m.end()); |
| 953 | FL_CHECK(upper->first > 20); |
| 954 | |
| 955 | // Test equal_range |
| 956 | auto range = m.equal_range(20); |
| 957 | FL_CHECK(range.first != m.end()); |
| 958 | FL_CHECK(range.first->first == 20); |
| 959 | } |
| 960 | |
| 961 | // Test insert and erase with iterators |
| 962 | // Verifies: insert returns valid iterator, erase returns next iterator |
nothing calls this directly
no test coverage detected