| 544 | // Iteration for map containers |
| 545 | template<typename Map> |
| 546 | void test_map_iteration() { |
| 547 | Map m; |
| 548 | m.insert(fl::make_pair(1, 100)); |
| 549 | m.insert(fl::make_pair(2, 200)); |
| 550 | m.insert(fl::make_pair(3, 300)); |
| 551 | |
| 552 | int sum = 0; |
| 553 | for (auto it = m.begin(); it != m.end(); ++it) { |
| 554 | sum += it->second; |
| 555 | } |
| 556 | |
| 557 | FL_CHECK(sum == 600); |
| 558 | } |
| 559 | |
| 560 | // Size and clear for map containers |
| 561 | template<typename Map> |