[libcxx-commits] [libcxx] 2908eb2 - [libc++] Split off debug tests that were missed by ce1365f8f7e into test/libcxx

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 14 09:02:50 PDT 2020


Author: Louis Dionne
Date: 2020-10-14T12:02:37-04:00
New Revision: 2908eb20ba753fabb9778438e8ceb4ceacbabf30

URL: https://github.com/llvm/llvm-project/commit/2908eb20ba753fabb9778438e8ceb4ceacbabf30
DIFF: https://github.com/llvm/llvm-project/commit/2908eb20ba753fabb9778438e8ceb4ceacbabf30.diff

LOG: [libc++] Split off debug tests that were missed by ce1365f8f7e into test/libcxx

Also, some tests had multiple death tests in them, so split them into
separate tests instead. The second death test would obviously never
get run, because the first one would kill the program before.

Added: 
    libcxx/test/libcxx/containers/unord/unord.map/bucket_size.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/db_iterators_10.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/db_iterators_9.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_10.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_9.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/db_swap_1.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/max_load_factor.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/bucket.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/bucket_size.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/db_iterators_10.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/db_iterators_9.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_10.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_9.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/db_swap_1.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/max_load_factor.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/bucket.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/bucket_size.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_10.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_9.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_10.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_9.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/db_swap_1.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/max_load_factor.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/bucket.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/bucket_size.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/db_iterators_10.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/db_iterators_9.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_10.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_9.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/db_swap_1.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/max_load_factor.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.access/back.const.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.access/back.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.access/front.const.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.access/front.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.access/index.const.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.access/index.pass.cpp
    libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp
    libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp
    libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp
    libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp
    libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/op_arrow.pass.cpp
    libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/op_arrow_const.pass.cpp

Modified: 
    libcxx/test/libcxx/containers/unord/unord.map/db_bucket.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/db_insert_hint_const_lvalue.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/db_insert_hint_rvalue.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/db_iterators_7.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/db_iterators_8.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_7.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_8.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/db_move.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_db1.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_db2.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db1.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db2.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db3.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db4.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/db_insert_hint_const_lvalue.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/db_insert_hint_rvalue.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/db_iterators_7.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/db_iterators_8.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_7.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_8.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/db_move.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db1.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db2.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db1.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db2.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db3.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db4.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/db_insert_hint_const_lvalue.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_7.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_8.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_7.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_8.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/db_move.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_db1.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_db2.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db1.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db2.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db3.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db4.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/db_insert_hint_const_lvalue.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/db_iterators_7.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/db_iterators_8.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_7.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_8.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/db_move.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/erase_iter_db1.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/erase_iter_db2.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db1.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db2.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db3.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db4.pass.cpp
    libcxx/test/std/containers/unord/unord.map/bucket_size.pass.cpp
    libcxx/test/std/containers/unord/unord.map/max_load_factor.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/bucket.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/bucket_size.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/max_load_factor.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/bucket.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/bucket_size.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp
    libcxx/test/std/containers/unord/unord.set/bucket.pass.cpp
    libcxx/test/std/containers/unord/unord.set/bucket_size.pass.cpp
    libcxx/test/std/containers/unord/unord.set/max_load_factor.pass.cpp
    libcxx/test/std/strings/basic.string/string.access/back.pass.cpp
    libcxx/test/std/strings/basic.string/string.access/front.pass.cpp
    libcxx/test/std/strings/basic.string/string.access/index.pass.cpp
    libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp
    libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp
    libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp
    libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp
    libcxx/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow.pass.cpp
    libcxx/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow_const.pass.cpp

Removed: 
    libcxx/test/libcxx/containers/unord/unord.map/unord.map.swap/db_swap_1.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.swap/db_swap_1.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/unord.multiset.swap/db_swap_1.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/unord.set.swap/db_swap_1.pass.cpp


################################################################################
diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/bucket_size.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/bucket_size.pass.cpp
new file mode 100644
index 000000000000..31c0b5998564
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.map/bucket_size.pass.cpp
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_map>
+
+// template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>,
+//           class Alloc = allocator<pair<const Key, T>>>
+// class unordered_map
+
+// size_type bucket_size(size_type n) const
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_map>
+#include <string>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    typedef std::unordered_map<int, std::string> C;
+    C c;
+    (void) c.bucket_size(3);
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/db_bucket.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/db_bucket.pass.cpp
index fc14f0e62521..5e6fb25e933d 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/db_bucket.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/db_bucket.pass.cpp
@@ -21,14 +21,11 @@
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
-        typedef std::unordered_map<int, std::string> C;
-        C c;
-        (void) c.bucket(3);
-        assert(false);
-    }
+int main(int, char**) {
+    typedef std::unordered_map<int, std::string> C;
+    C c;
+    (void) c.bucket(3);
+    assert(false);
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/db_insert_hint_const_lvalue.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/db_insert_hint_const_lvalue.pass.cpp
index 6abe0e799c4d..f73c2ea21758 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/db_insert_hint_const_lvalue.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/db_insert_hint_const_lvalue.pass.cpp
@@ -20,19 +20,16 @@
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
-        typedef std::unordered_map<double, int> C;
-        typedef C::iterator R;
-        typedef C::value_type P;
-        C c;
-        C c2;
-        C::const_iterator e = c2.end();
-        P v(3.5, 3);
-        R r = c.insert(e, v);
-        assert(false);
-    }
+int main(int, char**) {
+    typedef std::unordered_map<double, int> C;
+    typedef C::iterator R;
+    typedef C::value_type P;
+    C c;
+    C c2;
+    C::const_iterator e = c2.end();
+    P v(3.5, 3);
+    R r = c.insert(e, v);
+    assert(false);
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/db_insert_hint_rvalue.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/db_insert_hint_rvalue.pass.cpp
index 09c9ce374dfa..d28a9713a404 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/db_insert_hint_rvalue.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/db_insert_hint_rvalue.pass.cpp
@@ -24,18 +24,15 @@
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
-        typedef std::unordered_map<double, int> C;
-        typedef C::iterator R;
-        typedef C::value_type P;
-        C c;
-        C c2;
-        C::const_iterator e = c2.end();
-        R r = c.insert(e, P(3.5, 3));
-        assert(false);
-    }
+int main(int, char**) {
+    typedef std::unordered_map<double, int> C;
+    typedef C::iterator R;
+    typedef C::value_type P;
+    C c;
+    C c2;
+    C::const_iterator e = c2.end();
+    R r = c.insert(e, P(3.5, 3));
+    assert(false);
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_10.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_10.pass.cpp
new file mode 100644
index 000000000000..9f7432f1537f
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_10.pass.cpp
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_map>
+
+// Dereference non-dereferenceable iterator.
+
+// UNSUPPORTED: libcxx-no-debug-mode
+// UNSUPPORTED: c++03
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_map>
+#include <cassert>
+#include <functional>
+#include <string>
+#include <utility>
+
+#include "test_macros.h"
+#include "min_allocator.h"
+
+int main(int, char**) {
+    typedef std::unordered_map<int, std::string, std::hash<int>, std::equal_to<int>,
+                        min_allocator<std::pair<const int, std::string>>> C;
+    C c;
+    c.insert(std::make_pair(1, "one"));
+    C::iterator i = c.end();
+    C::value_type j = *i;
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_7.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_7.pass.cpp
index 814d8bbf0dfe..2df35fc1ce7c 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_7.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_7.pass.cpp
@@ -16,18 +16,13 @@
 #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
 
 #include <unordered_map>
-#include <string>
 #include <cassert>
-#include <iterator>
-#include <exception>
-#include <cstdlib>
+#include <string>
+#include <utility>
 
 #include "test_macros.h"
-#include "min_allocator.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::unordered_map<int, std::string> C;
     C c;
     c.insert(std::make_pair(1, "one"));
@@ -36,18 +31,6 @@ int main(int, char**)
     assert(i == c.end());
     ++i;
     assert(false);
-    }
-#if TEST_STD_VER >= 11
-    {
-    typedef std::unordered_map<int, std::string, std::hash<int>, std::equal_to<int>,
-                        min_allocator<std::pair<const int, std::string>>> C;
-    C c;
-    c.insert(std::make_pair(1, "one"));
-    C::iterator i = c.begin();
-    ++i;
-    assert(i == c.end());
-    ++i;
-    assert(false);
-    }
-#endif
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_8.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_8.pass.cpp
index 2ef8fd62a827..90d5d8c78400 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_8.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_8.pass.cpp
@@ -16,34 +16,19 @@
 #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
 
 #include <unordered_map>
-#include <string>
 #include <cassert>
-#include <iterator>
-#include <exception>
-#include <cstdlib>
+#include <string>
+#include <utility>
 
 #include "test_macros.h"
-#include "min_allocator.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::unordered_map<int, std::string> C;
     C c;
     c.insert(std::make_pair(1, "one"));
     C::iterator i = c.end();
     C::value_type j = *i;
     assert(false);
-    }
-#if TEST_STD_VER >= 11
-    {
-    typedef std::unordered_map<int, std::string, std::hash<int>, std::equal_to<int>,
-                        min_allocator<std::pair<const int, std::string>>> C;
-    C c;
-    c.insert(std::make_pair(1, "one"));
-    C::iterator i = c.end();
-    C::value_type j = *i;
-    assert(false);
-    }
-#endif
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_9.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_9.pass.cpp
new file mode 100644
index 000000000000..7acdbe1bd1fe
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.map/db_iterators_9.pass.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_map>
+
+// Increment iterator past end.
+
+// UNSUPPORTED: libcxx-no-debug-mode
+// UNSUPPORTED: c++03
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_map>
+#include <cassert>
+#include <functional>
+#include <string>
+#include <utility>
+
+#include "test_macros.h"
+#include "min_allocator.h"
+
+int main(int, char**) {
+    typedef std::unordered_map<int, std::string, std::hash<int>, std::equal_to<int>,
+                        min_allocator<std::pair<const int, std::string>>> C;
+    C c;
+    c.insert(std::make_pair(1, "one"));
+    C::iterator i = c.begin();
+    ++i;
+    assert(i == c.end());
+    ++i;
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_10.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_10.pass.cpp
new file mode 100644
index 000000000000..d1f52f4ae5c3
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_10.pass.cpp
@@ -0,0 +1,36 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_map>
+
+// Dereference non-dereferenceable iterator.
+
+// UNSUPPORTED: libcxx-no-debug-mode
+// UNSUPPORTED: c++03
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_map>
+#include <cassert>
+#include <functional>
+#include <string>
+
+#include "test_macros.h"
+#include "min_allocator.h"
+
+int main(int, char**) {
+    typedef std::unordered_map<int, std::string, std::hash<int>, std::equal_to<int>,
+                        min_allocator<std::pair<const int, std::string>>> C;
+    C c(1);
+    C::local_iterator i = c.end(0);
+    C::value_type j = *i;
+    assert(false);
+
+    return 0;
+}

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
index 9902f19ca9b7..ec535559618e 100644
--- 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
@@ -18,33 +18,16 @@
 #include <unordered_map>
 #include <string>
 #include <cassert>
-#include <iterator>
-#include <exception>
-#include <cstdlib>
 
 #include "test_macros.h"
-#include "min_allocator.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::unordered_map<int, std::string> C;
     C c(1);
     C::local_iterator i = c.begin(0);
     ++i;
     ++i;
     assert(false);
-    }
-#if TEST_STD_VER >= 11
-    {
-    typedef std::unordered_map<int, std::string, std::hash<int>, std::equal_to<int>,
-                        min_allocator<std::pair<const int, std::string>>> C;
-    C c(1);
-    C::local_iterator i = c.begin(0);
-    ++i;
-    ++i;
-    assert(false);
-    }
-#endif
 
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_8.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_8.pass.cpp
index 849593173809..40fe6b2d40cd 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_8.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_8.pass.cpp
@@ -18,30 +18,15 @@
 #include <unordered_map>
 #include <string>
 #include <cassert>
