mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 18:38:30 +08:00
Guard libc++ specific c.__invariants() tests in LIBCPP_ASSERT macros
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267947 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -38,7 +38,7 @@ test(S str, unsigned pos)
|
||||
try
|
||||
{
|
||||
S s2(str, pos);
|
||||
assert(s2.__invariants());
|
||||
LIBCPP_ASSERT(s2.__invariants());
|
||||
assert(pos <= str.size());
|
||||
unsigned rlen = str.size() - pos;
|
||||
assert(s2.size() == rlen);
|
||||
@@ -61,7 +61,7 @@ test(S str, unsigned pos, unsigned n)
|
||||
try
|
||||
{
|
||||
S s2(str, pos, n);
|
||||
assert(s2.__invariants());
|
||||
LIBCPP_ASSERT(s2.__invariants());
|
||||
assert(pos <= str.size());
|
||||
unsigned rlen = std::min<unsigned>(str.size() - pos, n);
|
||||
assert(s2.size() == rlen);
|
||||
@@ -84,7 +84,7 @@ test(S str, unsigned pos, unsigned n, const typename S::allocator_type& a)
|
||||
try
|
||||
{
|
||||
S s2(str, pos, n, a);
|
||||
assert(s2.__invariants());
|
||||
LIBCPP_ASSERT(s2.__invariants());
|
||||
assert(pos <= str.size());
|
||||
unsigned rlen = std::min<unsigned>(str.size() - pos, n);
|
||||
assert(s2.size() == rlen);
|
||||
|
Reference in New Issue
Block a user