| 662 | // Test capacity management for heap-based containers |
| 663 | template<typename Container> |
| 664 | void test_container_capacity_management() { |
| 665 | Container c; |
| 666 | |
| 667 | // Test initial capacity - COMPILER ERROR if capacity() doesn't exist |
| 668 | FL_CHECK(c.capacity() >= 0); |
| 669 | |
| 670 | // Test reserve - COMPILER ERROR if reserve() doesn't exist |
| 671 | c.reserve(100); |
| 672 | FL_CHECK(c.capacity() >= 100); |
| 673 | FL_CHECK(c.size() == 0); // Size unchanged |
| 674 | |
| 675 | // Populate without reallocation |
| 676 | for (int i = 0; i < 50; ++i) { |
| 677 | populate(c, make_shared_int(i)); |
| 678 | } |
| 679 | FL_CHECK(c.size() == 50); |
| 680 | FL_CHECK(c.capacity() >= 100); |
| 681 | } |
| 682 | |
| 683 | // Test shrink_to_fit for heap-based containers |
| 684 | template<typename Container> |
nothing calls this directly
no test coverage detected