-#include <iterator>
-#include <exception>
-#include <cstdlib>
 
 #include "test_macros.h"
-#include "min_allocator.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::unordered_map<int, std::string> C;
     C c(1);
     C::local_iterator i = c.end(0);
     C::value_type j = *i;
     assert(false);
-    }
-#if TEST_STD_VER >= 11
-    {
-    typedef std::unordered_map<int, std::string, std::hash<int>, std::equal_to<int>,
-                        min_allocator<std::pair<const int, std::string>>> C;
-    C c(1);
-    C::local_iterator i = c.end(0);
-    C::value_type j = *i;
-    assert(false);
-    }
-#endif
+
+    return 0;
 }

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
new file mode 100644
index 000000000000..690d5dd795e6
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.map/db_local_iterators_9.pass.cpp
@@ -0,0 +1,37 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_map>
+
+// Increment local_iterator past end.
+
+// UNSUPPORTED: libcxx-no-debug-mode
+// UNSUPPORTED: c++03
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_map>
+#include <cassert>
+#include <functional>
+#include <string>
+
+#include "test_macros.h"
+#include "min_allocator.h"
+
+int main(int, char**) {
+    typedef std::unordered_map<int, std::string, std::hash<int>, std::equal_to<int>,
+                        min_allocator<std::pair<const int, std::string>>> C;
+    C c(1);
+    C::local_iterator i = c.begin(0);
+    ++i;
+    ++i;
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/db_move.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/db_move.pass.cpp
index 5ccd7aa0d685..6f8a02612a19 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/db_move.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/db_move.pass.cpp
@@ -22,17 +22,14 @@
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
-        std::unordered_map<int, int> s1 = {{1, 1}, {2, 2}, {3, 3}};
-        std::unordered_map<int, int>::iterator i = s1.begin();
-        std::pair<const int, int> k = *i;
-        std::unordered_map<int, int> s2 = std::move(s1);
-        assert(*i == k);
-        s2.erase(i);
-        assert(s2.size() == 2);
-    }
+int main(int, char**) {
+    std::unordered_map<int, int> s1 = {{1, 1}, {2, 2}, {3, 3}};
+    std::unordered_map<int, int>::iterator i = s1.begin();
+    std::pair<const int, int> k = *i;
+    std::unordered_map<int, int> s2 = std::move(s1);
+    assert(*i == k);
+    s2.erase(i);
+    assert(s2.size() == 2);
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/unord.map.swap/db_swap_1.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/db_swap_1.pass.cpp
similarity index 55%
rename from libcxx/test/libcxx/containers/unord/unord.map/unord.map.swap/db_swap_1.pass.cpp
rename to libcxx/test/libcxx/containers/unord/unord.map/db_swap_1.pass.cpp
index 1985f25402fb..149086c2320d 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/unord.map.swap/db_swap_1.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/db_swap_1.pass.cpp
@@ -24,23 +24,20 @@
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
-        typedef std::pair<int, int> P;
-        P a1[] = {P(1, 1), P(3, 3), P(7, 7), P(9, 9), P(10, 10)};
-        P a2[] = {P(0, 0), P(2, 2), P(4, 4), P(5, 5), P(6, 6), P(8, 8), P(11, 11)};
-        std::unordered_map<int, int> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
-        std::unordered_map<int, int> c2(a2, a2+sizeof(a2)/sizeof(a2[0]));
-        std::unordered_map<int, int>::iterator i1 = c1.begin();
-        std::unordered_map<int, int>::iterator i2 = c2.begin();
-        swap(c1, c2);
-        c1.erase(i2);
-        c2.erase(i1);
-        std::unordered_map<int, int>::iterator j = i1;
-        c1.erase(i1);
-        assert(false);
-    }
+int main(int, char**) {
+    typedef std::pair<int, int> P;
+    P a1[] = {P(1, 1), P(3, 3), P(7, 7), P(9, 9), P(10, 10)};
+    P a2[] = {P(0, 0), P(2, 2), P(4, 4), P(5, 5), P(6, 6), P(8, 8), P(11, 11)};
+    std::unordered_map<int, int> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
+    std::unordered_map<int, int> c2(a2, a2+sizeof(a2)/sizeof(a2[0]));
+    std::unordered_map<int, int>::iterator i1 = c1.begin();
+    std::unordered_map<int, int>::iterator i2 = c2.begin();
+    swap(c1, c2);
+    c1.erase(i2);
+    c2.erase(i1);
+    std::unordered_map<int, int>::iterator j = i1;
+    c1.erase(i1);
+    assert(false);
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/max_load_factor.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/max_load_factor.pass.cpp
new file mode 100644
index 000000000000..a4d8cffded40
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.map/max_load_factor.pass.cpp
@@ -0,0 +1,36 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_map>
+
+// template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>,
+//           class Alloc = allocator<pair<const Key, T>>>
+// class unordered_map
+
+// float max_load_factor() const;
+// void max_load_factor(float mlf);
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_map>
+#include <string>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    typedef std::unordered_map<int, std::string> C;
+    C c;
+    c.max_load_factor(0);
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_db1.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_db1.pass.cpp
index df3e838b9133..c3bdf6120df0 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_db1.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_db1.pass.cpp
@@ -17,17 +17,17 @@
 
 #include <unordered_map>
 #include <cassert>
+#include <utility>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::pair<int, int> P;
     P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
     std::unordered_map<int, int> l1(a1, a1+3);
     std::unordered_map<int, int>::const_iterator i = l1.end();
     l1.erase(i);
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_db2.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_db2.pass.cpp
index 47c7b5cf022b..30285808a0a4 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_db2.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_db2.pass.cpp
@@ -17,14 +17,11 @@
 
 #include <unordered_map>
 #include <cassert>
-#include <cstdlib>
-#include <exception>
+#include <utility>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::pair<int, int> P;
     P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
     std::unordered_map<int, int> l1(a1, a1+3);
@@ -32,5 +29,6 @@ int main(int, char**)
     std::unordered_map<int, int>::const_iterator i = l2.begin();
     l1.erase(i);
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db1.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db1.pass.cpp
index 3f7fd6611a4d..7ccfe2cca22a 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db1.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db1.pass.cpp
@@ -17,19 +17,17 @@
 
 #include <unordered_map>
 #include <cassert>
-#include <exception>
-#include <cstdlib>
+#include <utility>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::pair<int, int> P;
     P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
     std::unordered_map<int, int> l1(a1, a1+3);
     std::unordered_map<int, int> l2(a1, a1+3);
     std::unordered_map<int, int>::iterator i = l1.erase(l2.cbegin(), next(l1.cbegin()));
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db2.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db2.pass.cpp
index f2a3b4b8a773..a08572b889c4 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db2.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db2.pass.cpp
@@ -17,19 +17,17 @@
 
 #include <unordered_map>
 #include <cassert>
-#include <exception>
-#include <cstdlib>
+#include <utility>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::pair<int, int> P;
     P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
     std::unordered_map<int, int> l1(a1, a1+3);
     std::unordered_map<int, int> l2(a1, a1+3);
     std::unordered_map<int, int>::iterator i = l1.erase(l1.cbegin(), next(l2.cbegin()));
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db3.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db3.pass.cpp
index 7b39a336a34f..727e2c5da38d 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db3.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db3.pass.cpp
@@ -17,19 +17,17 @@
 
 #include <unordered_map>
 #include <cassert>
-#include <exception>
-#include <cstdlib>
+#include <utility>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::pair<int, int> P;
     P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
     std::unordered_map<int, int> l1(a1, a1+3);
     std::unordered_map<int, int> l2(a1, a1+3);
     std::unordered_map<int, int>::iterator i = l1.erase(l2.cbegin(), next(l2.cbegin()));
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db4.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db4.pass.cpp
index e120deb16edf..49753c5ce254 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db4.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/erase_iter_iter_db4.pass.cpp
@@ -17,18 +17,16 @@
 
 #include <unordered_map>
 #include <cassert>
-#include <exception>
-#include <cstdlib>
+#include <utility>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::pair<int, int> P;
     P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
     std::unordered_map<int, int> l1(a1, a1+3);
     std::unordered_map<int, int>::iterator i = l1.erase(next(l1.cbegin()), l1.cbegin());
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/bucket.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/bucket.pass.cpp
new file mode 100644
index 000000000000..83da554fbad1
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/bucket.pass.cpp
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_map>
+
+// template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>,
+//           class Alloc = allocator<pair<const Key, T>>>
+// class unordered_multimap
+
+// size_type bucket(const key_type& __k) const;
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_map>
+#include <string>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    typedef std::unordered_multimap<int, std::string> C;
+    C c;
+    (void) c.bucket(3);
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/bucket_size.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/bucket_size.pass.cpp
new file mode 100644
index 000000000000..9d5a717775ba
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/bucket_size.pass.cpp
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_map>
+
+// template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>,
+//           class Alloc = allocator<pair<const Key, T>>>
+// class unordered_multimap
+
+// size_type bucket_size(size_type n) const
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_map>
+#include <string>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    typedef std::unordered_multimap<int, std::string> C;
+    C c;
+    (void) c.bucket_size(3);
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/db_insert_hint_const_lvalue.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/db_insert_hint_const_lvalue.pass.cpp
index 08c244c0ef82..419cd1a72d9d 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/db_insert_hint_const_lvalue.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/db_insert_hint_const_lvalue.pass.cpp
@@ -20,19 +20,16 @@
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
-        typedef std::unordered_multimap<double, int> C;
-        typedef C::iterator R;
-        typedef C::value_type P;
-        C c;
-        C c2;
-        C::const_iterator e = c2.end();
-        P v(3.5, 3);
-        R r = c.insert(e, v);
-        assert(false);
-    }
+int main(int, char**) {
+    typedef std::unordered_multimap<double, int> C;
+    typedef C::iterator R;
+    typedef C::value_type P;
+    C c;
+    C c2;
+    C::const_iterator e = c2.end();
+    P v(3.5, 3);
+    R r = c.insert(e, v);
+    assert(false);
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/db_insert_hint_rvalue.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/db_insert_hint_rvalue.pass.cpp
index cf3cfec3e710..af00bc21865f 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/db_insert_hint_rvalue.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/db_insert_hint_rvalue.pass.cpp
@@ -24,18 +24,15 @@
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
-        typedef std::unordered_multimap<double, int> C;
-        typedef C::iterator R;
-        typedef C::value_type P;
-        C c;
-        C c2;
-        C::const_iterator e = c2.end();
-        R r = c.insert(e, P(3.5, 3));
-        assert(false);
-    }
+int main(int, char**) {
+    typedef std::unordered_multimap<double, int> C;
+    typedef C::iterator R;
+    typedef C::value_type P;
+    C c;
+    C c2;
+    C::const_iterator e = c2.end();
+    R r = c.insert(e, P(3.5, 3));
+    assert(false);
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/db_iterators_10.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/db_iterators_10.pass.cpp
new file mode 100644
index 000000000000..a8346eb79d7f
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/db_iterators_10.pass.cpp
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_map>
+
+// Dereference non-dereferenceable iterator.
+
+// UNSUPPORTED: libcxx-no-debug-mode
+// UNSUPPORTED: c++03
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <cassert>
+#include <functional>
+#include <string>
+#include <unordered_map>
+#include <utility>
+
+#include "test_macros.h"
+#include "min_allocator.h"
+
+int main(int, char**) {
+    typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
+                        min_allocator<std::pair<const int, std::string>>> C;
+    C c;
+    c.insert(std::make_pair(1, "one"));
+    C::iterator i = c.end();
+    C::value_type j = *i;
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/db_iterators_7.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/db_iterators_7.pass.cpp
index 1192e1f4638c..52daf9e5dc13 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/db_iterators_7.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/db_iterators_7.pass.cpp
@@ -16,18 +16,13 @@
 #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
 
 #include <unordered_map>
-#include <string>
 #include <cassert>
-#include <iterator>
-#include <exception>
-#include <cstdlib>
+#include <string>
+#include <utility>
 
 #include "test_macros.h"
-#include "min_allocator.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::unordered_multimap<int, std::string> C;
     C c;
     c.insert(std::make_pair(1, "one"));
@@ -36,18 +31,6 @@ int main(int, char**)
     assert(i == c.end());
     ++i;
     assert(false);
-    }
-#if TEST_STD_VER >= 11
-    {
-    typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
-                        min_allocator<std::pair<const int, std::string>>> C;
-    C c;
-    c.insert(std::make_pair(1, "one"));
-    C::iterator i = c.begin();
-    ++i;
-    assert(i == c.end());
-    ++i;
-    assert(false);
-    }
-#endif
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/db_iterators_8.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/db_iterators_8.pass.cpp
index 846028d8d934..47791a91f6fa 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/db_iterators_8.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/db_iterators_8.pass.cpp
@@ -15,35 +15,20 @@
 #define _LIBCPP_DEBUG 1
 #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
 
-#include <unordered_map>
-#include <string>
 #include <cassert>
-#include <iterator>
-#include <exception>
-#include <cstdlib>
+#include <string>
+#include <unordered_map>
+#include <utility>
 
 #include "test_macros.h"
-#include "min_allocator.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::unordered_multimap<int, std::string> C;
     C c;
     c.insert(std::make_pair(1, "one"));
     C::iterator i = c.end();
     C::value_type j = *i;
     assert(false);
-    }
-#if TEST_STD_VER >= 11
-    {
-    typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
-                        min_allocator<std::pair<const int, std::string>>> C;
-    C c;
-    c.insert(std::make_pair(1, "one"));
-    C::iterator i = c.end();
-    C::value_type j = *i;
-    assert(false);
-    }
-#endif
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/db_iterators_9.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/db_iterators_9.pass.cpp
new file mode 100644
index 000000000000..88a252ff358a
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/db_iterators_9.pass.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_map>
+
+// Increment iterator past end.
+
+// UNSUPPORTED: libcxx-no-debug-mode
+// UNSUPPORTED: c++03
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <cassert>
+#include <functional>
+#include <string>
+#include <unordered_map>
+#include <utility>
+
+#include "test_macros.h"
+#include "min_allocator.h"
+
+int main(int, char**) {
+    typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
+                        min_allocator<std::pair<const int, std::string>>> C;
+    C c;
+    c.insert(std::make_pair(1, "one"));
+    C::iterator i = c.begin();
+    ++i;
+    assert(i == c.end());
+    ++i;
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_10.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_10.pass.cpp
new file mode 100644
index 000000000000..962f5fc5dc4d
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_10.pass.cpp
@@ -0,0 +1,36 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_map>
+
+// Dereference non-dereferenceable iterator.
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_map>
+#include <cassert>
+#include <functional>
+#include <string>
+#include <utility>
+
+#include "test_macros.h"
+#include "min_allocator.h"
+
+int main(int, char**) {
+    typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
+                        min_allocator<std::pair<const int, std::string>>> C;
+    C c(1);
+    C::local_iterator i = c.end(0);
+    C::value_type j = *i;
+    assert(false);
+
+    return 0;
+}

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
index c14e17122d36..c68e6b7e1bc4 100644
--- 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
@@ -16,35 +16,18 @@
 #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
 
 #include <unordered_map>
-#include <string>
 #include <cassert>
-#include <iterator>
-#include <exception>
-#include <cstdlib>
+#include <string>
 
 #include "test_macros.h"
-#include "min_allocator.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::unordered_multimap<int, std::string> C;
     C c(1);
     C::local_iterator i = c.begin(0);
     ++i;
     ++i;
     assert(false);
-    }
-#if TEST_STD_VER >= 11
-    {
-    typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
-                        min_allocator<std::pair<const int, std::string>>> C;
-    C c(1);
-    C::local_iterator i = c.begin(0);
-    ++i;
-    ++i;
-    assert(false);
-    }
-#endif
 
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_8.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_8.pass.cpp
index 46e91db56436..e9315aee77d9 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_8.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_8.pass.cpp
@@ -16,32 +16,17 @@
 #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
 
 #include <unordered_map>
