diff options
| author | Eric Fiselier <eric@efcs.ca> | 2016-05-07 03:12:24 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2016-05-07 03:12:24 +0000 |
| commit | 4524d6e73953322eafee72aba62ddebef8f7c5cd (patch) | |
| tree | af96f013e568938881e34384588f76921eb41650 /libcxx/test/std | |
| parent | 522a7f953522bf8c133bc51b305f52c29c5d6595 (diff) | |
| download | bcm5719-llvm-4524d6e73953322eafee72aba62ddebef8f7c5cd.tar.gz bcm5719-llvm-4524d6e73953322eafee72aba62ddebef8f7c5cd.zip | |
Change allocator<T>::allocate to throw length_error, not bad_alloc
llvm-svn: 268842
Diffstat (limited to 'libcxx/test/std')
| -rw-r--r-- | libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp | 8 |
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() |

