summaryrefslogtreecommitdiffstats
path: root/libcxx/test/containers/unord/unord.multiset/bucket.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/containers/unord/unord.multiset/bucket.pass.cpp')
-rw-r--r--libcxx/test/containers/unord/unord.multiset/bucket.pass.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/libcxx/test/containers/unord/unord.multiset/bucket.pass.cpp b/libcxx/test/containers/unord/unord.multiset/bucket.pass.cpp
index 99a72ab8498..e75a133f361 100644
--- a/libcxx/test/containers/unord/unord.multiset/bucket.pass.cpp
+++ b/libcxx/test/containers/unord/unord.multiset/bucket.pass.cpp
@@ -15,6 +15,10 @@
// size_type bucket(const key_type& __k) const;
+#ifdef _LIBCPP_DEBUG2
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+#endif
+
#include <unordered_set>
#include <cassert>
@@ -61,4 +65,12 @@ int main()
assert(c.bucket(i) == i % bc);
}
#endif
+#if _LIBCPP_DEBUG_LEVEL >= 1
+ {
+ typedef std::unordered_multiset<int> C;
+ C c;
+ C::size_type i = c.bucket(3);
+ assert(false);
+ }
+#endif
}
OpenPOWER on IntegriCloud