-#include <string>
 #include <cassert>
-#include <iterator>
-#include <exception>
-#include <cstdlib>
+#include <string>
 
 #include "test_macros.h"
-#include "min_allocator.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::unordered_multimap<int, std::string> C;
     C c(1);
     C::local_iterator i = c.end(0);
     C::value_type j = *i;
     assert(false);
-    }
-#if TEST_STD_VER >= 11
-    {
-    typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
-                        min_allocator<std::pair<const int, std::string>>> C;
-    C c(1);
-    C::local_iterator i = c.end(0);
-    C::value_type j = *i;
-    assert(false);
-    }
-#endif
+
+    return 0;
 }

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
new file mode 100644
index 000000000000..9b148a9641d9
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/db_local_iterators_9.pass.cpp
@@ -0,0 +1,37 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_map>
+
+// Increment local_iterator past end.
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_map>
+#include <cassert>
+#include <functional>
+#include <string>
+#include <utility>
+
+#include "test_macros.h"
+#include "min_allocator.h"
+
+int main(int, char**) {
+    typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
+                        min_allocator<std::pair<const int, std::string>>> C;
+    C c(1);
+    C::local_iterator i = c.begin(0);
+    ++i;
+    ++i;
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/db_move.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/db_move.pass.cpp
index a4fb6e5e6acb..c6cbbc1f122a 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/db_move.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/db_move.pass.cpp
@@ -23,17 +23,14 @@
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
-        std::unordered_multimap<int, int> s1 = {{1, 1}, {2, 2}, {3, 3}};
-        std::unordered_multimap<int, int>::iterator i = s1.begin();
-        std::pair<const int, int> k = *i;
-        std::unordered_multimap<int, int> s2 = std::move(s1);
-        assert(*i == k);
-        s2.erase(i);
-        assert(s2.size() == 2);
-    }
+int main(int, char**) {
+    std::unordered_multimap<int, int> s1 = {{1, 1}, {2, 2}, {3, 3}};
+    std::unordered_multimap<int, int>::iterator i = s1.begin();
+    std::pair<const int, int> k = *i;
+    std::unordered_multimap<int, int> s2 = std::move(s1);
+    assert(*i == k);
+    s2.erase(i);
+    assert(s2.size() == 2);
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.swap/db_swap_1.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/db_swap_1.pass.cpp
similarity index 56%
rename from libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.swap/db_swap_1.pass.cpp
rename to libcxx/test/libcxx/containers/unord/unord.multimap/db_swap_1.pass.cpp
index d2627f0e1c99..d68e5d24e4fd 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.swap/db_swap_1.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/db_swap_1.pass.cpp
@@ -21,26 +21,25 @@
 
 #include <unordered_map>
 #include <cassert>
+#include <utility>
 
 #include "test_macros.h"
 
 int main(int, char**)
 {
-    {
-        typedef std::pair<int, int> P;
-        P a1[] = {P(1, 1), P(3, 3), P(7, 7), P(9, 9), P(10, 10)};
-        P a2[] = {P(0, 0), P(2, 2), P(4, 4), P(5, 5), P(6, 6), P(8, 8), P(11, 11)};
-        std::unordered_multimap<int, int> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
-        std::unordered_multimap<int, int> c2(a2, a2+sizeof(a2)/sizeof(a2[0]));
-        std::unordered_multimap<int, int>::iterator i1 = c1.begin();
-        std::unordered_multimap<int, int>::iterator i2 = c2.begin();
-        swap(c1, c2);
-        c1.erase(i2);
-        c2.erase(i1);
-        std::unordered_multimap<int, int>::iterator j = i1;
-        c1.erase(i1);
-        assert(false);
-    }
+    typedef std::pair<int, int> P;
+    P a1[] = {P(1, 1), P(3, 3), P(7, 7), P(9, 9), P(10, 10)};
+    P a2[] = {P(0, 0), P(2, 2), P(4, 4), P(5, 5), P(6, 6), P(8, 8), P(11, 11)};
+    std::unordered_multimap<int, int> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
+    std::unordered_multimap<int, int> c2(a2, a2+sizeof(a2)/sizeof(a2[0]));
+    std::unordered_multimap<int, int>::iterator i1 = c1.begin();
+    std::unordered_multimap<int, int>::iterator i2 = c2.begin();
+    swap(c1, c2);
+    c1.erase(i2);
+    c2.erase(i1);
+    std::unordered_multimap<int, int>::iterator j = i1;
+    c1.erase(i1);
+    assert(false);
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/max_load_factor.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/max_load_factor.pass.cpp
new file mode 100644
index 000000000000..6cc283e2e0f4
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/max_load_factor.pass.cpp
@@ -0,0 +1,36 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_map>
+
+// template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>,
+//           class Alloc = allocator<pair<const Key, T>>>
+// class unordered_multimap
+
+// float max_load_factor() const;
+// void max_load_factor(float mlf);
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_map>
+#include <string>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    typedef std::unordered_multimap<int, std::string> C;
+    C c;
+    c.max_load_factor(0);
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db1.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db1.pass.cpp
index 36867de07d1f..8f6f2e03f95e 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db1.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db1.pass.cpp
@@ -17,17 +17,17 @@
 
 #include <unordered_map>
 #include <cassert>
+#include <utility>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::pair<int, int> P;
     P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
     std::unordered_multimap<int, int> l1(a1, a1+3);
     std::unordered_multimap<int, int>::const_iterator i = l1.end();
     l1.erase(i);
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db2.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db2.pass.cpp
index 47a3c0d25e43..2341fb4183cb 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db2.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db2.pass.cpp
@@ -17,14 +17,11 @@
 
 #include <unordered_map>
 #include <cassert>
-#include <cstdlib>
-#include <exception>
+#include <utility>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::pair<int, int> P;
     P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
     std::unordered_multimap<int, int> l1(a1, a1+3);
@@ -32,5 +29,6 @@ int main(int, char**)
     std::unordered_multimap<int, int>::const_iterator i = l2.begin();
     l1.erase(i);
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db1.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db1.pass.cpp
index 5e8a6cec046e..f4498d49df2a 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db1.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db1.pass.cpp
@@ -17,19 +17,17 @@
 
 #include <unordered_map>
 #include <cassert>
-#include <exception>
-#include <cstdlib>
+#include <utility>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::pair<int, int> P;
     P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
     std::unordered_multimap<int, int> l1(a1, a1+3);
     std::unordered_multimap<int, int> l2(a1, a1+3);
     std::unordered_multimap<int, int>::iterator i = l1.erase(l2.cbegin(), next(l1.cbegin()));
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db2.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db2.pass.cpp
index 1865c790b664..b595a2c0d9f9 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db2.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db2.pass.cpp
@@ -17,19 +17,17 @@
 
 #include <unordered_map>
 #include <cassert>
-#include <exception>
-#include <cstdlib>
+#include <utility>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::pair<int, int> P;
     P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
     std::unordered_multimap<int, int> l1(a1, a1+3);
     std::unordered_multimap<int, int> l2(a1, a1+3);
     std::unordered_multimap<int, int>::iterator i = l1.erase(l1.cbegin(), next(l2.cbegin()));
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db3.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db3.pass.cpp
index 44c0befb0893..f9898a39414b 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db3.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db3.pass.cpp
@@ -17,19 +17,17 @@
 
 #include <unordered_map>
 #include <cassert>
-#include <exception>
-#include <cstdlib>
+#include <utility>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::pair<int, int> P;
     P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
     std::unordered_multimap<int, int> l1(a1, a1+3);
     std::unordered_multimap<int, int> l2(a1, a1+3);
     std::unordered_multimap<int, int>::iterator i = l1.erase(l2.cbegin(), next(l2.cbegin()));
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db4.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db4.pass.cpp
index 1c3dca426d1d..8a32c14196dc 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db4.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db4.pass.cpp
@@ -17,18 +17,16 @@
 
 #include <unordered_map>
 #include <cassert>
-#include <exception>
-#include <cstdlib>
+#include <utility>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef std::pair<int, int> P;
     P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
     std::unordered_multimap<int, int> l1(a1, a1+3);
     std::unordered_multimap<int, int>::iterator i = l1.erase(next(l1.cbegin()), l1.cbegin());
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/bucket.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/bucket.pass.cpp
new file mode 100644
index 000000000000..58f95ac1c328
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/bucket.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_set>
+
+// template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>,
+//           class Alloc = allocator<Value>>
+// class unordered_multiset
+
+// size_type bucket(const key_type& __k) const;
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_set>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    typedef std::unordered_multiset<int> C;
+    C c;
+    (void) c.bucket(3);
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/bucket_size.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/bucket_size.pass.cpp
new file mode 100644
index 000000000000..29f3635c2a64
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/bucket_size.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_set>
+
+// template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>,
+//           class Alloc = allocator<Value>>
+// class unordered_multiset
+
+// size_type bucket_size(size_type n) const
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_set>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    typedef std::unordered_multiset<int> C;
+    C c;
+    (void) c.bucket_size(3);
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/db_insert_hint_const_lvalue.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/db_insert_hint_const_lvalue.pass.cpp
index 29bc62e6bd0a..b3c73abee760 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/db_insert_hint_const_lvalue.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/db_insert_hint_const_lvalue.pass.cpp
@@ -20,19 +20,16 @@
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
-        typedef std::unordered_multiset<double> C;
-        typedef C::iterator R;
-        typedef C::value_type P;
-        C c;
-        C c2;
-        C::const_iterator e = c2.end();
-        P v(3.5);
-        R r = c.insert(e, v);
-        assert(false);
-    }
+int main(int, char**) {
+    typedef std::unordered_multiset<double> C;
+    typedef C::iterator R;
+    typedef C::value_type P;
+    C c;
+    C c2;
+    C::const_iterator e = c2.end();
+    P v(3.5);
+    R r = c.insert(e, v);
+    assert(false);
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_10.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_10.pass.cpp
new file mode 100644
index 000000000000..2a430ed15598
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_10.pass.cpp
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_set>
+
+// Dereference non-dereferenceable iterator.
+
+// UNSUPPORTED: libcxx-no-debug-mode
+// UNSUPPORTED: c++03
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_set>
+#include <cassert>
+#include <functional>
+
+#include "test_macros.h"
+#include "min_allocator.h"
+
+int main(int, char**) {
+    typedef int T;
+    typedef std::unordered_multiset<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
+    C c(1);
+    C::iterator i = c.end();
+    (void) *i;
+    assert(false);
+
+    return 0;
+}

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
index a813c23ed03e..6c93b07506d5 100644
--- 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
@@ -17,16 +17,10 @@
 
 #include <unordered_set>
 #include <cassert>
-#include <iterator>
-#include <exception>
-#include <cstdlib>
 
 #include "test_macros.h"
-#include "min_allocator.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef int T;
     typedef std::unordered_multiset<T> C;
     C c(1);
@@ -35,17 +29,6 @@ int main(int, char**)
     assert(i == c.end());
     ++i;
     assert(false);
-    }
-#if TEST_STD_VER >= 11
-    {
-    typedef int T;
-    typedef std::unordered_multiset<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
-    C c(1);
-    C::iterator i = c.begin();
-    ++i;
-    assert(i == c.end());
-    ++i;
-    assert(false);
-    }
-#endif
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_8.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_8.pass.cpp
index 5bdab4d86b68..df00740ce029 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_8.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_8.pass.cpp
@@ -17,31 +17,16 @@
 
 #include <unordered_set>
 #include <cassert>
-#include <iterator>
-#include <exception>
-#include <cstdlib>
 
 #include "test_macros.h"
-#include "min_allocator.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef int T;
     typedef std::unordered_multiset<T> C;
     C c(1);
     C::iterator i = c.end();
     (void) *i;
     assert(false);
-    }
-#if TEST_STD_VER >= 11
-    {
-    typedef int T;
-    typedef std::unordered_multiset<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
-    C c(1);
-    C::iterator i = c.end();
-    (void) *i;
-    assert(false);
-    }
-#endif
+
+    return 0;
 }

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
new file mode 100644
index 000000000000..da33dffbcafb
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/db_iterators_9.pass.cpp
@@ -0,0 +1,37 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_set>
+
+// Increment iterator past end.
+
+// UNSUPPORTED: libcxx-no-debug-mode
+// UNSUPPORTED: c++03
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_set>
+#include <cassert>
+#include <functional>
+
+#include "test_macros.h"
+#include "min_allocator.h"
+
+int main(int, char**) {
+    typedef int T;
+    typedef std::unordered_multiset<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
+    C c(1);
+    C::iterator i = c.begin();
+    ++i;
+    assert(i == c.end());
+    ++i;
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_10.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_10.pass.cpp
new file mode 100644
index 000000000000..89dec6d6474e
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_10.pass.cpp
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_set>
+
+// Dereference non-dereferenceable iterator.
+
+// UNSUPPORTED: libcxx-no-debug-mode
+// UNSUPPORTED: c++03
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_set>
+#include <cassert>
+#include <functional>
+
+#include "test_macros.h"
+#include "min_allocator.h"
+
+int main(int, char**) {
+    typedef int T;
+    typedef std::unordered_multiset<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
+    C c(1);
+    C::local_iterator i = c.end(0);
+    (void) *i;
+    assert(false);
+
+    return 0;
+}

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
index 4ad003f7ed9a..9179f09a2832 100644
--- 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
@@ -17,16 +17,10 @@
 
 #include <unordered_set>
 #include <cassert>
-#include <iterator>
-#include <exception>
-#include <cstdlib>
 
 #include "test_macros.h"
-#include "min_allocator.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef int T;
     typedef std::unordered_multiset<T> C;
     C c(1);
@@ -34,17 +28,6 @@ int main(int, char**)
     ++i;
     ++i;
     assert(false);
-    }
-#if TEST_STD_VER >= 11
-    {
-    typedef int T;
-    typedef std::unordered_multiset<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
-    C c(1);
-    C::local_iterator i = c.begin(0);
-    ++i;
-    ++i;
-    assert(false);
-    }
-#endif
 
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_8.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_8.pass.cpp
index 512912d70d85..2c5983dbf65a 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_8.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_8.pass.cpp
@@ -17,31 +17,16 @@
 
 #include <unordered_set>
 #include <cassert>
