mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-22 07:51:39 +08:00
Reverting wrong diff
I managed to confuse me with two reviews of the same thing and ended commiting the wrong one. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287868 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// XFAIL: libcpp-no-exceptions
|
||||
// <string>
|
||||
|
||||
// size_type capacity() const;
|
||||
@@ -17,27 +18,21 @@
|
||||
#include "test_allocator.h"
|
||||
#include "min_allocator.h"
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class S>
|
||||
void
|
||||
test(S s)
|
||||
{
|
||||
S::allocator_type::throw_after = 0;
|
||||
#ifndef TEST_HAS_NO_EXCEPTIONS
|
||||
try
|
||||
#endif
|
||||
{
|
||||
while (s.size() < s.capacity())
|
||||
s.push_back(typename S::value_type());
|
||||
assert(s.size() == s.capacity());
|
||||
}
|
||||
#ifndef TEST_HAS_NO_EXCEPTIONS
|
||||
catch (...)
|
||||
{
|
||||
assert(false);
|
||||
}
|
||||
#endif
|
||||
S::allocator_type::throw_after = INT_MAX;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user