diff --git a/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_7.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_7.pass.cpp --- a/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_7.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_7.pass.cpp @@ -23,9 +23,14 @@ int main(int, char**) { typedef std::unordered_map C; - C c(1); - C::local_iterator i = c.begin(0); + typedef std::pair P; + P a[] = {P(42, std::string())}; + C c(std::begin(a), std::end(a)); + C::size_type b = c.bucket(42); + C::local_iterator i = c.begin(b); + assert(i != c.end(b)); ++i; + assert(i == c.end(b)); ++i; assert(false); diff --git a/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_9.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_9.pass.cpp --- a/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_9.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_9.pass.cpp @@ -27,9 +27,14 @@ int main(int, char**) { typedef std::unordered_map, std::equal_to, min_allocator>> C; - C c(1); - C::local_iterator i = c.begin(0); + typedef std::pair P; + P a[] = {P(42, std::string())}; + C c(std::begin(a), std::end(a)); + C::size_type b = c.bucket(42); + C::local_iterator i = c.begin(b); + assert(i != c.end(b)); ++i; + assert(i == c.end(b)); ++i; assert(false); diff --git a/libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_7.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_7.pass.cpp --- a/libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_7.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_7.pass.cpp @@ -23,9 +23,14 @@ int main(int, char**) { typedef std::unordered_multimap C; - C c(1); - C::local_iterator i = c.begin(0); + typedef std::pair P; + P a[] = {P(42, std::string())}; + C c(std::begin(a), std::end(a)); + C::size_type b = c.bucket(42); + C::local_iterator i = c.begin(b); + assert(i != c.end(b)); ++i; + assert(i == c.end(b)); ++i; assert(false); diff --git a/libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_9.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_9.pass.cpp --- a/libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_9.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_9.pass.cpp @@ -28,9 +28,14 @@ int main(int, char**) { typedef std::unordered_multimap, std::equal_to, min_allocator>> C; - C c(1); - C::local_iterator i = c.begin(0); + typedef std::pair P; + P a[] = {P(42, std::string())}; + C c(std::begin(a), std::end(a)); + C::size_type b = c.bucket(42); + C::local_iterator i = c.begin(b); + assert(i != c.end(b)); ++i; + assert(i == c.end(b)); ++i; assert(false); diff --git a/libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_7.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_7.pass.cpp --- a/libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_7.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_7.pass.cpp @@ -23,8 +23,10 @@ int main(int, char**) { typedef int T; typedef std::unordered_multiset C; - C c(1); + T a[] = {42}; + C c(std::begin(a), std::end(a)); C::iterator i = c.begin(); + assert(i != c.end()); ++i; assert(i == c.end()); ++i; diff --git a/libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_9.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_9.pass.cpp --- a/libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_9.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_9.pass.cpp @@ -26,8 +26,10 @@ int main(int, char**) { typedef int T; typedef std::unordered_multiset, std::equal_to, min_allocator> C; - C c(1); + T a[] = {42}; + C c(std::begin(a), std::end(a)); C::iterator i = c.begin(); + assert(i != c.end()); ++i; assert(i == c.end()); ++i; diff --git a/libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_7.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_7.pass.cpp --- a/libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_7.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_7.pass.cpp @@ -23,9 +23,13 @@ int main(int, char**) { typedef int T; typedef std::unordered_multiset C; - C c(1); - C::local_iterator i = c.begin(0); + T a[] = {42}; + C c(std::begin(a), std::end(a)); + C::size_type b = c.bucket(42); + C::local_iterator i = c.begin(b); + assert(i != c.end(b)); ++i; + assert(i == c.end(b)); ++i; assert(false); diff --git a/libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_9.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_9.pass.cpp --- a/libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_9.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_9.pass.cpp @@ -26,9 +26,13 @@ int main(int, char**) { typedef int T; typedef std::unordered_multiset, std::equal_to, min_allocator> C; - C c(1); - C::local_iterator i = c.begin(0); + T a[] = {42}; + C c(std::begin(a), std::end(a)); + C::size_type b = c.bucket(42); + C::local_iterator i = c.begin(b); + assert(i != c.end(b)); ++i; + assert(i == c.end(b)); ++i; assert(false); diff --git a/libcxx/test/libcxx/containers/unord/unord.set/db_iterators_7.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/db_iterators_7.pass.cpp --- a/libcxx/test/libcxx/containers/unord/unord.set/db_iterators_7.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.set/db_iterators_7.pass.cpp @@ -23,8 +23,10 @@ int main(int, char**) { typedef int T; typedef std::unordered_set C; - C c(1); + T a[] = {42}; + C c(std::begin(a), std::end(a)); C::iterator i = c.begin(); + assert(i != c.end()); ++i; assert(i == c.end()); ++i; diff --git a/libcxx/test/libcxx/containers/unord/unord.set/db_iterators_9.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/db_iterators_9.pass.cpp --- a/libcxx/test/libcxx/containers/unord/unord.set/db_iterators_9.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.set/db_iterators_9.pass.cpp @@ -26,8 +26,10 @@ int main(int, char**) { typedef int T; typedef std::unordered_set, std::equal_to, min_allocator> C; - C c(1); + T a[] = {42}; + C c(std::begin(a), std::end(a)); C::iterator i = c.begin(); + assert(i != c.end()); ++i; assert(i == c.end()); ++i; diff --git a/libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_7.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_7.pass.cpp --- a/libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_7.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_7.pass.cpp @@ -23,9 +23,13 @@ int main(int, char**) { typedef int T; typedef std::unordered_set C; - C c(1); - C::local_iterator i = c.begin(0); + T a[] = {42}; + C c(std::begin(a), std::end(a)); + C::size_type b = c.bucket(42); + C::local_iterator i = c.begin(b); + assert(i != c.end(b)); ++i; + assert(i == c.end(b)); ++i; assert(false); diff --git a/libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_9.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_9.pass.cpp --- a/libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_9.pass.cpp +++ b/libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_9.pass.cpp @@ -26,9 +26,13 @@ int main(int, char**) { typedef int T; typedef std::unordered_set, std::equal_to, min_allocator> C; - C c(1); - C::local_iterator i = c.begin(0); + T a[] = {42}; + C c(std::begin(a), std::end(a)); + C::size_type b = c.bucket(42); + C::local_iterator i = c.begin(b); + assert(i != c.end(b)); ++i; + assert(i == c.end(b)); ++i; assert(false);