-#include <iterator>
-#include <exception>
-#include <cstdlib>
 
 #include "test_macros.h"
-#include "min_allocator.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef int T;
     typedef std::unordered_multiset<T> C;
     C c(1);
     C::local_iterator i = c.end(0);
     (void) *i;
     assert(false);
-    }
-#if TEST_STD_VER >= 11
-    {
-    typedef int T;
-    typedef std::unordered_multiset<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
-    C c(1);
-    C::local_iterator i = c.end(0);
-    (void) *i;
-    assert(false);
-    }
-#endif
+
+    return 0;
 }

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
new file mode 100644
index 000000000000..e994de217b60
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/db_local_iterators_9.pass.cpp
@@ -0,0 +1,36 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_set>
+
+// Increment local_iterator past end.
+
+// UNSUPPORTED: libcxx-no-debug-mode
+// UNSUPPORTED: c++03
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_set>
+#include <cassert>
+#include <functional>
+
+#include "test_macros.h"
+#include "min_allocator.h"
+
+int main(int, char**) {
+    typedef int T;
+    typedef std::unordered_multiset<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
+    C c(1);
+    C::local_iterator i = c.begin(0);
+    ++i;
+    ++i;
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/db_move.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/db_move.pass.cpp
index bc72a3bcfd15..846338a332ef 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/db_move.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/db_move.pass.cpp
@@ -23,17 +23,14 @@
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
-        std::unordered_multiset<int> s1 = {1, 2, 3};
-        std::unordered_multiset<int>::iterator i = s1.begin();
-        int k = *i;
-        std::unordered_multiset<int> s2 = std::move(s1);
-        assert(*i == k);
-        s2.erase(i);
-        assert(s2.size() == 2);
-    }
+int main(int, char**) {
+    std::unordered_multiset<int> s1 = {1, 2, 3};
+    std::unordered_multiset<int>::iterator i = s1.begin();
+    int k = *i;
+    std::unordered_multiset<int> s2 = std::move(s1);
+    assert(*i == k);
+    s2.erase(i);
+    assert(s2.size() == 2);
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/unord.multiset.swap/db_swap_1.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/db_swap_1.pass.cpp
similarity index 59%
rename from libcxx/test/libcxx/containers/unord/unord.multiset/unord.multiset.swap/db_swap_1.pass.cpp
rename to libcxx/test/libcxx/containers/unord/unord.multiset/db_swap_1.pass.cpp
index a0f23aeef85d..0374c06ee11b 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/unord.multiset.swap/db_swap_1.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/db_swap_1.pass.cpp
@@ -24,22 +24,19 @@
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
-        int a1[] = {1, 3, 7, 9, 10};
-        int a2[] = {0, 2, 4, 5, 6, 8, 11};
-        std::unordered_multiset<int> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
-        std::unordered_multiset<int> c2(a2, a2+sizeof(a2)/sizeof(a2[0]));
-        std::unordered_multiset<int>::iterator i1 = c1.begin();
-        std::unordered_multiset<int>::iterator i2 = c2.begin();
-        swap(c1, c2);
-        c1.erase(i2);
-        c2.erase(i1);
-        std::unordered_multiset<int>::iterator j = i1;
-        c1.erase(i1);
-        assert(false);
-    }
+int main(int, char**) {
+    int a1[] = {1, 3, 7, 9, 10};
+    int a2[] = {0, 2, 4, 5, 6, 8, 11};
+    std::unordered_multiset<int> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
+    std::unordered_multiset<int> c2(a2, a2+sizeof(a2)/sizeof(a2[0]));
+    std::unordered_multiset<int>::iterator i1 = c1.begin();
+    std::unordered_multiset<int>::iterator i2 = c2.begin();
+    swap(c1, c2);
+    c1.erase(i2);
+    c2.erase(i1);
+    std::unordered_multiset<int>::iterator j = i1;
+    c1.erase(i1);
+    assert(false);
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_db1.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_db1.pass.cpp
index 2aa205917c59..f37aedbec281 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_db1.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_db1.pass.cpp
@@ -20,13 +20,12 @@
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     int a1[] = {1, 2, 3};
     std::unordered_multiset<int> l1(a1, a1+3);
     std::unordered_multiset<int>::const_iterator i = l1.end();
     l1.erase(i);
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_db2.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_db2.pass.cpp
index fd09b2a0748e..d519ac7556cc 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_db2.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_db2.pass.cpp
@@ -17,19 +17,16 @@
 
 #include <unordered_set>
 #include <cassert>
-#include <cstdlib>
-#include <exception>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     int a1[] = {1, 2, 3};
     std::unordered_multiset<int> l1(a1, a1+3);
     std::unordered_multiset<int> l2(a1, a1+3);
     std::unordered_multiset<int>::const_iterator i = l2.begin();
     l1.erase(i);
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db1.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db1.pass.cpp
index 7b680071caf3..06dc1b44c89a 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db1.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db1.pass.cpp
@@ -17,18 +17,15 @@
 
 #include <unordered_set>
 #include <cassert>
-#include <exception>
-#include <cstdlib>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     int a1[] = {1, 2, 3};
     std::unordered_multiset<int> l1(a1, a1+3);
     std::unordered_multiset<int> l2(a1, a1+3);
     std::unordered_multiset<int>::iterator i = l1.erase(l2.cbegin(), next(l1.cbegin()));
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db2.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db2.pass.cpp
index a3202457bd5c..181f7ed77103 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db2.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db2.pass.cpp
@@ -17,18 +17,15 @@
 
 #include <unordered_set>
 #include <cassert>
-#include <exception>
-#include <cstdlib>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     int a1[] = {1, 2, 3};
     std::unordered_multiset<int> l1(a1, a1+3);
     std::unordered_multiset<int> l2(a1, a1+3);
     std::unordered_multiset<int>::iterator i = l1.erase(l1.cbegin(), next(l2.cbegin()));
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db3.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db3.pass.cpp
index b28abfb9b573..521093e45c03 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db3.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db3.pass.cpp
@@ -17,18 +17,15 @@
 
 #include <unordered_set>
 #include <cassert>
-#include <exception>
-#include <cstdlib>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     int a1[] = {1, 2, 3};
     std::unordered_multiset<int> l1(a1, a1+3);
     std::unordered_multiset<int> l2(a1, a1+3);
     std::unordered_multiset<int>::iterator i = l1.erase(l2.cbegin(), next(l2.cbegin()));
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db4.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db4.pass.cpp
index e8234cdefb90..950a8b63243a 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db4.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/erase_iter_iter_db4.pass.cpp
@@ -17,17 +17,14 @@
 
 #include <unordered_set>
 #include <cassert>
-#include <exception>
-#include <cstdlib>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     int a1[] = {1, 2, 3};
     std::unordered_multiset<int> l1(a1, a1+3);
     std::unordered_multiset<int>::iterator i = l1.erase(next(l1.cbegin()), l1.cbegin());
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/max_load_factor.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/max_load_factor.pass.cpp
new file mode 100644
index 000000000000..3ca44fcafc80
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/max_load_factor.pass.cpp
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_set>
+
+// template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>,
+//           class Alloc = allocator<Value>>
+// class unordered_multiset
+
+// float max_load_factor() const;
+// void max_load_factor(float mlf);
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_set>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    typedef std::unordered_multiset<int> C;
+    C c;
+    c.max_load_factor(0);
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/bucket.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/bucket.pass.cpp
new file mode 100644
index 000000000000..29d0aae70efb
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.set/bucket.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_set>
+
+// template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>,
+//           class Alloc = allocator<Value>>
+// class unordered_set
+
+// size_type bucket(const key_type& __k) const;
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_set>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    typedef std::unordered_set<int> C;
+    C c;
+    (void) c.bucket(3);
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/bucket_size.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/bucket_size.pass.cpp
new file mode 100644
index 000000000000..c12eb2ea81cd
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.set/bucket_size.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_set>
+
+// template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>,
+//           class Alloc = allocator<Value>>
+// class unordered_set
+
+// size_type bucket_size(size_type n) const
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_set>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    typedef std::unordered_set<int> C;
+    C c;
+    (void) c.bucket_size(3);
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/db_insert_hint_const_lvalue.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/db_insert_hint_const_lvalue.pass.cpp
index 70b096c7b812..55a571334765 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/db_insert_hint_const_lvalue.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/db_insert_hint_const_lvalue.pass.cpp
@@ -20,19 +20,16 @@
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
-        typedef std::unordered_set<double> C;
-        typedef C::iterator R;
-        typedef C::value_type P;
-        C c;
-        C c2;
-        C::const_iterator e = c2.end();
-        P v(3.5);
-        R r = c.insert(e, v);
-        assert(false);
-    }
+int main(int, char**) {
+    typedef std::unordered_set<double> C;
+    typedef C::iterator R;
+    typedef C::value_type P;
+    C c;
+    C c2;
+    C::const_iterator e = c2.end();
+    P v(3.5);
+    R r = c.insert(e, v);
+    assert(false);
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/db_iterators_10.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/db_iterators_10.pass.cpp
new file mode 100644
index 000000000000..162270504438
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.set/db_iterators_10.pass.cpp
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_set>
+
+// Dereference non-dereferenceable iterator.
+
+// UNSUPPORTED: libcxx-no-debug-mode
+// UNSUPPORTED: c++03
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_set>
+#include <cassert>
+#include <functional>
+
+#include "test_macros.h"
+#include "min_allocator.h"
+
+int main(int, char**) {
+    typedef int T;
+    typedef std::unordered_set<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
+    C c(1);
+    C::iterator i = c.end();
+    (void) *i;
+    assert(false);
+
+    return 0;
+}

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
index 90221a7801a1..8b3002f00c39 100644
--- 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
@@ -17,16 +17,10 @@
 
 #include <unordered_set>
 #include <cassert>
-#include <iterator>
-#include <exception>
-#include <cstdlib>
 
 #include "test_macros.h"
-#include "min_allocator.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef int T;
     typedef std::unordered_set<T> C;
     C c(1);
@@ -35,17 +29,6 @@ int main(int, char**)
     assert(i == c.end());
     ++i;
     assert(false);
-    }
-#if TEST_STD_VER >= 11
-    {
-    typedef int T;
-    typedef std::unordered_set<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
-    C c(1);
-    C::iterator i = c.begin();
-    ++i;
-    assert(i == c.end());
-    ++i;
-    assert(false);
-    }
-#endif
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/db_iterators_8.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/db_iterators_8.pass.cpp
index 3fb1c86bf063..88eec7f053d6 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/db_iterators_8.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/db_iterators_8.pass.cpp
@@ -17,31 +17,16 @@
 
 #include <unordered_set>
 #include <cassert>
