Guard libc++ specific c.__invariants() tests in LIBCPP_ASSERT macros

llvm-svn: 267947
This commit is contained in:
Eric Fiselier
2016-04-28 22:28:23 +00:00
parent 174f8b1981
commit 1f4231f8cf
101 changed files with 390 additions and 342 deletions

View File

@@ -15,6 +15,7 @@
#include <stdexcept>
#include <cassert>
#include "test_macros.h"
#include "min_allocator.h"
template <class S>
@@ -22,7 +23,7 @@ void
test(S s, const typename S::value_type* str, S expected)
{
s.append(str);
assert(s.__invariants());
LIBCPP_ASSERT(s.__invariants());
assert(s == expected);
}