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:
Roger Ferrer Ibanez
2016-11-24 11:28:02 +00:00
parent 01b9f8a698
commit d3584d51a2
2 changed files with 2 additions and 14 deletions

View File

@@ -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;
}