-#include <iterator>
-#include <exception>
-#include <cstdlib>
 
 #include "test_macros.h"
-#include "min_allocator.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef int T;
     typedef std::unordered_set<T> C;
     C c(1);
     C::iterator i = c.end();
     (void) *i;
     assert(false);
-    }
-#if TEST_STD_VER >= 11
-    {
-    typedef int T;
-    typedef std::unordered_set<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
-    C c(1);
-    C::iterator i = c.end();
-    (void) *i;
-    assert(false);
-    }
-#endif
+
+    return 0;
 }

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
new file mode 100644
index 000000000000..eb7474c7ce41
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.set/db_iterators_9.pass.cpp
@@ -0,0 +1,37 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_set>
+
+// Increment iterator past end.
+
+// UNSUPPORTED: libcxx-no-debug-mode
+// UNSUPPORTED: c++03
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_set>
+#include <cassert>
+#include <functional>
+
+#include "test_macros.h"
+#include "min_allocator.h"
+
+int main(int, char**) {
+    typedef int T;
+    typedef std::unordered_set<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
+    C c(1);
+    C::iterator i = c.begin();
+    ++i;
+    assert(i == c.end());
+    ++i;
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_10.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_10.pass.cpp
new file mode 100644
index 000000000000..ab1039d3750e
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_10.pass.cpp
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_set>
+
+// Dereference non-dereferenceable iterator.
+
+// UNSUPPORTED: libcxx-no-debug-mode
+// UNSUPPORTED: c++03
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_set>
+#include <cassert>
+#include <functional>
+
+#include "test_macros.h"
+#include "min_allocator.h"
+
+int main(int, char**) {
+    typedef int T;
+    typedef std::unordered_set<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
+    C c(1);
+    C::local_iterator i = c.end(0);
+    (void) *i;
+    assert(false);
+
+    return 0;
+}

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
index f506f423d132..32471dd5e724 100644
--- 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
@@ -17,16 +17,10 @@
 
 #include <unordered_set>
 #include <cassert>
-#include <iterator>
-#include <exception>
-#include <cstdlib>
 
 #include "test_macros.h"
-#include "min_allocator.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef int T;
     typedef std::unordered_set<T> C;
     C c(1);
@@ -34,17 +28,6 @@ int main(int, char**)
     ++i;
     ++i;
     assert(false);
-    }
-#if TEST_STD_VER >= 11
-    {
-    typedef int T;
-    typedef std::unordered_set<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
-    C c(1);
-    C::local_iterator i = c.begin(0);
-    ++i;
-    ++i;
-    assert(false);
-    }
-#endif
 
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_8.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_8.pass.cpp
index fe998c539dd5..285fc4284d7c 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_8.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_8.pass.cpp
@@ -17,32 +17,16 @@
 
 #include <unordered_set>
 #include <cassert>
