Add asserts that the nullptr is maintained in string erase operations.

llvm-svn: 303899
This commit is contained in:
Billy Robert O'Neal III
2017-05-25 19:01:14 +00:00
parent 9b22df691b
commit 4deabc97a1
4 changed files with 6 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ test(S s, typename S::difference_type pos, S expected)
typename S::const_iterator p = s.begin() + pos;
typename S::iterator i = s.erase(p);
LIBCPP_ASSERT(s.__invariants());
assert(s[s.size()] == typename S::value_type());
assert(s == expected);
assert(i - s.begin() == pos);
}