Revert "Revert "Update aosp/master libcxx rebase to r263688""

This reverts commit 1d4a1edbc7.

Change-Id: I2909937fe582f2c5552bc86e7f4d2d5cff0de0aa
This commit is contained in:
Dan Austin
2016-06-08 22:25:43 +00:00
parent 1d4a1edbc7
commit ee226c05af
1396 changed files with 38992 additions and 11535 deletions

View File

@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
// XFAIL: libcpp-no-exceptions
// <string>
// basic_string substr(size_type pos = 0, size_type n = npos) const;
@@ -16,6 +17,7 @@
#include <algorithm>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
template <class S>
@@ -25,7 +27,7 @@ test(const S& s, typename S::size_type pos, typename S::size_type n)
try
{
S str = s.substr(pos, n);
assert(str.__invariants());
LIBCPP_ASSERT(str.__invariants());
assert(pos <= s.size());
typename S::size_type rlen = std::min(n, s.size() - pos);
assert(str.size() == rlen);
@@ -100,7 +102,7 @@ int main()
test(S("lsaijeqhtrbgcdmpfkno"), 20, 0);
test(S("dplqartnfgejichmoskb"), 21, 0);
}
#if __cplusplus >= 201103L
#if TEST_STD_VER >= 11
{
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
test(S(""), 0, 0);