-#include <iterator>
-#include <exception>
-#include <cstdlib>
 
 #include "test_macros.h"
-#include "min_allocator.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     typedef int T;
     typedef std::unordered_set<T> C;
     C c(1);
     C::local_iterator i = c.end(0);
     (void) *i;
-
     assert(false);
-    }
-#if TEST_STD_VER >= 11
-    {
-    typedef int T;
-    typedef std::unordered_set<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
-    C c(1);
-    C::local_iterator i = c.end(0);
-    (void) *i;
-    assert(false);
-    }
-#endif
+
+    return 0;
 }

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
new file mode 100644
index 000000000000..3304866f19b4
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.set/db_local_iterators_9.pass.cpp
@@ -0,0 +1,36 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_set>
+
+// Increment local_iterator past end.
+
+// UNSUPPORTED: libcxx-no-debug-mode
+// UNSUPPORTED: c++03
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_set>
+#include <cassert>
+#include <functional>
+
+#include "test_macros.h"
+#include "min_allocator.h"
+
+int main(int, char**) {
+    typedef int T;
+    typedef std::unordered_set<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
+    C c(1);
+    C::local_iterator i = c.begin(0);
+    ++i;
+    ++i;
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/db_move.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/db_move.pass.cpp
index 5737270b0462..11280400e079 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/db_move.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/db_move.pass.cpp
@@ -22,17 +22,14 @@
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
-        std::unordered_set<int> s1 = {1, 2, 3};
-        std::unordered_set<int>::iterator i = s1.begin();
-        int k = *i;
-        std::unordered_set<int> s2 = std::move(s1);
-        assert(*i == k);
-        s2.erase(i);
-        assert(s2.size() == 2);
-    }
+int main(int, char**) {
+    std::unordered_set<int> s1 = {1, 2, 3};
+    std::unordered_set<int>::iterator i = s1.begin();
+    int k = *i;
+    std::unordered_set<int> s2 = std::move(s1);
+    assert(*i == k);
+    s2.erase(i);
+    assert(s2.size() == 2);
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/unord.set.swap/db_swap_1.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/db_swap_1.pass.cpp
similarity index 60%
rename from libcxx/test/libcxx/containers/unord/unord.set/unord.set.swap/db_swap_1.pass.cpp
rename to libcxx/test/libcxx/containers/unord/unord.set/db_swap_1.pass.cpp
index d66e7e3f491e..dd0110951461 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/unord.set.swap/db_swap_1.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/db_swap_1.pass.cpp
@@ -24,22 +24,19 @@
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
-        int a1[] = {1, 3, 7, 9, 10};
-        int a2[] = {0, 2, 4, 5, 6, 8, 11};
-        std::unordered_set<int> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
-        std::unordered_set<int> c2(a2, a2+sizeof(a2)/sizeof(a2[0]));
-        std::unordered_set<int>::iterator i1 = c1.begin();
-        std::unordered_set<int>::iterator i2 = c2.begin();
-        swap(c1, c2);
-        c1.erase(i2);
-        c2.erase(i1);
-        std::unordered_set<int>::iterator j = i1;
-        c1.erase(i1);
-        assert(false);
-    }
+int main(int, char**) {
+    int a1[] = {1, 3, 7, 9, 10};
+    int a2[] = {0, 2, 4, 5, 6, 8, 11};
+    std::unordered_set<int> c1(a1, a1+sizeof(a1)/sizeof(a1[0]));
+    std::unordered_set<int> c2(a2, a2+sizeof(a2)/sizeof(a2[0]));
+    std::unordered_set<int>::iterator i1 = c1.begin();
+    std::unordered_set<int>::iterator i2 = c2.begin();
+    swap(c1, c2);
+    c1.erase(i2);
+    c2.erase(i1);
+    std::unordered_set<int>::iterator j = i1;
+    c1.erase(i1);
+    assert(false);
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_db1.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_db1.pass.cpp
index 91314832dd9d..5f673f1ffced 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_db1.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_db1.pass.cpp
@@ -20,13 +20,12 @@
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     int a1[] = {1, 2, 3};
     std::unordered_set<int> l1(a1, a1+3);
     std::unordered_set<int>::const_iterator i = l1.end();
     l1.erase(i);
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_db2.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_db2.pass.cpp
index 3763f01b65a7..79385c8616a4 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_db2.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_db2.pass.cpp
@@ -18,18 +18,16 @@
 #include <unordered_set>
 #include <cassert>
 #include <cstdlib>
-#include <exception>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     int a1[] = {1, 2, 3};
     std::unordered_set<int> l1(a1, a1+3);
     std::unordered_set<int> l2(a1, a1+3);
     std::unordered_set<int>::const_iterator i = l2.begin();
     l1.erase(i);
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db1.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db1.pass.cpp
index 40824dd12d82..556e4b3faf72 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db1.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db1.pass.cpp
@@ -17,18 +17,15 @@
 
 #include <unordered_set>
 #include <cassert>
-#include <exception>
-#include <cstdlib>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     int a1[] = {1, 2, 3};
     std::unordered_set<int> l1(a1, a1+3);
     std::unordered_set<int> l2(a1, a1+3);
     std::unordered_set<int>::iterator i = l1.erase(l2.cbegin(), next(l1.cbegin()));
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db2.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db2.pass.cpp
index c492eee6e74d..45397419e91e 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db2.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db2.pass.cpp
@@ -17,18 +17,15 @@
 
 #include <unordered_set>
 #include <cassert>
-#include <exception>
-#include <cstdlib>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     int a1[] = {1, 2, 3};
     std::unordered_set<int> l1(a1, a1+3);
     std::unordered_set<int> l2(a1, a1+3);
     std::unordered_set<int>::iterator i = l1.erase(l1.cbegin(), next(l2.cbegin()));
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db3.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db3.pass.cpp
index a9e21fc4985f..e4f3a31703c0 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db3.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db3.pass.cpp
@@ -17,18 +17,15 @@
 
 #include <unordered_set>
 #include <cassert>
-#include <exception>
-#include <cstdlib>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     int a1[] = {1, 2, 3};
     std::unordered_set<int> l1(a1, a1+3);
     std::unordered_set<int> l2(a1, a1+3);
     std::unordered_set<int>::iterator i = l1.erase(l2.cbegin(), next(l2.cbegin()));
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db4.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db4.pass.cpp
index 666e9b488971..b336db933299 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db4.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/erase_iter_iter_db4.pass.cpp
@@ -17,17 +17,14 @@
 
 #include <unordered_set>
 #include <cassert>
-#include <exception>
-#include <cstdlib>
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
+int main(int, char**) {
     int a1[] = {1, 2, 3};
     std::unordered_set<int> l1(a1, a1+3);
     std::unordered_set<int>::iterator i = l1.erase(next(l1.cbegin()), l1.cbegin());
     assert(false);
-    }
+
+    return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/max_load_factor.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/max_load_factor.pass.cpp
new file mode 100644
index 000000000000..7fd34654347a
--- /dev/null
+++ b/libcxx/test/libcxx/containers/unord/unord.set/max_load_factor.pass.cpp
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <unordered_set>
+
+// template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>,
+//           class Alloc = allocator<Value>>
+// class unordered_set
+
+// float max_load_factor() const;
+// void max_load_factor(float mlf);
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <unordered_set>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    typedef std::unordered_set<int> C;
+    C c;
+    c.max_load_factor(-0.5f);
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.access/back.const.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.access/back.const.pass.cpp
new file mode 100644
index 000000000000..521584f01e6f
--- /dev/null
+++ b/libcxx/test/libcxx/strings/basic.string/string.access/back.const.pass.cpp
@@ -0,0 +1,28 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <string>
+
+// const charT& back() const;
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <string>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    std::string const s;
+    (void) s.back();
+    assert(false);
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.access/back.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.access/back.pass.cpp
new file mode 100644
index 000000000000..4b675ab9412e
--- /dev/null
+++ b/libcxx/test/libcxx/strings/basic.string/string.access/back.pass.cpp
@@ -0,0 +1,28 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <string>
+
+//       charT& back();
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <string>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    std::string s;
+    (void) s.back();
+    assert(false);
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.access/front.const.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.access/front.const.pass.cpp
new file mode 100644
index 000000000000..b023458cb1ce
--- /dev/null
+++ b/libcxx/test/libcxx/strings/basic.string/string.access/front.const.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <string>
+
+// const charT& front() const;
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <string>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    std::string const s;
+    (void) s.front();
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.access/front.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.access/front.pass.cpp
new file mode 100644
index 000000000000..51f4d8286221
--- /dev/null
+++ b/libcxx/test/libcxx/strings/basic.string/string.access/front.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <string>
+
+//       charT& front();
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <string>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    std::string s;
+    (void) s.front();
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.access/index.const.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.access/index.const.pass.cpp
new file mode 100644
index 000000000000..c54902ec95bb
--- /dev/null
+++ b/libcxx/test/libcxx/strings/basic.string/string.access/index.const.pass.cpp
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <string>
+
+// const_reference operator[](size_type pos) const;
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <string>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    std::string const s;
+    char c = s[0];
+    assert(c == '\0');
+    c = s[1];
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.access/index.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.access/index.pass.cpp
new file mode 100644
index 000000000000..3c75a45f48da
--- /dev/null
+++ b/libcxx/test/libcxx/strings/basic.string/string.access/index.pass.cpp
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <string>
+
+//       reference operator[](size_type pos);
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <string>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    std::string s;
+    char c = s[0];
+    assert(c == '\0');
+    c = s[1];
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp
new file mode 100644
index 000000000000..6812ded01d17
--- /dev/null
+++ b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14
+// <optional>
+
+// constexpr T& optional<T>::operator*() &;
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <optional>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    std::optional<int> opt;
+    int x = *opt; (void)x;
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp
new file mode 100644
index 000000000000..610fcebb11fd
--- /dev/null
+++ b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14
+// <optional>
+
+// constexpr const T& optional<T>::operator*() const &;
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <optional>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    const std::optional<int> opt;
+    int x = *opt; (void)x;
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp
new file mode 100644
index 000000000000..d55832c2af20
--- /dev/null
+++ b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14
+// <optional>
+
+// constexpr T&& optional<T>::operator*() const &&;
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <optional>
+#include <cassert>
+#include <utility>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+    std::optional<int> opt;
+    int x = *std::move(opt); (void)x;
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp
new file mode 100644
index 000000000000..8d46cf292bd7
--- /dev/null
+++ b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14
+// <optional>
+
+// constexpr T&& optional<T>::operator*() &&;
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <optional>
+#include <cassert>
+#include <utility>
+
+#include "test_macros.h"
+
+
+int main(int, char**) {
+    std::optional<int> opt;
+    int x = *std::move(opt); (void)x;
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/op_arrow.pass.cpp b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/op_arrow.pass.cpp
new file mode 100644
index 000000000000..ee8f2b642405
--- /dev/null
+++ b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/op_arrow.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14
+// <optional>
+
+// constexpr T* optional<T>::operator->();
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <optional>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct X {
+    int test() noexcept {return 3;}
+};
+
+int main(int, char**) {
+    std::optional<X> opt;
+    assert(opt->test() == 3);
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/op_arrow_const.pass.cpp b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/op_arrow_const.pass.cpp
new file mode 100644
index 000000000000..c37a3e9a458a
--- /dev/null
+++ b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/op_arrow_const.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14
+// <optional>
+
+// constexpr const T* optional<T>::operator->() const;
+
+// UNSUPPORTED: libcxx-no-debug-mode
+
+#define _LIBCPP_DEBUG 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <optional>
+#include <cassert>
+
+#include "test_macros.h"
+
+struct X {
+    constexpr int test() const {return 3;}
+};
+
+int main(int, char**) {
+    const std::optional<X> opt;
+    assert(opt->test() == 3);
+    assert(false);
+
+    return 0;
+}

diff  --git a/libcxx/test/std/containers/unord/unord.map/bucket_size.pass.cpp b/libcxx/test/std/containers/unord/unord.map/bucket_size.pass.cpp
index d46160130dd2..31adf31e9306 100644
--- a/libcxx/test/std/containers/unord/unord.map/bucket_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/bucket_size.pass.cpp
@@ -14,10 +14,6 @@
 
 // size_type bucket_size(size_type n) const
 
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <unordered_map>
 #include <string>
 #include <cassert>
@@ -70,14 +66,6 @@ int main(int, char**)
         LIBCPP_ASSERT(c.bucket_size(4) == 1);
     }
 #endif
-#if _LIBCPP_DEBUG_LEVEL >= 1
-    {
-        typedef std::unordered_map<int, std::string> C;
-        C c;
-        (void) c.bucket_size(3);
-        assert(false);
-    }
-#endif
 
-  return 0;
+    return 0;
 }

diff  --git a/libcxx/test/std/containers/unord/unord.map/max_load_factor.pass.cpp b/libcxx/test/std/containers/unord/unord.map/max_load_factor.pass.cpp
index 8620dd1bd46e..070ba1e329bf 100644
--- a/libcxx/test/std/containers/unord/unord.map/max_load_factor.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/max_load_factor.pass.cpp
@@ -15,11 +15,6 @@
 // float max_load_factor() const;
 // void max_load_factor(float mlf);
 
-
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <unordered_map>
 #include <string>
 #include <cassert>
@@ -57,14 +52,6 @@ int main(int, char**)
         assert(c.max_load_factor() == 2.5);
     }
 #endif
