summaryrefslogtreecommitdiffstats
path: root/libcxx/test
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test')
-rw-r--r--libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
index f50fbe705ed..dc0bdd047c6 100644
--- a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
+++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
@@ -20,9 +20,11 @@ template <typename T>
void test_max(size_t count)
{
std::allocator<T> a;
- try { a.allocate( count ); }
- catch ( const std::bad_alloc &) { return ; }
- assert (false);
+ try {
+ a.allocate(count);
+ assert(false);
+ } catch (const std::exception &) {
+ }
}
int main()
OpenPOWER on IntegriCloud