|
@@ -39,7 +39,7 @@ public:
|
|
|
|
|
|
|
|
void test_vector_map_iterator_matches_size() {
|
|
void test_vector_map_iterator_matches_size() {
|
|
|
std::vector<std::map<int, int>> const obj{{{1, 1}, {2, 2}}, {{3, 3}, {4, 4}, {5, 5}}};
|
|
std::vector<std::map<int, int>> const obj{{{1, 1}, {2, 2}}, {{3, 3}, {4, 4}, {5, 5}}};
|
|
|
- std::vector<std::tuple<int, int>> const expected{{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}};
|
|
|
|
|
|
|
+ std::vector<std::pair<int const, int>> const expected{{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}};
|
|
|
auto rit = make_recursive_iterator(obj);
|
|
auto rit = make_recursive_iterator(obj);
|
|
|
decltype(rit) end{ };
|
|
decltype(rit) end{ };
|
|
|
TS_ASSERT_EQUALS(std::distance(rit, end), expected.size());
|
|
TS_ASSERT_EQUALS(std::distance(rit, end), expected.size());
|
|
@@ -47,7 +47,7 @@ public:
|
|
|
|
|
|
|
|
void test_vector_map_iterator_matches_data() {
|
|
void test_vector_map_iterator_matches_data() {
|
|
|
std::vector<std::map<int, int>> const obj{{{1, 1}, {2, 2}}, {{3, 3}, {4, 4}, {5, 5}}};
|
|
std::vector<std::map<int, int>> const obj{{{1, 1}, {2, 2}}, {{3, 3}, {4, 4}, {5, 5}}};
|
|
|
- std::vector<std::tuple<int, int>> const expected{{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}};
|
|
|
|
|
|
|
+ std::vector<std::pair<int const, int>> const expected{{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}};
|
|
|
auto rit = make_recursive_iterator(obj);
|
|
auto rit = make_recursive_iterator(obj);
|
|
|
for (auto it = expected.begin(), end = expected.end(); it != end; ++it, ++rit) {
|
|
for (auto it = expected.begin(), end = expected.end(); it != end; ++it, ++rit) {
|
|
|
TS_ASSERT_EQUALS(*it, *rit);
|
|
TS_ASSERT_EQUALS(*it, *rit);
|