mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 01:18:52 +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:
@@ -29,7 +29,7 @@ test()
|
||||
static_assert((noexcept(S()) == noexcept(typename S::allocator_type())), "" );
|
||||
#endif
|
||||
S s;
|
||||
assert(s.__invariants());
|
||||
LIBCPP_ASSERT(s.__invariants());
|
||||
assert(s.data());
|
||||
assert(s.size() == 0);
|
||||
assert(s.capacity() >= s.size());
|
||||
@@ -42,7 +42,7 @@ test()
|
||||
static_assert((noexcept(S(typename S::allocator_type())) == std::is_nothrow_copy_constructible<typename S::allocator_type>::value), "" );
|
||||
#endif
|
||||
S s(typename S::allocator_type(5));
|
||||
assert(s.__invariants());
|
||||
LIBCPP_ASSERT(s.__invariants());
|
||||
assert(s.data());
|
||||
assert(s.size() == 0);
|
||||
assert(s.capacity() >= s.size());
|
||||
@@ -63,7 +63,7 @@ test2()
|
||||
static_assert((noexcept(S()) == noexcept(typename S::allocator_type())), "" );
|
||||
#endif
|
||||
S s;
|
||||
assert(s.__invariants());
|
||||
LIBCPP_ASSERT(s.__invariants());
|
||||
assert(s.data());
|
||||
assert(s.size() == 0);
|
||||
assert(s.capacity() >= s.size());
|
||||
@@ -76,7 +76,7 @@ test2()
|
||||
static_assert((noexcept(S(typename S::allocator_type())) == std::is_nothrow_copy_constructible<typename S::allocator_type>::value), "" );
|
||||
#endif
|
||||
S s(typename S::allocator_type{});
|
||||
assert(s.__invariants());
|
||||
LIBCPP_ASSERT(s.__invariants());
|
||||
assert(s.data());
|
||||
assert(s.size() == 0);
|
||||
assert(s.capacity() >= s.size());
|
||||
|
||||
Reference in New Issue
Block a user