diff --git a/test/advance_test.cpp b/test/advance_test.cpp index 230d07e..85cd4ac 100644 --- a/test/advance_test.cpp +++ b/test/advance_test.cpp @@ -29,15 +29,7 @@ int main() { test_advance(ptr1, ptr2, 3); test_advance(ptr2, ptr1, -3); - } - { - std::vector ints(ptr1, ptr2); - test_advance(ints.begin(), ints.end(), 3); - test_advance(ints.end(), ints.begin(), -3); - } - - { test_advance( boost::make_transform_iterator(ptr1, twice) , boost::make_transform_iterator(ptr2, twice) @@ -50,15 +42,49 @@ int main() ); } + { + std::vector ints(ptr1, ptr2); + test_advance(ints.begin(), ints.end(), 3); + test_advance(ints.end(), ints.begin(), -3); + + test_advance( + boost::make_transform_iterator(ints.begin(), twice) + , boost::make_transform_iterator(ints.end(), twice) + , 3 + ); + test_advance( + boost::make_transform_iterator(ints.end(), twice) + , boost::make_transform_iterator(ints.begin(), twice) + , -3 + ); + } + { std::list ints(ptr1, ptr2); test_advance(ints.begin(), ints.end(), 3); test_advance(ints.end(), ints.begin(), -3); + + test_advance( + boost::make_transform_iterator(ints.begin(), twice) + , boost::make_transform_iterator(ints.end(), twice) + , 3 + ); + test_advance( + boost::make_transform_iterator(ints.end(), twice) + , boost::make_transform_iterator(ints.begin(), twice) + , -3 + ); } { boost::container::slist ints(ptr1, ptr2); test_advance(ints.begin(), ints.end(), 3); + + test_advance( + boost::make_transform_iterator(ints.begin(), twice) + , boost::make_transform_iterator(ints.end(), twice) + , 3 + ); } return boost::report_errors(); diff --git a/test/distance_test.cpp b/test/distance_test.cpp index 494b0d5..91587d6 100644 --- a/test/distance_test.cpp +++ b/test/distance_test.cpp @@ -28,15 +28,7 @@ int main() { test_distance(ptr1, ptr2, 3); test_distance(ptr2, ptr1, -3); - } - { - std::vector ints(ptr1, ptr2); - test_distance(ints.begin(), ints.end(), 3); - test_distance(ints.end(), ints.begin(), -3); - } - - { test_distance( boost::make_transform_iterator(ptr1, twice) , boost::make_transform_iterator(ptr2, twice) @@ -49,14 +41,43 @@ int main() ); } + { + std::vector ints(ptr1, ptr2); + test_distance(ints.begin(), ints.end(), 3); + test_distance(ints.end(), ints.begin(), -3); + + test_distance( + boost::make_transform_iterator(ints.begin(), twice) + , boost::make_transform_iterator(ints.end(), twice) + , 3 + ); + test_distance( + boost::make_transform_iterator(ints.end(), twice) + , boost::make_transform_iterator(ints.begin(), twice) + , -3 + ); + } + { std::list ints(ptr1, ptr2); test_distance(ints.begin(), ints.end(), 3); + + test_distance( + boost::make_transform_iterator(ints.begin(), twice) + , boost::make_transform_iterator(ints.end(), twice) + , 3 + ); } { boost::container::slist ints(ptr1, ptr2); test_distance(ints.begin(), ints.end(), 3); + + test_distance( + boost::make_transform_iterator(ints.begin(), twice) + , boost::make_transform_iterator(ints.end(), twice) + , 3 + ); } return boost::report_errors();