Index: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_copy.pass.cpp =================================================================== --- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_copy.pass.cpp +++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_copy.pass.cpp @@ -22,6 +22,7 @@ #include #include "test_macros.h" +#include "../../../check_consecutive.h" #include "../../../test_compare.h" #include "../../../test_hash.h" #include "test_allocator.h" @@ -61,18 +62,10 @@ c = c0; LIBCPP_ASSERT(c.bucket_count() == 7); assert(c.size() == 6); - C::const_iterator i = c.cbegin(); - assert(*i == 1); - ++i; - assert(*i == 1); - ++i; - assert(*i == 2); - ++i; - assert(*i == 2); - ++i; - assert(*i == 3); - ++i; - assert(*i == 4); + CheckConsecutiveValues(c.find(1), c.end(), 1, 2); + CheckConsecutiveValues(c.find(2), c.end(), 2, 2); + CheckConsecutiveValues(c.find(3), c.end(), 3, 1); + CheckConsecutiveValues(c.find(4), c.end(), 4, 1); assert(c.hash_function() == test_hash >(8)); assert(c.key_eq() == test_compare >(9)); assert(c.get_allocator() == A(4)); @@ -133,18 +126,10 @@ c = c0; assert(c.bucket_count() >= 7); assert(c.size() == 6); - C::const_iterator i = c.cbegin(); - assert(*i == 1); - ++i; - assert(*i == 1); - ++i; - assert(*i == 2); - ++i; - assert(*i == 2); - ++i; - assert(*i == 3); - ++i; - assert(*i == 4); + CheckConsecutiveValues(c.find(1), c.end(), 1, 2); + CheckConsecutiveValues(c.find(2), c.end(), 2, 2); + CheckConsecutiveValues(c.find(3), c.end(), 3, 1); + CheckConsecutiveValues(c.find(4), c.end(), 4, 1); assert(c.hash_function() == test_hash >(8)); assert(c.key_eq() == test_compare >(9)); assert(c.get_allocator() == A(10)); @@ -187,18 +172,10 @@ c = c0; LIBCPP_ASSERT(c.bucket_count() == 7); assert(c.size() == 6); - C::const_iterator i = c.cbegin(); - assert(*i == 1); - ++i; - assert(*i == 1); - ++i; - assert(*i == 2); - ++i; - assert(*i == 2); - ++i; - assert(*i == 3); - ++i; - assert(*i == 4); + CheckConsecutiveValues(c.find(1), c.end(), 1, 2); + CheckConsecutiveValues(c.find(2), c.end(), 2, 2); + CheckConsecutiveValues(c.find(3), c.end(), 3, 1); + CheckConsecutiveValues(c.find(4), c.end(), 4, 1); assert(c.hash_function() == test_hash >(8)); assert(c.key_eq() == test_compare >(9)); assert(c.get_allocator() == A()); Index: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp =================================================================== --- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp +++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp @@ -23,6 +23,7 @@ #include #include "test_macros.h" +#include "../../../check_consecutive.h" #include "../../../test_compare.h" #include "../../../test_hash.h" #include "test_allocator.h" @@ -62,18 +63,10 @@ c = std::move(c0); LIBCPP_ASSERT(c.bucket_count() == 7); assert(c.size() == 6); - C::const_iterator i = c.cbegin(); - assert(*i == 1); - ++i; - assert(*i == 1); - ++i; - assert(*i == 2); - ++i; - assert(*i == 2); - ++i; - assert(*i == 3); - ++i; - assert(*i == 4); + CheckConsecutiveValues(c.find(1), c.end(), 1, 2); + CheckConsecutiveValues(c.find(2), c.end(), 2, 2); + CheckConsecutiveValues(c.find(3), c.end(), 3, 1); + CheckConsecutiveValues(c.find(4), c.end(), 4, 1); assert(c.hash_function() == test_hash >(8)); assert(c.key_eq() == test_compare >(9)); assert(c.get_allocator() == A(4)); Index: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy.pass.cpp =================================================================== --- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy.pass.cpp +++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy.pass.cpp @@ -21,6 +21,7 @@ #include #include "test_macros.h" +#include "../../../check_consecutive.h" #include "../../../test_compare.h" #include "../../../test_hash.h" #include "test_allocator.h" @@ -53,18 +54,10 @@ C c = c0; LIBCPP_ASSERT(c.bucket_count() == 7); assert(c.size() == 6); - C::const_iterator i = c.cbegin(); - assert(*i == 1); - ++i; - assert(*i == 1); - ++i; - assert(*i == 2); - ++i; - assert(*i == 2); - ++i; - assert(*i == 3); - ++i; - assert(*i == 4); + CheckConsecutiveValues(c.find(1), c.end(), 1, 2); + CheckConsecutiveValues(c.find(2), c.end(), 2, 2); + CheckConsecutiveValues(c.find(3), c.end(), 3, 1); + CheckConsecutiveValues(c.find(4), c.end(), 4, 1); assert(c.hash_function() == test_hash >(8)); assert(c.key_eq() == test_compare >(9)); assert(c.get_allocator() == test_allocator(10)); @@ -100,18 +93,10 @@ C c = c0; LIBCPP_ASSERT(c.bucket_count() == 7); assert(c.size() == 6); - C::const_iterator i = c.cbegin(); - assert(*i == 1); - ++i; - assert(*i == 1); - ++i; - assert(*i == 2); - ++i; - assert(*i == 2); - ++i; - assert(*i == 3); - ++i; - assert(*i == 4); + CheckConsecutiveValues(c.find(1), c.end(), 1, 2); + CheckConsecutiveValues(c.find(2), c.end(), 2, 2); + CheckConsecutiveValues(c.find(3), c.end(), 3, 1); + CheckConsecutiveValues(c.find(4), c.end(), 4, 1); assert(c.hash_function() == test_hash >(8)); assert(c.key_eq() == test_compare >(9)); assert(c.get_allocator() == other_allocator(-2)); @@ -146,18 +131,10 @@ C c = c0; LIBCPP_ASSERT(c.bucket_count() == 7); assert(c.size() == 6); - C::const_iterator i = c.cbegin(); - assert(*i == 1); - ++i; - assert(*i == 1); - ++i; - assert(*i == 2); - ++i; - assert(*i == 2); - ++i; - assert(*i == 3); - ++i; - assert(*i == 4); + CheckConsecutiveValues(c.find(1), c.end(), 1, 2); + CheckConsecutiveValues(c.find(2), c.end(), 2, 2); + CheckConsecutiveValues(c.find(3), c.end(), 3, 1); + CheckConsecutiveValues(c.find(4), c.end(), 4, 1); assert(c.hash_function() == test_hash >(8)); assert(c.key_eq() == test_compare >(9)); assert(c.get_allocator() == min_allocator()); Index: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy_alloc.pass.cpp =================================================================== --- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy_alloc.pass.cpp +++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy_alloc.pass.cpp @@ -21,6 +21,7 @@ #include #include "test_macros.h" +#include "../../../check_consecutive.h" #include "../../../test_compare.h" #include "../../../test_hash.h" #include "test_allocator.h" @@ -53,18 +54,10 @@ C c(c0, test_allocator(5)); LIBCPP_ASSERT(c.bucket_count() == 7); assert(c.size() == 6); - C::const_iterator i = c.cbegin(); - assert(*i == 1); - ++i; - assert(*i == 1); - ++i; - assert(*i == 2); - ++i; - assert(*i == 2); - ++i; - assert(*i == 3); - ++i; - assert(*i == 4); + CheckConsecutiveValues(c.find(1), c.end(), 1, 2); + CheckConsecutiveValues(c.find(2), c.end(), 2, 2); + CheckConsecutiveValues(c.find(3), c.end(), 3, 1); + CheckConsecutiveValues(c.find(4), c.end(), 4, 1); assert(c.hash_function() == test_hash >(8)); assert(c.key_eq() == test_compare >(9)); assert(c.get_allocator() == test_allocator(5)); @@ -100,18 +93,10 @@ C c(c0, min_allocator()); LIBCPP_ASSERT(c.bucket_count() == 7); assert(c.size() == 6); - C::const_iterator i = c.cbegin(); - assert(*i == 1); - ++i; - assert(*i == 1); - ++i; - assert(*i == 2); - ++i; - assert(*i == 2); - ++i; - assert(*i == 3); - ++i; - assert(*i == 4); + CheckConsecutiveValues(c.find(1), c.end(), 1, 2); + CheckConsecutiveValues(c.find(2), c.end(), 2, 2); + CheckConsecutiveValues(c.find(3), c.end(), 3, 1); + CheckConsecutiveValues(c.find(4), c.end(), 4, 1); assert(c.hash_function() == test_hash >(8)); assert(c.key_eq() == test_compare >(9)); assert(c.get_allocator() == min_allocator()); Index: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp =================================================================== --- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp +++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp @@ -23,6 +23,7 @@ #include #include "test_macros.h" +#include "../../../check_consecutive.h" #include "../../../test_compare.h" #include "../../../test_hash.h" #include "test_allocator.h" @@ -56,18 +57,10 @@ C c(std::move(c0), A(12)); assert(c.bucket_count() >= 7); assert(c.size() == 6); - C::const_iterator i = c.cbegin(); - assert(*i == 1); - ++i; - assert(*i == 1); - ++i; - assert(*i == 2); - ++i; - assert(*i == 2); - ++i; - assert(*i == 3); - ++i; - assert(*i == 4); + CheckConsecutiveValues(c.find(1), c.end(), 1, 2); + CheckConsecutiveValues(c.find(2), c.end(), 2, 2); + CheckConsecutiveValues(c.find(3), c.end(), 3, 1); + CheckConsecutiveValues(c.find(4), c.end(), 4, 1); assert(c.hash_function() == test_hash >(8)); assert(c.key_eq() == test_compare >(9)); assert(c.get_allocator() == A(12));