-#if _LIBCPP_DEBUG_LEVEL >= 1
-    {
-        typedef std::unordered_map<int, std::string> C;
-        C c;
-        c.max_load_factor(0);
-        assert(false);
-    }
-#endif
 
-  return 0;
+    return 0;
 }

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/bucket.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/bucket.pass.cpp
index fc40eb8ad3b5..981cb332caff 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/bucket.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/bucket.pass.cpp
@@ -14,10 +14,6 @@
 
 // size_type bucket(const key_type& __k) const;
 
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <unordered_map>
 #include <string>
 #include <cassert>
@@ -66,14 +62,6 @@ int main(int, char**)
             LIBCPP_ASSERT(c.bucket(i) == i % bc);
     }
 #endif
-#if _LIBCPP_DEBUG_LEVEL >= 1
-    {
-        typedef std::unordered_multimap<int, std::string> C;
-        C c;
-        (void) c.bucket(3);
-        assert(false);
-    }
-#endif
 
-  return 0;
+    return 0;
 }

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/bucket_size.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/bucket_size.pass.cpp
index 64169cfe6371..7e0a9474eeb5 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/bucket_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/bucket_size.pass.cpp
@@ -14,10 +14,6 @@
 
 // size_type bucket_size(size_type n) const
 
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <unordered_map>
 #include <string>
 #include <cassert>
@@ -74,14 +70,6 @@ int main(int, char**)
         LIBCPP_ASSERT(c.bucket_size(6) == 0);
     }
 #endif
-#if _LIBCPP_DEBUG_LEVEL >= 1
-    {
-        typedef std::unordered_multimap<int, std::string> C;
-        C c;
-        (void) c.bucket_size(3);
-        assert(false);
-    }
-#endif
 
-  return 0;
+    return 0;
 }

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/max_load_factor.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/max_load_factor.pass.cpp
index 05a964d7998a..ab08808783df 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/max_load_factor.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/max_load_factor.pass.cpp
@@ -15,10 +15,6 @@
 // float max_load_factor() const;
 // void max_load_factor(float mlf);
 
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <unordered_map>
 #include <string>
 #include <cassert>
@@ -56,14 +52,6 @@ int main(int, char**)
         assert(c.max_load_factor() == 2.5);
     }
 #endif
-#if _LIBCPP_DEBUG_LEVEL >= 1
-    {
-        typedef std::unordered_multimap<int, std::string> C;
-        C c;
-        c.max_load_factor(0);
-        assert(false);
-    }
-#endif
 
-  return 0;
+    return 0;
 }

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/bucket.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/bucket.pass.cpp
index 262a840a6b1c..5436c1e94220 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/bucket.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/bucket.pass.cpp
@@ -14,10 +14,6 @@
 
 // size_type bucket(const key_type& __k) const;
 
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <unordered_set>
 #include <cassert>
 
@@ -65,14 +61,6 @@ int main(int, char**)
             LIBCPP_ASSERT(c.bucket(i) == i % bc);
     }
 #endif
-#if _LIBCPP_DEBUG_LEVEL >= 1
-    {
-        typedef std::unordered_multiset<int> C;
-        C c;
-        (void) c.bucket(3);
-        assert(false);
-    }
-#endif
 
-  return 0;
+    return 0;
 }

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/bucket_size.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/bucket_size.pass.cpp
index a64a1787e5f3..be7a651416e2 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/bucket_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/bucket_size.pass.cpp
@@ -14,10 +14,6 @@
 
 // size_type bucket_size(size_type n) const
 
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <unordered_set>
 #include <cassert>
 
@@ -73,14 +69,5 @@ int main(int, char**)
         LIBCPP_ASSERT(c.bucket_size(6) == 0);
     }
 #endif
-#if _LIBCPP_DEBUG_LEVEL >= 1
-    {
-        typedef std::unordered_multiset<int> C;
-        C c;
-        (void) c.bucket_size(3);
-        assert(false);
-    }
-#endif
-
-  return 0;
+    return 0;
 }

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp
index 566ea42d09fe..4d6738ba4e8d 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp
@@ -15,10 +15,6 @@
 // float max_load_factor() const;
 // void max_load_factor(float mlf);
 
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <unordered_set>
 #include <cassert>
 
@@ -55,14 +51,6 @@ int main(int, char**)
         assert(c.max_load_factor() == 2.5);
     }
 #endif
-#if _LIBCPP_DEBUG_LEVEL >= 1
-    {
-        typedef std::unordered_multiset<int> C;
-        C c;
-        c.max_load_factor(0);
-        assert(false);
-    }
-#endif
 
-  return 0;
+    return 0;
 }

diff  --git a/libcxx/test/std/containers/unord/unord.set/bucket.pass.cpp b/libcxx/test/std/containers/unord/unord.set/bucket.pass.cpp
index 4b2cb0dfc9d5..bcaa77b4aa1f 100644
--- a/libcxx/test/std/containers/unord/unord.set/bucket.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/bucket.pass.cpp
@@ -14,10 +14,6 @@
 
 // size_type bucket(const key_type& __k) const;
 
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <unordered_set>
 #include <cassert>
 
@@ -64,14 +60,6 @@ int main(int, char**)
             LIBCPP_ASSERT(c.bucket(i) == i % bc);
     }
 #endif
-#if _LIBCPP_DEBUG_LEVEL >= 1
-    {
-        typedef std::unordered_set<int> C;
-        C c;
-        (void) c.bucket(3);
-        assert(false);
-    }
-#endif
 
-  return 0;
+    return 0;
 }

diff  --git a/libcxx/test/std/containers/unord/unord.set/bucket_size.pass.cpp b/libcxx/test/std/containers/unord/unord.set/bucket_size.pass.cpp
index 5cea7fe04826..1016c499d674 100644
--- a/libcxx/test/std/containers/unord/unord.set/bucket_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/bucket_size.pass.cpp
@@ -14,10 +14,6 @@
 
 // size_type bucket_size(size_type n) const
 
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <unordered_set>
 #include <cassert>
 
@@ -68,14 +64,6 @@ int main(int, char**)
         LIBCPP_ASSERT(c.bucket_size(4) == 1);
     }
 #endif
-#if _LIBCPP_DEBUG_LEVEL >= 1
-    {
-        typedef std::unordered_set<int> C;
-        C c;
-        (void) c.bucket_size(3);
-        assert(false);
-    }
-#endif
 
-  return 0;
+    return 0;
 }

diff  --git a/libcxx/test/std/containers/unord/unord.set/max_load_factor.pass.cpp b/libcxx/test/std/containers/unord/unord.set/max_load_factor.pass.cpp
index d6f7727b2807..9951956da66d 100644
--- a/libcxx/test/std/containers/unord/unord.set/max_load_factor.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/max_load_factor.pass.cpp
@@ -15,10 +15,6 @@
 // float max_load_factor() const;
 // void max_load_factor(float mlf);
 
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <unordered_set>
 #include <cassert>
 
@@ -55,14 +51,6 @@ int main(int, char**)
         assert(c.max_load_factor() == 2.5);
     }
 #endif
-#if _LIBCPP_DEBUG_LEVEL >= 1
-    {
-        typedef std::unordered_set<int> C;
-        C c;
-        c.max_load_factor(-0.5f);
-        assert(false);
-    }
-#endif
 
-  return 0;
+    return 0;
 }

diff  --git a/libcxx/test/std/strings/basic.string/string.access/back.pass.cpp b/libcxx/test/std/strings/basic.string/string.access/back.pass.cpp
index e2a0c2679889..783daadc268c 100644
--- a/libcxx/test/std/strings/basic.string/string.access/back.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.access/back.pass.cpp
@@ -11,10 +11,6 @@
 // const charT& back() const;
 //       charT& back();
 
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <string>
 #include <cassert>
 
@@ -50,13 +46,6 @@ int main(int, char**)
     test(S("1234567890123456789012345678901234567890"));
     }
 #endif
-#ifdef _LIBCPP_DEBUG
-    {
-        std::string s;
-        (void) s.back();
-        assert(false);
-    }
-#endif
 
-  return 0;
+    return 0;
 }

diff  --git a/libcxx/test/std/strings/basic.string/string.access/front.pass.cpp b/libcxx/test/std/strings/basic.string/string.access/front.pass.cpp
index eaaa678126ae..4cc9f31caaf4 100644
--- a/libcxx/test/std/strings/basic.string/string.access/front.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.access/front.pass.cpp
@@ -11,10 +11,6 @@
 // const charT& front() const;
 //       charT& front();
 
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <string>
 #include <cassert>
 
@@ -50,13 +46,6 @@ int main(int, char**)
     test(S("1234567890123456789012345678901234567890"));
     }
 #endif
-#ifdef _LIBCPP_DEBUG
-    {
-        std::string s;
-        (void) s.front();
-        assert(false);
-    }
-#endif
 
-  return 0;
+    return 0;
 }

diff  --git a/libcxx/test/std/strings/basic.string/string.access/index.pass.cpp b/libcxx/test/std/strings/basic.string/string.access/index.pass.cpp
index 782d92ef5a8d..8de2583ce13c 100644
--- a/libcxx/test/std/strings/basic.string/string.access/index.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.access/index.pass.cpp
@@ -11,10 +11,6 @@
 // const_reference operator[](size_type pos) const;
 //       reference operator[](size_type pos);
 
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <string>
 #include <cassert>
 
@@ -59,15 +55,6 @@ int main(int, char**)
     assert(s2[0] == '\0');
     }
 #endif
-#ifdef _LIBCPP_DEBUG
-    {
-        std::string s;
-        char c = s[0];
-        assert(c == '\0');
-        c = s[1];
-        assert(false);
-    }
-#endif
 
-  return 0;
+    return 0;
 }

diff  --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp
index 54c14645f1dd..98216df242cc 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp
@@ -11,10 +11,6 @@
 
 // constexpr T& optional<T>::operator*() &;
 
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <optional>
 #include <type_traits>
 #include <cassert>
@@ -62,13 +58,6 @@ int main(int, char**)
         assert((*opt).test() == 4);
     }
     static_assert(test() == 7, "");
-#ifdef _LIBCPP_DEBUG
-    {
-        optional<X> opt;
-        assert((*opt).test() == 3);
-        assert(false);
-    }
-#endif  // _LIBCPP_DEBUG
 
-  return 0;
+    return 0;
 }

diff  --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp
index 28fb6662b417..f61cfcee7506 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp
@@ -11,10 +11,6 @@
 
 // constexpr const T& optional<T>::operator*() const &;
 
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <optional>
 #include <type_traits>
 #include <cassert>
@@ -58,13 +54,6 @@ int main(int, char**)
         constexpr optional<Y> opt(Y{});
         assert((*opt).test() == 2);
     }
-#ifdef _LIBCPP_DEBUG
-    {
-        const optional<X> opt;
-        assert((*opt).test() == 3);
-        assert(false);
-    }
-#endif  // _LIBCPP_DEBUG
 
-  return 0;
+    return 0;
 }

diff  --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp
index 243919788778..bc6745de161d 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp
@@ -11,10 +11,6 @@
 
 // constexpr T&& optional<T>::operator*() const &&;
 
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <optional>
 #include <type_traits>
 #include <cassert>
@@ -58,13 +54,6 @@ int main(int, char**)
         constexpr optional<Y> opt(Y{});
         assert((*std::move(opt)).test() == 2);
     }
-#ifdef _LIBCPP_DEBUG
-    {
-        optional<X> opt;
-        assert((*std::move(opt)).test() == 5);
-        assert(false);
-    }
-#endif  // _LIBCPP_DEBUG
 
-  return 0;
+    return 0;
 }

diff  --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp
index bee0c26bb155..c8ee573aea9a 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp
@@ -11,10 +11,6 @@
 
 // constexpr T&& optional<T>::operator*() &&;
 
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <optional>
 #include <type_traits>
 #include <cassert>
@@ -62,13 +58,6 @@ int main(int, char**)
         assert((*std::move(opt)).test() == 6);
     }
     static_assert(test() == 7, "");
-#ifdef _LIBCPP_DEBUG
-    {
-        optional<X> opt;
-        assert((*std::move(opt)).test() == 3);
-        assert(false);
-    }
-#endif  // _LIBCPP_DEBUG
 
-  return 0;
+    return 0;
 }

diff  --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow.pass.cpp
index 56f4b2a4e16b..7cf043f9375c 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow.pass.cpp
@@ -11,10 +11,6 @@
 
 // constexpr T* optional<T>::operator->();
 
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <optional>
 #include <type_traits>
 #include <cassert>
@@ -61,13 +57,6 @@ int main(int, char**)
     {
         static_assert(test() == 3, "");
     }
-#ifdef _LIBCPP_DEBUG
-    {
-        optional<X> opt;
-        assert(opt->test() == 3);
-        assert(false);
-    }
-#endif  // _LIBCPP_DEBUG
 
-  return 0;
+    return 0;
 }

diff  --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow_const.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow_const.pass.cpp
index d363453c84cb..b9c1fe7794b6 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow_const.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/op_arrow_const.pass.cpp
@@ -11,10 +11,6 @@
 
 // constexpr const T* optional<T>::operator->() const;
 
-#ifdef _LIBCPP_DEBUG
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <optional>
 #include <type_traits>
 #include <cassert>
@@ -65,13 +61,6 @@ int main(int, char**)
         constexpr optional<Z> opt(Z{});
         static_assert(opt->test() == 1, "");
     }
-#ifdef _LIBCPP_DEBUG
-    {
-        const optional<X> opt;
-        assert(opt->test() == 3);
-        assert(false);
-    }
-#endif  // _LIBCPP_DEBUG
 
-  return 0;
+    return 0;
 }


        


More information about the libcxx-commits mailing list