[libcxx] r267947 - Guard libc++ specific c.__invariants() tests in LIBCPP_ASSERT macros

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 28 15:28:24 PDT 2016


Author: ericwf
Date: Thu Apr 28 17:28:23 2016
New Revision: 267947

URL: http://llvm.org/viewvc/llvm-project?rev=267947&view=rev
Log:
Guard libc++ specific c.__invariants() tests in LIBCPP_ASSERT macros

Added:
    libcxx/trunk/test/libcxx/strings/basic.string/
    libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/
    libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db1.pass.cpp
    libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db2.pass.cpp
    libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db1.pass.cpp
    libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db2.pass.cpp
    libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db3.pass.cpp
    libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db4.pass.cpp
    libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_pop_back_db1.pass.cpp
    libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/insert_iter_char_db1.pass.cpp
    libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/insert_iter_size_char_db1.pass.cpp
Removed:
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_db1.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_db2.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db1.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db2.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db3.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db4.pass.cpp
Modified:
    libcxx/trunk/test/libcxx/selftest/test_macros.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector.bool/construct_default.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector.bool/construct_iter_iter.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector.bool/construct_iter_iter_alloc.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector.bool/construct_size.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector.bool/construct_size_value.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector.bool/copy.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_size.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector/vector.cons/copy.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.capacity/reserve.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.capacity/resize_size.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.capacity/resize_size_char.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/alloc.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/char_assignment.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/copy.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/copy_assignment.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/default_noexcept.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/initializer_list.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/move.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/move_alloc.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/move_assign_noexcept.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/move_assignment.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/move_noexcept.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/pointer_assignment.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/substr.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/initializer_list.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/pointer.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/size_char.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/string.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/initializer_list.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/pointer.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/pointer_size.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/rv_string.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/size_char.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/string.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/iter.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/iter_iter.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/pop_back.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/size_size.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/iter_char.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/iter_size_char.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_size_char.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_string.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/char.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/initializer_list.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/pointer.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/string.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_size_char.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer_size.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_size_char.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_swap/swap.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp
    libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_include_order.pass.cpp
    libcxx/trunk/test/support/assert_checkpoint.h
    libcxx/trunk/test/support/platform_support.h
    libcxx/trunk/test/support/test_macros.h

Modified: libcxx/trunk/test/libcxx/selftest/test_macros.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/selftest/test_macros.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/selftest/test_macros.pass.cpp (original)
+++ libcxx/trunk/test/libcxx/selftest/test_macros.pass.cpp Thu Apr 28 17:28:23 2016
@@ -14,45 +14,23 @@
 #error TEST_STD_VER must be defined
 #endif
 
-#ifndef TEST_DECLTYPE
-#error TEST_DECLTYPE must be defined
-#endif
-
 #ifndef TEST_NOEXCEPT
 #error TEST_NOEXCEPT must be defined
 #endif
 
-#ifndef TEST_STATIC_ASSERT
-#error TEST_STATIC_ASSERT must be defined
+#ifndef LIBCPP_ASSERT
+#error LIBCPP_ASSERT must be defined
 #endif
 
-template <class T, class U>
-struct is_same { enum { value = 0 }; };
-
-template <class T>
-struct is_same<T, T> { enum { value = 1 }; };
-
-int foo() { return 0; }
+#ifndef LIBCPP_STATIC_ASSERT
+#error LIBCPP_STATIC_ASSERT must be defined
+#endif
 
 void test_noexcept() TEST_NOEXCEPT
 {
 }
 
-void test_decltype()
-{
-  typedef TEST_DECLTYPE(foo()) MyType;
-  TEST_STATIC_ASSERT((is_same<MyType, int>::value), "is same");
-}
-
-void test_static_assert()
-{
-    TEST_STATIC_ASSERT((is_same<int, int>::value), "is same");
-    TEST_STATIC_ASSERT((!is_same<int, long>::value), "not same");
-}
-
 int main()
 {
     test_noexcept();
-    test_decltype();
-    test_static_assert();
 }

Added: libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db1.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db1.pass.cpp?rev=267947&view=auto
==============================================================================
--- libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db1.pass.cpp (added)
+++ libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db1.pass.cpp Thu Apr 28 17:28:23 2016
@@ -0,0 +1,50 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <string>
+
+// Call erase(const_iterator position) with end()
+
+#if _LIBCPP_DEBUG >= 1
+
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <string>
+#include <cassert>
+#include <cstdlib>
+#include <exception>
+
+#include "min_allocator.h"
+
+int main()
+{
+    {
+    std::string l1("123");
+    std::string::const_iterator i = l1.end();
+    l1.erase(i);
+    assert(false);
+    }
+#if __cplusplus >= 201103L
+    {
+    typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
+    S l1("123");
+    S::const_iterator i = l1.end();
+    l1.erase(i);
+    assert(false);
+    }
+#endif
+}
+
+#else
+
+int main()
+{
+}
+
+#endif

Added: libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db2.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db2.pass.cpp?rev=267947&view=auto
==============================================================================
--- libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db2.pass.cpp (added)
+++ libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db2.pass.cpp Thu Apr 28 17:28:23 2016
@@ -0,0 +1,52 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <string>
+
+// Call erase(const_iterator position) with iterator from another container
+
+#if _LIBCPP_DEBUG >= 1
+
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <string>
+#include <cassert>
+#include <cstdlib>
+#include <exception>
+
+#include "min_allocator.h"
+
+int main()
+{
+    {
+    std::string l1("123");
+    std::string l2("123");
+    std::string::const_iterator i = l2.begin();
+    l1.erase(i);
+    assert(false);
+    }
+#if __cplusplus >= 201103L
+    {
+    typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
+    S l1("123");
+    S l2("123");
+    S::const_iterator i = l2.begin();
+    l1.erase(i);
+    assert(false);
+    }
+#endif
+}
+
+#else
+
+int main()
+{
+}
+
+#endif

Added: libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db1.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db1.pass.cpp?rev=267947&view=auto
==============================================================================
--- libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db1.pass.cpp (added)
+++ libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db1.pass.cpp Thu Apr 28 17:28:23 2016
@@ -0,0 +1,50 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <string>
+
+// Call erase(const_iterator first, const_iterator last); with first iterator from another container
+
+#if _LIBCPP_DEBUG >= 1
+
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <string>
+#include <cassert>
+#include <exception>
+#include <cstdlib>
+
+#include "min_allocator.h"
+
+int main()
+{
+    {
+    std::string l1("123");
+    std::string l2("123");
+    std::string::iterator i = l1.erase(l2.cbegin(), l1.cbegin()+1);
+    assert(false);
+    }
+#if __cplusplus >= 201103L
+    {
+    typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
+    S l1("123");
+    S l2("123");
+    S::iterator i = l1.erase(l2.cbegin(), l1.cbegin()+1);
+    assert(false);
+    }
+#endif
+}
+
+#else
+
+int main()
+{
+}
+
+#endif

Added: libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db2.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db2.pass.cpp?rev=267947&view=auto
==============================================================================
--- libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db2.pass.cpp (added)
+++ libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db2.pass.cpp Thu Apr 28 17:28:23 2016
@@ -0,0 +1,50 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <string>
+
+// Call erase(const_iterator first, const_iterator last); with second iterator from another container
+
+#if _LIBCPP_DEBUG >= 1
+
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <string>
+#include <cassert>
+#include <exception>
+#include <cstdlib>
+
+#include "min_allocator.h"
+
+int main()
+{
+    {
+    std::string l1("123");
+    std::string l2("123");
+    std::string::iterator i = l1.erase(l1.cbegin(), l2.cbegin()+1);
+    assert(false);
+    }
+#if __cplusplus >= 201103L
+    {
+    typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
+    S l1("123");
+    S l2("123");
+    S::iterator i = l1.erase(l1.cbegin(), l2.cbegin()+1);
+    assert(false);
+    }
+#endif
+}
+
+#else
+
+int main()
+{
+}
+
+#endif

Added: libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db3.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db3.pass.cpp?rev=267947&view=auto
==============================================================================
--- libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db3.pass.cpp (added)
+++ libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db3.pass.cpp Thu Apr 28 17:28:23 2016
@@ -0,0 +1,50 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <string>
+
+// Call erase(const_iterator first, const_iterator last); with both iterators from another container
+
+#if _LIBCPP_DEBUG >= 1
+
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <string>
+#include <cassert>
+#include <exception>
+#include <cstdlib>
+
+#include "min_allocator.h"
+
+int main()
+{
+    {
+    std::string l1("123");
+    std::string l2("123");
+    std::string::iterator i = l1.erase(l2.cbegin(), l2.cbegin()+1);
+    assert(false);
+    }
+#if __cplusplus >= 201103L
+    {
+    typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
+    S l1("123");
+    S l2("123");
+    S::iterator i = l1.erase(l2.cbegin(), l2.cbegin()+1);
+    assert(false);
+    }
+#endif
+}
+
+#else
+
+int main()
+{
+}
+
+#endif

Added: libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db4.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db4.pass.cpp?rev=267947&view=auto
==============================================================================
--- libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db4.pass.cpp (added)
+++ libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db4.pass.cpp Thu Apr 28 17:28:23 2016
@@ -0,0 +1,48 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <string>
+
+// Call erase(const_iterator first, const_iterator last); with a bad range
+
+#if _LIBCPP_DEBUG >= 1
+
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+
+#include <string>
+#include <cassert>
+#include <exception>
+#include <cstdlib>
+
+#include "min_allocator.h"
+
+int main()
+{
+    {
+    std::string l1("123");
+    std::string::iterator i = l1.erase(l1.cbegin()+1, l1.cbegin());
+    assert(false);
+    }
+#if __cplusplus >= 201103L
+    {
+    typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
+    S l1("123");
+    S::iterator i = l1.erase(l1.cbegin()+1, l1.cbegin());
+    assert(false);
+    }
+#endif
+}
+
+#else
+
+int main()
+{
+}
+
+#endif

Added: libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_pop_back_db1.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_pop_back_db1.pass.cpp?rev=267947&view=auto
==============================================================================
--- libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_pop_back_db1.pass.cpp (added)
+++ libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/erase_pop_back_db1.pass.cpp Thu Apr 28 17:28:23 2016
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <string>
+
+// void pop_back();
+
+#if _LIBCPP_DEBUG >= 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+#endif
+
+#include <string>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main()
+{
+#if _LIBCPP_DEBUG >= 1
+    {
+        std::string s;
+        s.pop_back();
+        assert(false);
+    }
+#endif
+}

Added: libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/insert_iter_char_db1.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/insert_iter_char_db1.pass.cpp?rev=267947&view=auto
==============================================================================
--- libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/insert_iter_char_db1.pass.cpp (added)
+++ libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/insert_iter_char_db1.pass.cpp Thu Apr 28 17:28:23 2016
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <string>
+
+// iterator insert(const_iterator p, charT c);
+
+#if _LIBCPP_DEBUG >= 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+#endif
+
+#include <string>
+#include <stdexcept>
+#include <cassert>
+
+
+int main()
+{
+#if _LIBCPP_DEBUG >= 1
+    {
+        typedef std::string S;
+        S s;
+        S s2;
+        s.insert(s2.begin(), '1');
+        assert(false);
+    }
+#endif
+}

Added: libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/insert_iter_size_char_db1.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/insert_iter_size_char_db1.pass.cpp?rev=267947&view=auto
==============================================================================
--- libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/insert_iter_size_char_db1.pass.cpp (added)
+++ libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/insert_iter_size_char_db1.pass.cpp Thu Apr 28 17:28:23 2016
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <string>
+
+// iterator insert(const_iterator p, size_type n, charT c);
+
+#if _LIBCPP_DEBUG >= 1
+#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
+#endif
+
+#include <string>
+#include <cassert>
+
+int main()
+{
+#if _LIBCPP_DEBUG >= 1
+    {
+        std::string s;
+        std::string s2;
+        s.insert(s2.begin(), 1, 'a');
+        assert(false);
+    }
+#endif
+}

Modified: libcxx/trunk/test/std/containers/sequences/vector.bool/construct_default.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector.bool/construct_default.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector.bool/construct_default.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector.bool/construct_default.pass.cpp Thu Apr 28 17:28:23 2016
@@ -29,12 +29,12 @@ test0()
 	static_assert((noexcept(C()) == noexcept(typename C::allocator_type())), "" );
 #endif
     C c;
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(c.empty());
     assert(c.get_allocator() == typename C::allocator_type());
 #if TEST_STD_VER >= 11
     C c1 = {};
-    assert(c1.__invariants());
+    LIBCPP_ASSERT(c1.__invariants());
     assert(c1.empty());
     assert(c1.get_allocator() == typename C::allocator_type());
 #endif
@@ -50,7 +50,7 @@ test1(const typename C::allocator_type&
 	static_assert((noexcept(C(typename C::allocator_type())) == std::is_nothrow_copy_constructible<typename C::allocator_type>::value), "" );
 #endif
     C c(a);
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(c.empty());
     assert(c.get_allocator() == a);
 }

Modified: libcxx/trunk/test/std/containers/sequences/vector.bool/construct_iter_iter.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector.bool/construct_iter_iter.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector.bool/construct_iter_iter.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector.bool/construct_iter_iter.pass.cpp Thu Apr 28 17:28:23 2016
@@ -15,6 +15,7 @@
 #include <vector>
 #include <cassert>
 
+#include "test_macros.h"
 #include "test_iterators.h"
 #include "min_allocator.h"
 
@@ -23,7 +24,7 @@ void
 test(Iterator first, Iterator last)
 {
     C c(first, last);
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(c.size() == std::distance(first, last));
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i, ++first)
         assert(*i == *first);
@@ -38,7 +39,7 @@ int main()
     test<std::vector<bool> >(bidirectional_iterator<const bool*>(a), bidirectional_iterator<const bool*>(an));
     test<std::vector<bool> >(random_access_iterator<const bool*>(a), random_access_iterator<const bool*>(an));
     test<std::vector<bool> >(a, an);
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     test<std::vector<bool, min_allocator<bool>> >(input_iterator<const bool*>(a), input_iterator<const bool*>(an));
     test<std::vector<bool, min_allocator<bool>> >(forward_iterator<const bool*>(a), forward_iterator<const bool*>(an));
     test<std::vector<bool, min_allocator<bool>> >(bidirectional_iterator<const bool*>(a), bidirectional_iterator<const bool*>(an));

Modified: libcxx/trunk/test/std/containers/sequences/vector.bool/construct_iter_iter_alloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector.bool/construct_iter_iter_alloc.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector.bool/construct_iter_iter_alloc.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector.bool/construct_iter_iter_alloc.pass.cpp Thu Apr 28 17:28:23 2016
@@ -16,6 +16,7 @@
 #include <vector>
 #include <cassert>
 
+#include "test_macros.h"
 #include "test_iterators.h"
 #include "min_allocator.h"
 
@@ -24,7 +25,7 @@ void
 test(Iterator first, Iterator last, const typename C::allocator_type& a)
 {
     C c(first, last, a);
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(c.size() == std::distance(first, last));
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i, ++first)
         assert(*i == *first);
@@ -42,7 +43,7 @@ int main()
     test<std::vector<bool> >(random_access_iterator<const bool*>(a), random_access_iterator<const bool*>(an), alloc);
     test<std::vector<bool> >(a, an, alloc);
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     min_allocator<bool> alloc;
     test<std::vector<bool, min_allocator<bool>> >(input_iterator<const bool*>(a), input_iterator<const bool*>(an), alloc);

Modified: libcxx/trunk/test/std/containers/sequences/vector.bool/construct_size.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector.bool/construct_size.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector.bool/construct_size.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector.bool/construct_size.pass.cpp Thu Apr 28 17:28:23 2016
@@ -15,22 +15,22 @@
 #include <vector>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 #include "test_allocator.h"
 
 template <class C>
 void
-test2(typename C::size_type n, typename C::allocator_type const& a = typename C::allocator_type ())
+test2(typename C::size_type n,
+      typename C::allocator_type const& a = typename C::allocator_type ())
 {
-#if _LIBCPP_STD_VER > 11
+#if TEST_STD_VER >= 14
     C c(n, a);
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(c.size() == n);
     assert(c.get_allocator() == a);
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
         assert(*i == typename C::value_type());
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 #endif
 }
 
@@ -39,7 +39,7 @@ void
 test1(typename C::size_type n)
 {
     C c(n);
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(c.size() == n);
     assert(c.get_allocator() == typename C::allocator_type());
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
@@ -57,7 +57,7 @@ test(typename C::size_type n)
 int main()
 {
     test<std::vector<bool> >(50);
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     test<std::vector<bool, min_allocator<bool>> >(50);
     test2<std::vector<bool, test_allocator<bool>> >( 100, test_allocator<bool>(23));
 #endif

Modified: libcxx/trunk/test/std/containers/sequences/vector.bool/construct_size_value.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector.bool/construct_size_value.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector.bool/construct_size_value.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector.bool/construct_size_value.pass.cpp Thu Apr 28 17:28:23 2016
@@ -15,6 +15,7 @@
 #include <vector>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class C>
@@ -22,7 +23,7 @@ void
 test(typename C::size_type n, const typename C::value_type& x)
 {
     C c(n, x);
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(c.size() == n);
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
         assert(*i == x);
@@ -31,7 +32,7 @@ test(typename C::size_type n, const type
 int main()
 {
     test<std::vector<bool> >(50, 3);
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     test<std::vector<bool, min_allocator<bool>> >(50, 3);
 #endif
 }

Modified: libcxx/trunk/test/std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp Thu Apr 28 17:28:23 2016
@@ -15,6 +15,7 @@
 #include <vector>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class C>
@@ -23,7 +24,7 @@ test(typename C::size_type n, const type
      const typename C::allocator_type& a)
 {
     C c(n, x, a);
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(a == c.get_allocator());
     assert(c.size() == n);
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
@@ -33,7 +34,7 @@ test(typename C::size_type n, const type
 int main()
 {
     test<std::vector<bool> >(50, 3, std::allocator<bool>());
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     test<std::vector<bool, min_allocator<bool>> >(50, 3, min_allocator<bool>());
 #endif
 }

Modified: libcxx/trunk/test/std/containers/sequences/vector.bool/copy.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector.bool/copy.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector.bool/copy.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector.bool/copy.pass.cpp Thu Apr 28 17:28:23 2016
@@ -14,6 +14,8 @@
 
 #include <vector>
 #include <cassert>
+
+#include "test_macros.h"
 #include "test_allocator.h"
 #include "min_allocator.h"
 
@@ -23,7 +25,7 @@ test(const C& x)
 {
     unsigned s = x.size();
     C c(x);
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(c.size() == s);
     assert(c == x);
 }
@@ -41,15 +43,13 @@ int main()
         assert(v2 == v);
         assert(v2.get_allocator() == v.get_allocator());
     }
-#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
+#if TEST_STD_VER >= 11
     {
         std::vector<bool, other_allocator<bool> > v(3, 2, other_allocator<bool>(5));
         std::vector<bool, other_allocator<bool> > v2 = v;
         assert(v2 == v);
         assert(v2.get_allocator() == other_allocator<bool>(-2));
     }
-#endif  // _LIBCPP_HAS_NO_ADVANCED_SFINAE
-#if __cplusplus >= 201103L
     {
         bool a[] = {0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0};
         bool* an = a + sizeof(a)/sizeof(a[0]);

Modified: libcxx/trunk/test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp Thu Apr 28 17:28:23 2016
@@ -13,6 +13,8 @@
 
 #include <vector>
 #include <cassert>
+
+#include "test_macros.h"
 #include "test_allocator.h"
 #include "min_allocator.h"
 
@@ -22,7 +24,7 @@ test(const C& x, const typename C::alloc
 {
     unsigned s = x.size();
     C c(x, a);
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(c.size() == s);
     assert(c == x);
 }
@@ -46,7 +48,7 @@ int main()
         assert(l2 == l);
         assert(l2.get_allocator() == other_allocator<bool>(3));
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
         int a[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 1, 0};
         int* an = a + sizeof(a)/sizeof(a[0]);

Modified: libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp Thu Apr 28 17:28:23 2016
@@ -32,16 +32,16 @@ test0()
 	static_assert((noexcept(C()) == noexcept(typename C::allocator_type())), "" );
 #endif
     C c;
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(c.empty());
     assert(c.get_allocator() == typename C::allocator_type());
-    assert(is_contiguous_container_asan_correct(c)); 
+    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
 #if TEST_STD_VER >= 11
     C c1 = {};
-    assert(c1.__invariants());
+    LIBCPP_ASSERT(c1.__invariants());
     assert(c1.empty());
     assert(c1.get_allocator() == typename C::allocator_type());
-    assert(is_contiguous_container_asan_correct(c1)); 
+    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c1));
 #endif
 }
 
@@ -55,10 +55,10 @@ test1(const typename C::allocator_type&
 	static_assert((noexcept(C(typename C::allocator_type())) == std::is_nothrow_copy_constructible<typename C::allocator_type>::value), "" );
 #endif
     C c(a);
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(c.empty());
     assert(c.get_allocator() == a);
-    assert(is_contiguous_container_asan_correct(c)); 
+    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
 }
 
 int main()

Modified: libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp Thu Apr 28 17:28:23 2016
@@ -14,6 +14,7 @@
 #include <vector>
 #include <cassert>
 
+#include "test_macros.h"
 #include "test_iterators.h"
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
@@ -24,9 +25,9 @@ void
 test(Iterator first, Iterator last)
 {
     C c(first, last);
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(c.size() == std::distance(first, last));
-    assert(is_contiguous_container_asan_correct(c)); 
+    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i, ++first)
         assert(*i == *first);
 }
@@ -46,7 +47,7 @@ int main()
     test<std::vector<int, stack_allocator<int, 18> > >(bidirectional_iterator<const int*>(a), bidirectional_iterator<const int*>(an));
     test<std::vector<int, stack_allocator<int, 18> > >(random_access_iterator<const int*>(a), random_access_iterator<const int*>(an));
     test<std::vector<int, stack_allocator<int, 18> > >(a, an);
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     test<std::vector<int, min_allocator<int>> >(input_iterator<const int*>(a), input_iterator<const int*>(an));
     test<std::vector<int, min_allocator<int>> >(forward_iterator<const int*>(a), forward_iterator<const int*>(an));
     test<std::vector<int, min_allocator<int>> >(bidirectional_iterator<const int*>(a), bidirectional_iterator<const int*>(an));

Modified: libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp Thu Apr 28 17:28:23 2016
@@ -15,6 +15,7 @@
 #include <vector>
 #include <cassert>
 
+#include "test_macros.h"
 #include "test_iterators.h"
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
@@ -25,14 +26,14 @@ void
 test(Iterator first, Iterator last, const A& a)
 {
     C c(first, last, a);
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(c.size() == std::distance(first, last));
-    assert(is_contiguous_container_asan_correct(c)); 
+    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i, ++first)
         assert(*i == *first);
 }
 
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
 
 template <class T>
 struct implicit_conv_allocator : min_allocator<T>
@@ -55,7 +56,7 @@ int main()
     test<std::vector<int> >(random_access_iterator<const int*>(a), random_access_iterator<const int*>(an), alloc);
     test<std::vector<int> >(a, an, alloc);
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     int a[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 1, 0};
     int* an = a + sizeof(a)/sizeof(a[0]);

Modified: libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_size.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_size.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_size.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_size.pass.cpp Thu Apr 28 17:28:23 2016
@@ -14,6 +14,7 @@
 #include <vector>
 #include <cassert>
 
+#include "test_macros.h"
 #include "DefaultOnly.h"
 #include "min_allocator.h"
 #include "test_allocator.h"
@@ -23,16 +24,14 @@ template <class C>
 void
 test2(typename C::size_type n, typename C::allocator_type const& a = typename C::allocator_type ())
 {
-#if _LIBCPP_STD_VER > 11
+#if TEST_STD_VER >= 14
     C c(n, a);
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(c.size() == n);
     assert(c.get_allocator() == a);
-    assert(is_contiguous_container_asan_correct(c)); 
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
         assert(*i == typename C::value_type());
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 #endif
 }
 
@@ -41,14 +40,14 @@ void
 test1(typename C::size_type n)
 {
     C c(n);
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(c.size() == n);
     assert(c.get_allocator() == typename C::allocator_type());
-    assert(is_contiguous_container_asan_correct(c)); 
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
+#if TEST_STD_VER >= 11
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
         assert(*i == typename C::value_type());
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif
 }
 
 template <class C>
@@ -64,7 +63,7 @@ int main()
     test<std::vector<int> >(50);
     test<std::vector<DefaultOnly> >(500);
     assert(DefaultOnly::count == 0);
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     test<std::vector<int, min_allocator<int>> >(50);
     test<std::vector<DefaultOnly, min_allocator<DefaultOnly>> >(500);
     test2<std::vector<DefaultOnly, test_allocator<DefaultOnly>> >( 100, test_allocator<DefaultOnly>(23));

Modified: libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp Thu Apr 28 17:28:23 2016
@@ -14,6 +14,7 @@
 #include <vector>
 #include <cassert>
 
+#include "test_macros.h"
 #include "../../../stack_allocator.h"
 #include "min_allocator.h"
 #include "asan_testing.h"
@@ -23,9 +24,9 @@ void
 test(typename C::size_type n, const typename C::value_type& x)
 {
     C c(n, x);
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(c.size() == n);
-    assert(is_contiguous_container_asan_correct(c)); 
+    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
         assert(*i == x);
 }
@@ -34,7 +35,7 @@ int main()
 {
     test<std::vector<int> >(50, 3);
     test<std::vector<int, stack_allocator<int, 50> > >(50, 5);
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     test<std::vector<int, min_allocator<int>> >(50, 3);
 #endif
 }

Modified: libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp Thu Apr 28 17:28:23 2016
@@ -13,6 +13,8 @@
 
 #include <vector>
 #include <cassert>
+
+#include "test_macros.h"
 #include "min_allocator.h"
 #include "asan_testing.h"
 
@@ -22,10 +24,10 @@ test(typename C::size_type n, const type
      const typename C::allocator_type& a)
 {
     C c(n, x, a);
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(a == c.get_allocator());
     assert(c.size() == n);
-    assert(is_contiguous_container_asan_correct(c)); 
+    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
         assert(*i == x);
 }
@@ -33,7 +35,7 @@ test(typename C::size_type n, const type
 int main()
 {
     test<std::vector<int> >(50, 3, std::allocator<int>());
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     test<std::vector<int, min_allocator<int>> >(50, 3, min_allocator<int>());
 #endif
 }

Modified: libcxx/trunk/test/std/containers/sequences/vector/vector.cons/copy.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector/vector.cons/copy.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector/vector.cons/copy.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector/vector.cons/copy.pass.cpp Thu Apr 28 17:28:23 2016
@@ -13,6 +13,8 @@
 
 #include <vector>
 #include <cassert>
+
+#include "test_macros.h"
 #include "test_allocator.h"
 #include "min_allocator.h"
 #include "asan_testing.h"
@@ -23,10 +25,10 @@ test(const C& x)
 {
     unsigned s = x.size();
     C c(x);
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(c.size() == s);
     assert(c == x);
-    assert(is_contiguous_container_asan_correct(c)); 
+    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
 }
 
 int main()
@@ -46,7 +48,7 @@ int main()
         assert(is_contiguous_container_asan_correct(v)); 
         assert(is_contiguous_container_asan_correct(v2)); 
     }
-#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
+#if TEST_STD_VER >= 11
     {
         std::vector<int, other_allocator<int> > v(3, 2, other_allocator<int>(5));
         std::vector<int, other_allocator<int> > v2 = v;
@@ -57,8 +59,6 @@ int main()
         assert(is_contiguous_container_asan_correct(v)); 
         assert(is_contiguous_container_asan_correct(v2)); 
     }
-#endif  // _LIBCPP_HAS_NO_ADVANCED_SFINAE
-#if __cplusplus >= 201103L
     {
         int a[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 1, 0};
         int* an = a + sizeof(a)/sizeof(a[0]);

Modified: libcxx/trunk/test/std/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp Thu Apr 28 17:28:23 2016
@@ -13,6 +13,8 @@
 
 #include <vector>
 #include <cassert>
+
+#include "test_macros.h"
 #include "test_allocator.h"
 #include "min_allocator.h"
 #include "asan_testing.h"
@@ -23,10 +25,10 @@ test(const C& x, const typename C::alloc
 {
     unsigned s = x.size();
     C c(x, a);
-    assert(c.__invariants());
+    LIBCPP_ASSERT(c.__invariants());
     assert(c.size() == s);
     assert(c == x);
-    assert(is_contiguous_container_asan_correct(c)); 
+    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
 }
 
 int main()
@@ -48,7 +50,7 @@ int main()
         assert(l2 == l);
         assert(l2.get_allocator() == other_allocator<int>(3));
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
         int a[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 1, 0};
         int* an = a + sizeof(a)/sizeof(a[0]);

Modified: libcxx/trunk/test/std/strings/basic.string/string.capacity/reserve.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.capacity/reserve.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.capacity/reserve.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.capacity/reserve.pass.cpp Thu Apr 28 17:28:23 2016
@@ -16,6 +16,7 @@
 #include <stdexcept>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -25,7 +26,7 @@ test(S s)
     typename S::size_type old_cap = s.capacity();
     S s0 = s;
     s.reserve();
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == s0);
     assert(s.capacity() <= old_cap);
     assert(s.capacity() >= s.size());
@@ -83,7 +84,7 @@ int main()
     test(s, S::npos);
     }
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     {

Modified: libcxx/trunk/test/std/strings/basic.string/string.capacity/resize_size.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.capacity/resize_size.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.capacity/resize_size.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.capacity/resize_size.pass.cpp Thu Apr 28 17:28:23 2016
@@ -16,6 +16,7 @@
 #include <stdexcept>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -25,7 +26,7 @@ test(S s, typename S::size_type n, S exp
     try
     {
         s.resize(n);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(n <= s.max_size());
         assert(s == expected);
     }
@@ -56,7 +57,7 @@ int main()
          S("12345678901234567890123456789012345678901234567890\0\0\0\0\0\0\0\0\0\0", 60));
     test(S(), S::npos, S("not going to happen"));
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(), 0, S());

Modified: libcxx/trunk/test/std/strings/basic.string/string.capacity/resize_size_char.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.capacity/resize_size_char.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.capacity/resize_size_char.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.capacity/resize_size_char.pass.cpp Thu Apr 28 17:28:23 2016
@@ -16,6 +16,7 @@
 #include <stdexcept>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -25,7 +26,7 @@ test(S s, typename S::size_type n, typen
     try
     {
         s.resize(n, c);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(n <= s.max_size());
         assert(s == expected);
     }
@@ -56,7 +57,7 @@ int main()
          S("12345678901234567890123456789012345678901234567890aaaaaaaaaa"));
     test(S(), S::npos, 'a', S("not going to happen"));
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(), 0, 'a', S());

Modified: libcxx/trunk/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp Thu Apr 28 17:28:23 2016
@@ -14,6 +14,7 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -23,7 +24,7 @@ test(S s)
     typename S::size_type old_cap = s.capacity();
     S s0 = s;
     s.shrink_to_fit();
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == s0);
     assert(s.capacity() <= old_cap);
     assert(s.capacity() >= s.size());
@@ -44,7 +45,7 @@ int main()
     s.erase(50);
     test(s);
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     S s;

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/alloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/alloc.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/alloc.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/alloc.pass.cpp Thu Apr 28 17:28:23 2016
@@ -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());

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/char_assignment.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/char_assignment.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/char_assignment.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/char_assignment.pass.cpp Thu Apr 28 17:28:23 2016
@@ -14,6 +14,7 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -22,7 +23,7 @@ test(S s1, typename S::value_type s2)
 {
     typedef typename S::traits_type T;
     s1 = s2;
-    assert(s1.__invariants());
+    LIBCPP_ASSERT(s1.__invariants());
     assert(s1.size() == 1);
     assert(T::eq(s1[0], s2));
     assert(s1.capacity() >= s1.size());
@@ -37,7 +38,7 @@ int main()
     test(S("123456789"), 'a');
     test(S("1234567890123456789012345678901234567890123456789012345678901234567890"), 'a');
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(), 'a');

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/copy.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/copy.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/copy.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/copy.pass.cpp Thu Apr 28 17:28:23 2016
@@ -14,6 +14,7 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "test_allocator.h"
 #include "min_allocator.h"
 
@@ -22,7 +23,7 @@ void
 test(S s1)
 {
     S s2 = s1;
-    assert(s2.__invariants());
+    LIBCPP_ASSERT(s2.__invariants());
     assert(s2 == s1);
     assert(s2.capacity() >= s2.size());
     assert(s2.get_allocator() == s1.get_allocator());
@@ -37,7 +38,7 @@ int main()
     test(S("1", A(5)));
     test(S("1234567890123456789012345678901234567890123456789012345678901234567890", A(7)));
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef min_allocator<char> A;
     typedef std::basic_string<char, std::char_traits<char>, A> S;

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp Thu Apr 28 17:28:23 2016
@@ -14,6 +14,7 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "test_allocator.h"
 #include "min_allocator.h"
 
@@ -22,7 +23,7 @@ void
 test(S s1, const typename S::allocator_type& a)
 {
     S s2(s1, a);
-    assert(s2.__invariants());
+    LIBCPP_ASSERT(s2.__invariants());
     assert(s2 == s1);
     assert(s2.capacity() >= s2.size());
     assert(s2.get_allocator() == a);
@@ -37,7 +38,7 @@ int main()
     test(S("1"), A(5));
     test(S("1234567890123456789012345678901234567890123456789012345678901234567890"), A(7));
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef min_allocator<char> A;
     typedef std::basic_string<char, std::char_traits<char>, A> S;

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/copy_assignment.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/copy_assignment.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/copy_assignment.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/copy_assignment.pass.cpp Thu Apr 28 17:28:23 2016
@@ -15,6 +15,7 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -22,7 +23,7 @@ void
 test(S s1, const S& s2)
 {
     s1 = s2;
-    assert(s1.__invariants());
+    LIBCPP_ASSERT(s1.__invariants());
     assert(s1 == s2);
     assert(s1.capacity() >= s1.size());
 }
@@ -47,7 +48,7 @@ int main()
            "1234567890123456789012345678901234567890123456789012345678901234567890"),
          S("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"));
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(), S());

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/default_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/default_noexcept.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/default_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/default_noexcept.pass.cpp Thu Apr 28 17:28:23 2016
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// UNSUPPORTED: c++98, c++03
+
 // <string>
 
 // basic_string()
@@ -29,7 +31,6 @@ struct some_alloc
 
 int main()
 {
-#if __has_feature(cxx_noexcept)
     {
         typedef std::string C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
@@ -42,5 +43,4 @@ int main()
         typedef std::basic_string<char, std::char_traits<char>, some_alloc<char>> C;
         static_assert(!std::is_nothrow_default_constructible<C>::value, "");
     }
-#endif
 }

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp Thu Apr 28 17:28:23 2016
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// UNSUPPORTED: c++98, c++03
+
 // <string>
 
 // ~basic_string() // implied noexcept;
@@ -16,8 +18,6 @@
 
 #include "test_allocator.h"
 
-#if __has_feature(cxx_noexcept)
-
 template <class T>
 struct some_alloc
 {
@@ -26,11 +26,8 @@ struct some_alloc
     ~some_alloc() noexcept(false);
 };
 
-#endif
-
 int main()
 {
-#if __has_feature(cxx_noexcept)
     {
         typedef std::string C;
         static_assert(std::is_nothrow_destructible<C>::value, "");
@@ -43,5 +40,4 @@ int main()
         typedef std::basic_string<char, std::char_traits<char>, some_alloc<char>> C;
         static_assert(!std::is_nothrow_destructible<C>::value, "");
     }
-#endif
 }

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/initializer_list.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/initializer_list.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/initializer_list.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/initializer_list.pass.cpp Thu Apr 28 17:28:23 2016
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// UNSUPPORTED: c++98, c++03
+
 // <string>
 
 // basic_string(initializer_list<charT> il, const Allocator& a = Allocator());
@@ -19,7 +21,6 @@
 
 int main()
 {
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
     {
         std::string s = {'a', 'b', 'c'};
         assert(s == "abc");
@@ -29,7 +30,6 @@ int main()
         s = {L'a', L'b', L'c'};
         assert(s == L"abc");
     }
-#if __cplusplus >= 201103L
     {
         typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
         S s = {'a', 'b', 'c'};
@@ -41,6 +41,4 @@ int main()
         s = {L'a', L'b', L'c'};
         assert(s == L"abc");
     }
-#endif
-#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 }

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp Thu Apr 28 17:28:23 2016
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// UNSUPPORTED: c++98, c++03
+
 // <string>
 
 // basic_string& operator=(initializer_list<charT> il);
@@ -18,19 +20,15 @@
 
 int main()
 {
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
     {
         std::string s;
         s = {'a', 'b', 'c'};
         assert(s == "abc");
     }
-#if __cplusplus >= 201103L
     {
         typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
         S s;
         s = {'a', 'b', 'c'};
         assert(s == "abc");
     }
-#endif
-#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 }

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp Thu Apr 28 17:28:23 2016
@@ -17,6 +17,7 @@
 #include <iterator>
 #include <cassert>
 
+#include "test_macros.h"
 #include "test_allocator.h"
 #include "../input_iterator.h"
 #include "min_allocator.h"
@@ -30,7 +31,7 @@ test(It first, It last)
     typedef typename S::traits_type T;
     typedef typename S::allocator_type A;
     S s2(first, last);
-    assert(s2.__invariants());
+    LIBCPP_ASSERT(s2.__invariants());
     assert(s2.size() == std::distance(first, last));
     unsigned i = 0;
     for (It it = first; it != last; ++it, ++i)
@@ -47,7 +48,7 @@ test(It first, It last, const A& a)
     typedef std::basic_string<charT, std::char_traits<charT>, A> S;
     typedef typename S::traits_type T;
     S s2(first, last, a);
-    assert(s2.__invariants());
+    LIBCPP_ASSERT(s2.__invariants());
     assert(s2.size() == std::distance(first, last));
     unsigned i = 0;
     for (It it = first; it != last; ++it, ++i)
@@ -86,7 +87,7 @@ int main()
     test(input_iterator<const char*>(s), input_iterator<const char*>(s+50));
     test(input_iterator<const char*>(s), input_iterator<const char*>(s+50), A(2));
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef min_allocator<char> A;
     const char* s = "12345678901234567890123456789012345678901234567890";

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/move.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/move.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/move.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/move.pass.cpp Thu Apr 28 17:28:23 2016
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// UNSUPPORTED: c++98, c++03
+
 // <string>
 
 // basic_string(basic_string<charT,traits,Allocator>&& str);
@@ -14,8 +16,7 @@
 #include <string>
 #include <cassert>
 
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
+#include "test_macros.h"
 #include "test_allocator.h"
 #include "min_allocator.h"
 
@@ -25,18 +26,15 @@ test(S s0)
 {
     S s1 = s0;
     S s2 = std::move(s0);
-    assert(s2.__invariants());
-    assert(s0.__invariants());
+    LIBCPP_ASSERT(s2.__invariants());
+    LIBCPP_ASSERT(s0.__invariants());
     assert(s2 == s1);
     assert(s2.capacity() >= s2.size());
     assert(s2.get_allocator() == s1.get_allocator());
 }
 
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
 int main()
 {
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     {
     typedef test_allocator<char> A;
     typedef std::basic_string<char, std::char_traits<char>, A> S;
@@ -44,7 +42,6 @@ int main()
     test(S("1", A(5)));
     test(S("1234567890123456789012345678901234567890123456789012345678901234567890", A(7)));
     }
-#if __cplusplus >= 201103L
     {
     typedef min_allocator<char> A;
     typedef std::basic_string<char, std::char_traits<char>, A> S;
@@ -52,6 +49,4 @@ int main()
     test(S("1", A()));
     test(S("1234567890123456789012345678901234567890123456789012345678901234567890", A()));
     }
-#endif
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 }

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/move_alloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/move_alloc.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/move_alloc.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/move_alloc.pass.cpp Thu Apr 28 17:28:23 2016
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// UNSUPPORTED: c++98, c++03
+
 // <string>
 
 // basic_string(basic_string&& str, const Allocator& alloc);
@@ -14,8 +16,6 @@
 #include <string>
 #include <cassert>
 
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
 #include "test_macros.h"
 #include "test_allocator.h"
 #include "min_allocator.h"
@@ -27,23 +27,16 @@ test(S s0, const typename S::allocator_t
 {
     S s1 = s0;
     S s2(std::move(s0), a);
-    assert(s2.__invariants());
-    assert(s0.__invariants());
+    LIBCPP_ASSERT(s2.__invariants());
+    LIBCPP_ASSERT(s0.__invariants());
     assert(s2 == s1);
     assert(s2.capacity() >= s2.size());
     assert(s2.get_allocator() == a);
 }
 
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-// #if _LIBCPP_STD_VER <= 14
-//         _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
-// #else
-//         _NOEXCEPT;
-// #endif
 
 int main()
 {
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     {
     typedef test_allocator<char> A;
     typedef std::basic_string<char, std::char_traits<char>, A> S;
@@ -70,8 +63,6 @@ int main()
     S s2 (std::move(s1), A(1));
     }
     assert ( test_alloc_base::alloc_count == alloc_count );
-    
-#if TEST_STD_VER >= 11
     {
     typedef min_allocator<char> A;
     typedef std::basic_string<char, std::char_traits<char>, A> S;
@@ -84,6 +75,4 @@ int main()
     test(S("1"), A());
     test(S("1234567890123456789012345678901234567890123456789012345678901234567890"), A());
     }
-#endif
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 }

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/move_assign_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/move_assign_noexcept.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/move_assign_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/move_assign_noexcept.pass.cpp Thu Apr 28 17:28:23 2016
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// UNSUPPORTED: c++98, c++03
+
 // <string>
 
 // basic_string& operator=(basic_string&& c)
@@ -60,7 +62,6 @@ struct some_alloc3
 
 int main()
 {
-#if __has_feature(cxx_noexcept)
     {
         typedef std::string C;
         static_assert(std::is_nothrow_move_assignable<C>::value, "");
@@ -90,6 +91,4 @@ int main()
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");
     }
 #endif
-
-#endif
 }

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/move_assignment.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/move_assignment.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/move_assignment.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/move_assignment.pass.cpp Thu Apr 28 17:28:23 2016
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// UNSUPPORTED: c++98, c++03
+
 // <string>
 
 // basic_string<charT,traits,Allocator>&
@@ -15,8 +17,7 @@
 #include <string>
 #include <cassert>
 
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
+#include "test_macros.h"
 #include "test_allocator.h"
 #include "min_allocator.h"
 
@@ -26,17 +27,14 @@ test(S s1, S s2)
 {
     S s0 = s2;
     s1 = std::move(s2);
-    assert(s1.__invariants());
-    assert(s2.__invariants());
+    LIBCPP_ASSERT(s1.__invariants());
+    LIBCPP_ASSERT(s2.__invariants());
     assert(s1 == s0);
     assert(s1.capacity() >= s1.size());
 }
 
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
 int main()
 {
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     {
     typedef std::string S;
     test(S(), S());
@@ -55,7 +53,6 @@ int main()
            "1234567890123456789012345678901234567890123456789012345678901234567890"),
          S("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"));
     }
-#if __cplusplus >= 201103L
     {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(), S());
@@ -74,6 +71,4 @@ int main()
            "1234567890123456789012345678901234567890123456789012345678901234567890"),
          S("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"));
     }
-#endif
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 }

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/move_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/move_noexcept.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/move_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/move_noexcept.pass.cpp Thu Apr 28 17:28:23 2016
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// UNSUPPORTED: c++98, c++03
+
 // <string>
 
 // basic_string(basic_string&&)
@@ -29,7 +31,6 @@ struct some_alloc
 
 int main()
 {
-#if __has_feature(cxx_noexcept)
     {
         typedef std::string C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
@@ -46,5 +47,4 @@ int main()
         static_assert( std::is_nothrow_move_constructible<C>::value, "");
 #endif
     }
-#endif
 }

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp Thu Apr 28 17:28:23 2016
@@ -16,6 +16,7 @@
 #include <algorithm>
 #include <cassert>
 
+#include "test_macros.h"
 #include "test_allocator.h"
 #include "min_allocator.h"
 
@@ -28,7 +29,7 @@ test(const charT* s)
     typedef typename S::allocator_type A;
     unsigned n = T::length(s);
     S s2(s);
-    assert(s2.__invariants());
+    LIBCPP_ASSERT(s2.__invariants());
     assert(s2.size() == n);
     assert(T::compare(s2.data(), s, n) == 0);
     assert(s2.get_allocator() == A());
@@ -43,7 +44,7 @@ test(const charT* s, const A& a)
     typedef typename S::traits_type T;
     unsigned n = T::length(s);
     S s2(s, a);
-    assert(s2.__invariants());
+    LIBCPP_ASSERT(s2.__invariants());
     assert(s2.size() == n);
     assert(T::compare(s2.data(), s, n) == 0);
     assert(s2.get_allocator() == a);
@@ -68,7 +69,7 @@ int main()
     test("123456798012345679801234567980123456798012345679801234567980");
     test("123456798012345679801234567980123456798012345679801234567980", A(2));
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef min_allocator<char> A;
     typedef std::basic_string<char, std::char_traits<char>, A> S;

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/pointer_assignment.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/pointer_assignment.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/pointer_assignment.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/pointer_assignment.pass.cpp Thu Apr 28 17:28:23 2016
@@ -15,6 +15,7 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -23,7 +24,7 @@ test(S s1, const typename S::value_type*
 {
     typedef typename S::traits_type T;
     s1 = s2;
-    assert(s1.__invariants());
+    LIBCPP_ASSERT(s1.__invariants());
     assert(s1.size() == T::length(s2));
     assert(T::compare(s1.data(), s2, s1.size()) == 0);
     assert(s1.capacity() >= s1.size());
@@ -49,7 +50,7 @@ int main()
            "1234567890123456789012345678901234567890123456789012345678901234567890"),
          "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz");
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(), "");

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp Thu Apr 28 17:28:23 2016
@@ -16,6 +16,7 @@
 #include <algorithm>
 #include <cassert>
 
+#include "test_macros.h"
 #include "test_allocator.h"
 #include "min_allocator.h"
 
@@ -27,7 +28,7 @@ test(const charT* s, unsigned n)
     typedef typename S::traits_type T;
     typedef typename S::allocator_type A;
     S s2(s, n);
-    assert(s2.__invariants());
+    LIBCPP_ASSERT(s2.__invariants());
     assert(s2.size() == n);
     assert(T::compare(s2.data(), s, n) == 0);
     assert(s2.get_allocator() == A());
@@ -41,7 +42,7 @@ test(const charT* s, unsigned n, const A
     typedef std::basic_string<charT, std::char_traits<charT>, A> S;
     typedef typename S::traits_type T;
     S s2(s, n, a);
-    assert(s2.__invariants());
+    LIBCPP_ASSERT(s2.__invariants());
     assert(s2.size() == n);
     assert(T::compare(s2.data(), s, n) == 0);
     assert(s2.get_allocator() == a);
@@ -66,7 +67,7 @@ int main()
     test("123456798012345679801234567980123456798012345679801234567980", 60);
     test("123456798012345679801234567980123456798012345679801234567980", 60, A(2));
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef min_allocator<char> A;
     typedef std::basic_string<char, std::char_traits<char>, A> S;

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp Thu Apr 28 17:28:23 2016
@@ -16,6 +16,7 @@
 #include <algorithm>
 #include <cassert>
 
+#include "test_macros.h"
 #include "test_allocator.h"
 #include "min_allocator.h"
 
@@ -27,7 +28,7 @@ test(unsigned n, charT c)
     typedef typename S::traits_type T;
     typedef typename S::allocator_type A;
     S s2(n, c);
-    assert(s2.__invariants());
+    LIBCPP_ASSERT(s2.__invariants());
     assert(s2.size() == n);
     for (unsigned i = 0; i < n; ++i)
         assert(s2[i] == c);
@@ -42,7 +43,7 @@ test(unsigned n, charT c, const A& a)
     typedef std::basic_string<charT, std::char_traits<charT>, A> S;
     typedef typename S::traits_type T;
     S s2(n, c, a);
-    assert(s2.__invariants());
+    LIBCPP_ASSERT(s2.__invariants());
     assert(s2.size() == n);
     for (unsigned i = 0; i < n; ++i)
         assert(s2[i] == c);
@@ -59,7 +60,7 @@ test(Tp n, Tp c)
     typedef typename S::traits_type T;
     typedef typename S::allocator_type A;
     S s2(n, c);
-    assert(s2.__invariants());
+    LIBCPP_ASSERT(s2.__invariants());
     assert(s2.size() == n);
     for (unsigned i = 0; i < n; ++i)
         assert(s2[i] == c);
@@ -75,7 +76,7 @@ test(Tp n, Tp c, const A& a)
     typedef std::basic_string<charT, std::char_traits<charT>, A> S;
     typedef typename S::traits_type T;
     S s2(n, c, a);
-    assert(s2.__invariants());
+    LIBCPP_ASSERT(s2.__invariants());
     assert(s2.size() == n);
     for (unsigned i = 0; i < n; ++i)
         assert(s2[i] == c);
@@ -104,7 +105,7 @@ int main()
     test(100, 65);
     test(100, 65, A(3));
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef min_allocator<char> A;
     typedef std::basic_string<char, std::char_traits<char>, A> S;

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/substr.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/substr.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/substr.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/substr.pass.cpp Thu Apr 28 17:28:23 2016
@@ -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, co
     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);

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/initializer_list.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/initializer_list.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/initializer_list.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/initializer_list.pass.cpp Thu Apr 28 17:28:23 2016
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// UNSUPPORTED: c++98, c++03
+
 // <string>
 
 // basic_string& append(initializer_list<charT> il);
@@ -14,23 +16,20 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 int main()
 {
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
     {
         std::string s("123");
         s.append({'a', 'b', 'c'});
         assert(s == "123abc");
     }
-#if TEST_STD_VER >= 11
     {
         typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
         S s("123");
         s.append({'a', 'b', 'c'});
         assert(s == "123abc");
     }
-#endif
-#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 }

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp Thu Apr 28 17:28:23 2016
@@ -23,7 +23,7 @@ void
 test(S s, It first, It last, S expected)
 {
     s.append(first, last);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
 }
 
@@ -38,7 +38,7 @@ test_exceptions(S s, It first, It last)
     	assert(false);
     	}
     catch (...) {}
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == aCopy);
 }
 #endif

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/pointer.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/pointer.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/pointer.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/pointer.pass.cpp Thu Apr 28 17:28:23 2016
@@ -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);
 }
 

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp Thu Apr 28 17:28:23 2016
@@ -16,6 +16,7 @@
 #include <stdexcept>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -23,7 +24,7 @@ void
 test(S s, const typename S::value_type* str, typename S::size_type n, S expected)
 {
     s.append(str, n);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp Thu Apr 28 17:28:23 2016
@@ -14,6 +14,7 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -21,7 +22,7 @@ void
 test(S s, typename S::value_type c, S expected)
 {
     s.push_back(c);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/size_char.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/size_char.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/size_char.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/size_char.pass.cpp Thu Apr 28 17:28:23 2016
@@ -15,6 +15,7 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -22,7 +23,7 @@ void
 test(S s, typename S::size_type n, typename S::value_type c, S expected)
 {
     s.append(n, c);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/string.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/string.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/string.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/string.pass.cpp Thu Apr 28 17:28:23 2016
@@ -15,6 +15,7 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -22,7 +23,7 @@ void
 test(S s, S str, S expected)
 {
     s.append(str);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp Thu Apr 28 17:28:23 2016
@@ -18,6 +18,7 @@
 #include <stdexcept>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -27,7 +28,7 @@ test(S s, S str, typename S::size_type p
     try
     {
         s.append(str, pos, n);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(pos <= str.size());
         assert(s == expected);
     }
@@ -44,7 +45,7 @@ test_npos(S s, S str, typename S::size_t
     try
     {
         s.append(str, pos);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(pos <= str.size());
         assert(s == expected);
     }

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/initializer_list.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/initializer_list.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/initializer_list.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/initializer_list.pass.cpp Thu Apr 28 17:28:23 2016
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// UNSUPPORTED: c++98, c++03
+
 // <string>
 
 // basic_string& assign(initializer_list<charT> il);
@@ -14,23 +16,20 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 int main()
 {
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
     {
         std::string s("123");
         s.assign({'a', 'b', 'c'});
         assert(s == "abc");
     }
-#if TEST_STD_VER >= 11
     {
         typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
         S s("123");
         s.assign({'a', 'b', 'c'});
         assert(s == "abc");
     }
-#endif
-#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 }

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp Thu Apr 28 17:28:23 2016
@@ -15,6 +15,7 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "test_iterators.h"
 #include "min_allocator.h"
 
@@ -23,7 +24,7 @@ void
 test(S s, It first, It last, S expected)
 {
     s.assign(first, last);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
 }
 
@@ -36,9 +37,9 @@ test_exceptions(S s, It first, It last)
     try {
    	    s.assign(first, last);
     	assert(false);
-    	}
+    }
     catch (...) {}
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == aCopy);
 }
 #endif
@@ -103,7 +104,7 @@ int main()
     test(S("12345678901234567890"), input_iterator<const char*>(s), input_iterator<const char*>(s+52),
          S("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"));
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     const char* s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/pointer.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/pointer.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/pointer.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/pointer.pass.cpp Thu Apr 28 17:28:23 2016
@@ -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.assign(str);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/pointer_size.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/pointer_size.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/pointer_size.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/pointer_size.pass.cpp Thu Apr 28 17:28:23 2016
@@ -16,6 +16,7 @@
 #include <stdexcept>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -23,7 +24,7 @@ void
 test(S s, const typename S::value_type* str, typename S::size_type n, S expected)
 {
     s.assign(str, n);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/rv_string.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/rv_string.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/rv_string.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/rv_string.pass.cpp Thu Apr 28 17:28:23 2016
@@ -16,6 +16,7 @@
 #include <utility>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -23,7 +24,7 @@ void
 test(S s, S str, S expected)
 {
     s.assign(std::move(str));
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/size_char.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/size_char.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/size_char.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/size_char.pass.cpp Thu Apr 28 17:28:23 2016
@@ -15,6 +15,7 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -22,7 +23,7 @@ void
 test(S s, typename S::size_type n, typename S::value_type c, S expected)
 {
     s.assign(n, c);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/string.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/string.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/string.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/string.pass.cpp Thu Apr 28 17:28:23 2016
@@ -24,7 +24,7 @@ void
 test(S s, S str, S expected)
 {
     s.assign(str);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
 }
 
@@ -33,7 +33,7 @@ void
 testAlloc(S s, S str, const typename S::allocator_type& a)
 {
     s.assign(str);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == str);
     assert(s.get_allocator() == a);
 }

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp Thu Apr 28 17:28:23 2016
@@ -18,6 +18,7 @@
 #include <stdexcept>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -27,7 +28,7 @@ test(S s, S str, typename S::size_type p
     try
     {
         s.assign(str, pos, n);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(pos <= str.size());
         assert(s == expected);
     }
@@ -44,7 +45,7 @@ test_npos(S s, S str, typename S::size_t
     try
     {
         s.assign(str, pos);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(pos <= str.size());
         assert(s == expected);
     }

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp Thu Apr 28 17:28:23 2016
@@ -17,6 +17,7 @@
 #include <algorithm>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -104,7 +105,7 @@ int main()
     test(S("abcdefghijklmnopqrst"), s, 20, 1);
     test(S("abcdefghijklmnopqrst"), s, 21, 0);
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     char s[50];

Removed: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_db1.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_db1.pass.cpp?rev=267946&view=auto
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_db1.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_db1.pass.cpp (removed)
@@ -1,50 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// <string>
-
-// Call erase(const_iterator position) with end()
-
-#if _LIBCPP_DEBUG >= 1
-
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-
-#include <string>
-#include <cassert>
-#include <cstdlib>
-#include <exception>
-
-#include "min_allocator.h"
-
-int main()
-{
-    {
-    std::string l1("123");
-    std::string::const_iterator i = l1.end();
-    l1.erase(i);
-    assert(false);
-    }
-#if __cplusplus >= 201103L
-    {
-    typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
-    S l1("123");
-    S::const_iterator i = l1.end();
-    l1.erase(i);
-    assert(false);
-    }
-#endif
-}
-
-#else
-
-int main()
-{
-}
-
-#endif

Removed: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_db2.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_db2.pass.cpp?rev=267946&view=auto
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_db2.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_db2.pass.cpp (removed)
@@ -1,52 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// <string>
-
-// Call erase(const_iterator position) with iterator from another container
-
-#if _LIBCPP_DEBUG >= 1
-
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-
-#include <string>
-#include <cassert>
-#include <cstdlib>
-#include <exception>
-
-#include "min_allocator.h"
-
-int main()
-{
-    {
-    std::string l1("123");
-    std::string l2("123");
-    std::string::const_iterator i = l2.begin();
-    l1.erase(i);
-    assert(false);
-    }
-#if __cplusplus >= 201103L
-    {
-    typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
-    S l1("123");
-    S l2("123");
-    S::const_iterator i = l2.begin();
-    l1.erase(i);
-    assert(false);
-    }
-#endif
-}
-
-#else
-
-int main()
-{
-}
-
-#endif

Removed: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db1.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db1.pass.cpp?rev=267946&view=auto
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db1.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db1.pass.cpp (removed)
@@ -1,50 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// <string>
-
-// Call erase(const_iterator first, const_iterator last); with first iterator from another container
-
-#if _LIBCPP_DEBUG >= 1
-
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-
-#include <string>
-#include <cassert>
-#include <exception>
-#include <cstdlib>
-
-#include "min_allocator.h"
-
-int main()
-{
-    {
-    std::string l1("123");
-    std::string l2("123");
-    std::string::iterator i = l1.erase(l2.cbegin(), l1.cbegin()+1);
-    assert(false);
-    }
-#if __cplusplus >= 201103L
-    {
-    typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
-    S l1("123");
-    S l2("123");
-    S::iterator i = l1.erase(l2.cbegin(), l1.cbegin()+1);
-    assert(false);
-    }
-#endif
-}
-
-#else
-
-int main()
-{
-}
-
-#endif

Removed: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db2.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db2.pass.cpp?rev=267946&view=auto
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db2.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db2.pass.cpp (removed)
@@ -1,50 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// <string>
-
-// Call erase(const_iterator first, const_iterator last); with second iterator from another container
-
-#if _LIBCPP_DEBUG >= 1
-
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-
-#include <string>
-#include <cassert>
-#include <exception>
-#include <cstdlib>
-
-#include "min_allocator.h"
-
-int main()
-{
-    {
-    std::string l1("123");
-    std::string l2("123");
-    std::string::iterator i = l1.erase(l1.cbegin(), l2.cbegin()+1);
-    assert(false);
-    }
-#if __cplusplus >= 201103L
-    {
-    typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
-    S l1("123");
-    S l2("123");
-    S::iterator i = l1.erase(l1.cbegin(), l2.cbegin()+1);
-    assert(false);
-    }
-#endif
-}
-
-#else
-
-int main()
-{
-}
-
-#endif

Removed: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db3.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db3.pass.cpp?rev=267946&view=auto
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db3.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db3.pass.cpp (removed)
@@ -1,50 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// <string>
-
-// Call erase(const_iterator first, const_iterator last); with both iterators from another container
-
-#if _LIBCPP_DEBUG >= 1
-
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-
-#include <string>
-#include <cassert>
-#include <exception>
-#include <cstdlib>
-
-#include "min_allocator.h"
-
-int main()
-{
-    {
-    std::string l1("123");
-    std::string l2("123");
-    std::string::iterator i = l1.erase(l2.cbegin(), l2.cbegin()+1);
-    assert(false);
-    }
-#if __cplusplus >= 201103L
-    {
-    typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
-    S l1("123");
-    S l2("123");
-    S::iterator i = l1.erase(l2.cbegin(), l2.cbegin()+1);
-    assert(false);
-    }
-#endif
-}
-
-#else
-
-int main()
-{
-}
-
-#endif

Removed: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db4.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db4.pass.cpp?rev=267946&view=auto
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db4.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/erase_iter_iter_db4.pass.cpp (removed)
@@ -1,48 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// <string>
-
-// Call erase(const_iterator first, const_iterator last); with a bad range
-
-#if _LIBCPP_DEBUG >= 1
-
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-
-#include <string>
-#include <cassert>
-#include <exception>
-#include <cstdlib>
-
-#include "min_allocator.h"
-
-int main()
-{
-    {
-    std::string l1("123");
-    std::string::iterator i = l1.erase(l1.cbegin()+1, l1.cbegin());
-    assert(false);
-    }
-#if __cplusplus >= 201103L
-    {
-    typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
-    S l1("123");
-    S::iterator i = l1.erase(l1.cbegin()+1, l1.cbegin());
-    assert(false);
-    }
-#endif
-}
-
-#else
-
-int main()
-{
-}
-
-#endif

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/iter.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/iter.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/iter.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/iter.pass.cpp Thu Apr 28 17:28:23 2016
@@ -14,6 +14,7 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -22,7 +23,7 @@ test(S s, typename S::difference_type po
 {
     typename S::const_iterator p = s.begin() + pos;
     typename S::iterator i = s.erase(p);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
     assert(i - s.begin() == pos);
 }
@@ -44,7 +45,7 @@ int main()
     test(S("abcdefghijklmnopqrst"), 10, S("abcdefghijlmnopqrst"));
     test(S("abcdefghijklmnopqrst"), 19, S("abcdefghijklmnopqrs"));
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S("abcde"), 0, S("bcde"));

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/iter_iter.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/iter_iter.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/iter_iter.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/iter_iter.pass.cpp Thu Apr 28 17:28:23 2016
@@ -14,6 +14,7 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -23,7 +24,7 @@ test(S s, typename S::difference_type po
     typename S::const_iterator first = s.cbegin() + pos;
     typename S::const_iterator last = s.cbegin() + pos + n;
     typename S::iterator i = s.erase(first, last);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
     assert(i - s.begin() == pos);
 }
@@ -87,7 +88,7 @@ int main()
     test(S("abcdefghijklmnopqrst"), 19, 1, S("abcdefghijklmnopqrs"));
     test(S("abcdefghijklmnopqrst"), 20, 0, S("abcdefghijklmnopqrst"));
     }
-#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, S(""));

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/pop_back.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/pop_back.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/pop_back.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/pop_back.pass.cpp Thu Apr 28 17:28:23 2016
@@ -11,13 +11,10 @@
 
 // void pop_back();
 
-#if _LIBCPP_DEBUG >= 1
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -25,7 +22,7 @@ void
 test(S s, S expected)
 {
     s.pop_back();
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
 }
 
@@ -37,7 +34,7 @@ int main()
     test(S("abcdefghij"), S("abcdefghi"));
     test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrs"));
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S("abcde"), S("abcd"));
@@ -45,11 +42,4 @@ int main()
     test(S("abcdefghijklmnopqrst"), S("abcdefghijklmnopqrs"));
     }
 #endif
-#if _LIBCPP_DEBUG >= 1
-    {
-        std::string s;
-        s.pop_back();
-        assert(false);
-    }
-#endif        
 }

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/size_size.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/size_size.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/size_size.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_erase/size_size.pass.cpp Thu Apr 28 17:28:23 2016
@@ -17,6 +17,7 @@
 #include <stdexcept>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -28,7 +29,7 @@ test(S s, typename S::size_type pos, typ
     try
     {
         s.erase(pos, n);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(pos <= old_size);
         assert(s == expected);
     }
@@ -48,7 +49,7 @@ test(S s, typename S::size_type pos, S e
     try
     {
         s.erase(pos);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(pos <= old_size);
         assert(s == expected);
     }
@@ -64,7 +65,7 @@ void
 test(S s, S expected)
 {
     s.erase();
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
 }
 
@@ -173,7 +174,7 @@ int main()
     test(S("abcdefghij"), S(""));
     test(S("abcdefghijklmnopqrst"), S(""));
     }
-#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, S(""));

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/iter_char.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/iter_char.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/iter_char.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/iter_char.pass.cpp Thu Apr 28 17:28:23 2016
@@ -11,14 +11,11 @@
 
 // iterator insert(const_iterator p, charT c);
 
-#if _LIBCPP_DEBUG >= 1
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <string>
 #include <stdexcept>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -28,7 +25,7 @@ test(S& s, typename S::const_iterator p,
     bool sufficient_cap = s.size() < s.capacity();
     typename S::difference_type pos = p - s.begin();
     typename S::iterator i = s.insert(p, c);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
     assert(i - s.begin() == pos);
     assert(*i == c);
@@ -76,13 +73,4 @@ int main()
     test(s, s.begin()+6, 'C', S("a567ABC1432dcb"));
     }
 #endif
-#if _LIBCPP_DEBUG >= 1
-    {
-        typedef std::string S;
-        S s;
-        S s2;
-        s.insert(s2.begin(), '1');
-        assert(false);
-    }
-#endif
 }

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp Thu Apr 28 17:28:23 2016
@@ -28,7 +28,7 @@ test(S s, typename S::difference_type po
 {
     typename S::const_iterator p = s.cbegin() + pos;
     typename S::iterator i = s.insert(p, first, last);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(i - s.begin() == pos);
     assert(s == expected);
 }
@@ -45,7 +45,7 @@ test_exceptions(S s, typename S::differe
         assert(false);
         }
     catch (...) {}
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == aCopy);
 }
 #endif

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/iter_size_char.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/iter_size_char.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/iter_size_char.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/iter_size_char.pass.cpp Thu Apr 28 17:28:23 2016
@@ -11,13 +11,10 @@
 
 // iterator insert(const_iterator p, size_type n, charT c);
 
-#if _LIBCPP_DEBUG >= 1
-#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
-#endif
-
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -27,7 +24,7 @@ test(S s, typename S::difference_type po
 {
     typename S::const_iterator p = s.cbegin() + pos;
     typename S::iterator i = s.insert(p, n, c);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(i - s.begin() == pos);
     assert(s == expected);
 }
@@ -170,12 +167,4 @@ int main()
     test(S("abcdefghijklmnopqrst"), 20, 20, '1', S("abcdefghijklmnopqrst11111111111111111111"));
     }
 #endif
-#if _LIBCPP_DEBUG >= 1
-    {
-        std::string s;
-        std::string s2;
-        s.insert(s2.begin(), 1, 'a');
-        assert(false);
-    }
-#endif
 }

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp Thu Apr 28 17:28:23 2016
@@ -17,6 +17,7 @@
 #include <stdexcept>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -28,7 +29,7 @@ test(S s, typename S::size_type pos, con
     try
     {
         s.insert(pos, str);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(pos <= old_size);
         assert(s == expected);
     }

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp Thu Apr 28 17:28:23 2016
@@ -17,6 +17,7 @@
 #include <stdexcept>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -29,7 +30,7 @@ test(S s, typename S::size_type pos, con
     try
     {
         s.insert(pos, str, n);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(pos <= old_size);
         assert(s == expected);
     }

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_size_char.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_size_char.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_size_char.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_size_char.pass.cpp Thu Apr 28 17:28:23 2016
@@ -17,6 +17,7 @@
 #include <stdexcept>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -29,7 +30,7 @@ test(S s, typename S::size_type pos, typ
     try
     {
         s.insert(pos, n, str);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(pos <= old_size);
         assert(s == expected);
     }

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_string.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_string.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_string.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_string.pass.cpp Thu Apr 28 17:28:23 2016
@@ -17,6 +17,7 @@
 #include <stdexcept>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -28,7 +29,7 @@ test(S s, typename S::size_type pos, S s
     try
     {
         s.insert(pos, str);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(pos <= old_size);
         assert(s == expected);
     }

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp Thu Apr 28 17:28:23 2016
@@ -19,6 +19,7 @@
 #include <stdexcept>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -31,7 +32,7 @@ test(S s, typename S::size_type pos1, S
     try
     {
         s.insert(pos1, str, pos2, n);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(pos1 <= old_size && pos2 <= str.size());
         assert(s == expected);
     }
@@ -51,7 +52,7 @@ test_npos(S s, typename S::size_type pos
     try
     {
         s.insert(pos1, str, pos2);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(pos1 <= old_size && pos2 <= str.size());
         assert(s == expected);
     }

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/char.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/char.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/char.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/char.pass.cpp Thu Apr 28 17:28:23 2016
@@ -14,6 +14,7 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -21,7 +22,7 @@ void
 test(S s, typename S::value_type str, S expected)
 {
     s += str;
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
 }
 
@@ -34,7 +35,7 @@ int main()
     test(S("1234567890"), 'a', S("1234567890a"));
     test(S("12345678901234567890"), 'a', S("12345678901234567890a"));
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(), 'a', S("a"));

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/initializer_list.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/initializer_list.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/initializer_list.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/initializer_list.pass.cpp Thu Apr 28 17:28:23 2016
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// UNSUPPORTED: c++98, c++03
+
 // <string>
 
 // basic_string& operator+=(initializer_list<charT> il);
@@ -18,19 +20,15 @@
 
 int main()
 {
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
     {
         std::string s("123");
         s += {'a', 'b', 'c'};
         assert(s == "123abc");
     }
-#if __cplusplus >= 201103L
     {
         typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
         S s("123");
         s += {'a', 'b', 'c'};
         assert(s == "123abc");
     }
-#endif
-#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 }

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/pointer.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/pointer.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/pointer.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/pointer.pass.cpp Thu Apr 28 17:28:23 2016
@@ -14,6 +14,7 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -21,7 +22,7 @@ void
 test(S s, const typename S::value_type* str, S expected)
 {
     s += str;
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
 }
 
@@ -50,7 +51,7 @@ int main()
     test(S("12345678901234567890"), "12345678901234567890",
          S("1234567890123456789012345678901234567890"));
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(), "", S());

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/string.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/string.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/string.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/string.pass.cpp Thu Apr 28 17:28:23 2016
@@ -15,6 +15,7 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -22,7 +23,7 @@ void
 test(S s, S str, S expected)
 {
     s += str;
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
 }
 
@@ -51,7 +52,7 @@ int main()
     test(S("12345678901234567890"), S("12345678901234567890"),
          S("1234567890123456789012345678901234567890"));
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(), S(), S());

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp Thu Apr 28 17:28:23 2016
@@ -29,7 +29,7 @@ test(S s, typename S::size_type pos1, ty
     typename S::const_iterator last = s.begin() + pos1 + n1;
     typename S::size_type xlen = last - first;
     s.replace(first, last, f, l);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
     typename S::size_type rlen = std::distance(f, l);
     assert(s.size() == old_size - xlen + rlen);
@@ -48,7 +48,7 @@ test_exceptions(S s, typename S::size_ty
 	    assert(false);
 	    }
 	catch (...) {}
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == aCopy);
 }
 #endif

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp Thu Apr 28 17:28:23 2016
@@ -29,7 +29,7 @@ test(S s, typename S::size_type pos1, ty
     typename S::const_iterator last = s.begin() + pos1 + n1;
     typename S::size_type xlen = last - first;
     s.replace(first, last, str);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
     typename S::size_type rlen = S::traits_type::length(str);
     assert(s.size() == old_size - xlen + rlen);

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp Thu Apr 28 17:28:23 2016
@@ -12,12 +12,11 @@
 // basic_string<charT,traits,Allocator>&
 //   replace(const_iterator i1, const_iterator i2, const charT* s, size_type n);
 
-#include <stdio.h>
-
 #include <string>
 #include <algorithm>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -30,7 +29,7 @@ test(S s, typename S::size_type pos1, ty
     typename S::const_iterator last = s.begin() + pos1 + n1;
     typename S::size_type xlen = last - first;
     s.replace(first, last, str, n2);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
     typename S::size_type rlen = n2;
     assert(s.size() == old_size - xlen + rlen);

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_size_char.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_size_char.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_size_char.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_size_char.pass.cpp Thu Apr 28 17:28:23 2016
@@ -12,12 +12,11 @@
 // basic_string<charT,traits,Allocator>&
 //   replace(const_iterator i1, const_iterator i2, size_type n, charT c);
 
-#include <stdio.h>
-
 #include <string>
 #include <algorithm>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -30,7 +29,7 @@ test(S s, typename S::size_type pos1, ty
     typename S::const_iterator last = s.begin() + pos1 + n1;
     typename S::size_type xlen = last - first;
     s.replace(first, last, n2, c);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
     typename S::size_type rlen = n2;
     assert(s.size() == old_size - xlen + rlen);

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string.pass.cpp Thu Apr 28 17:28:23 2016
@@ -12,12 +12,11 @@
 // basic_string<charT,traits,Allocator>&
 //   replace(const_iterator i1, const_iterator i2, const basic_string& str);
 
-#include <stdio.h>
-
 #include <string>
 #include <algorithm>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -29,7 +28,7 @@ test(S s, typename S::size_type pos1, ty
     typename S::const_iterator last = s.begin() + pos1 + n1;
     typename S::size_type xlen = last - first;
     s.replace(first, last, str);
-    assert(s.__invariants());
+    LIBCPP_ASSERT(s.__invariants());
     assert(s == expected);
     typename S::size_type rlen = str.size();
     assert(s.size() == old_size - xlen + rlen);

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer.pass.cpp Thu Apr 28 17:28:23 2016
@@ -13,13 +13,12 @@
 // basic_string<charT,traits,Allocator>&
 //   replace(size_type pos, size_type n1, const charT* s);
 
-#include <stdio.h>
-
 #include <string>
 #include <stdexcept>
 #include <algorithm>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -32,7 +31,7 @@ test(S s, typename S::size_type pos, typ
     try
     {
         s.replace(pos, n1, str);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(pos <= old_size);
         assert(s == expected);
         typename S::size_type xlen = std::min(n1, old_size - pos);

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer_size.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer_size.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer_size.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer_size.pass.cpp Thu Apr 28 17:28:23 2016
@@ -13,13 +13,12 @@
 // basic_string<charT,traits,Allocator>&
 //   replace(size_type pos, size_type n1, const charT* s, size_type n2);
 
-#include <stdio.h>
-
 #include <string>
 #include <stdexcept>
 #include <algorithm>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -33,7 +32,7 @@ test(S s, typename S::size_type pos, typ
     try
     {
         s.replace(pos, n1, str, n2);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(pos <= old_size);
         assert(s == expected);
         typename S::size_type xlen = std::min(n1, old_size - pos);

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_size_char.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_size_char.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_size_char.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_size_char.pass.cpp Thu Apr 28 17:28:23 2016
@@ -18,6 +18,7 @@
 #include <algorithm>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -31,7 +32,7 @@ test(S s, typename S::size_type pos, typ
     try
     {
         s.replace(pos, n1, n2, c);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(pos <= old_size);
         assert(s == expected);
         typename S::size_type xlen = std::min(n1, old_size - pos);

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string.pass.cpp Thu Apr 28 17:28:23 2016
@@ -18,6 +18,7 @@
 #include <algorithm>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -29,7 +30,7 @@ test(S s, typename S::size_type pos1, ty
     try
     {
         s.replace(pos1, n1, str);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(pos1 <= old_size);
         assert(s == expected);
         typename S::size_type xlen = std::min(n1, old_size - pos1);

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp Thu Apr 28 17:28:23 2016
@@ -20,6 +20,7 @@
 #include <algorithm>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -33,7 +34,7 @@ test(S s, typename S::size_type pos1, ty
     try
     {
         s.replace(pos1, n1, str, pos2, n2);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(pos1 <= old_size && pos2 <= str.size());
         assert(s == expected);
         typename S::size_type xlen = std::min(n1, old_size - pos1);
@@ -58,7 +59,7 @@ test_npos(S s, typename S::size_type pos
     try
     {
         s.replace(pos1, n1, str, pos2);
-        assert(s.__invariants());
+        LIBCPP_ASSERT(s.__invariants());
         assert(pos1 <= old_size && pos2 <= str.size());
         assert(s == expected);
         typename S::size_type xlen = std::min(n1, old_size - pos1);

Modified: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_swap/swap.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_swap/swap.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_swap/swap.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_swap/swap.pass.cpp Thu Apr 28 17:28:23 2016
@@ -16,6 +16,7 @@
 #include <algorithm>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -25,8 +26,8 @@ test(S s1, S s2)
     S s1_ = s1;
     S s2_ = s2;
     s1.swap(s2);
-    assert(s1.__invariants());
-    assert(s2.__invariants());
+    LIBCPP_ASSERT(s1.__invariants());
+    LIBCPP_ASSERT(s2.__invariants());
     assert(s1 == s2_);
     assert(s2 == s1_);
 }
@@ -52,7 +53,7 @@ int main()
     test(S("abcdefghijklmnopqrst"), S("1234567890"));
     test(S("abcdefghijklmnopqrst"), S("12345678901234567890"));
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(""), S(""));

Modified: libcxx/trunk/test/std/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp Thu Apr 28 17:28:23 2016
@@ -18,6 +18,7 @@
 #include <algorithm>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -27,8 +28,8 @@ test(S s1, S s2)
     S s1_ = s1;
     S s2_ = s2;
     swap(s1, s2);
-    assert(s1.__invariants());
-    assert(s2.__invariants());
+    LIBCPP_ASSERT(s1.__invariants());
+    LIBCPP_ASSERT(s2.__invariants());
     assert(s1 == s2_);
     assert(s2 == s1_);
 }
@@ -54,7 +55,7 @@ int main()
     test(S("abcdefghijklmnopqrst"), S("1234567890"));
     test(S("abcdefghijklmnopqrst"), S("12345678901234567890"));
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
     test(S(""), S(""));

Modified: libcxx/trunk/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp Thu Apr 28 17:28:23 2016
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// UNSUPPORTED: c++98, c++03
+
 // <string>
 
 // void swap(basic_string& c)
@@ -22,6 +24,7 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "test_allocator.h"
 
 template <class T>
@@ -51,7 +54,6 @@ struct some_alloc2
 
 int main()
 {
-#if __has_feature(cxx_noexcept)
     {
         typedef std::string C;
         C c1, c2;
@@ -80,6 +82,4 @@ int main()
         static_assert( noexcept(swap(c1, c2)), "");
     }
 #endif
-
-#endif
 }

Modified: libcxx/trunk/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp Thu Apr 28 17:28:23 2016
@@ -17,6 +17,7 @@
 #include <algorithm>
 #include <cassert>
 
+#include "test_macros.h"
 #include "min_allocator.h"
 
 template <class S>
@@ -26,7 +27,7 @@ test(const S& s, typename S::size_type p
     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);
@@ -101,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);

Modified: libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_include_order.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_include_order.pass.cpp?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_include_order.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_include_order.pass.cpp Thu Apr 28 17:28:23 2016
@@ -29,7 +29,7 @@ int main()
     // Use a builtin type so we don't get ADL lookup.
     typedef double T[42][50];
     {
-        static_assert(std::__is_swappable<T>::value, "");
+        LIBCPP_STATIC_ASSERT(std::__is_swappable<T>::value, "");
 #if TEST_STD_VER > 14
         static_assert(std::is_swappable_v<T>);
 #endif

Modified: libcxx/trunk/test/support/assert_checkpoint.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/assert_checkpoint.h?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/support/assert_checkpoint.h (original)
+++ libcxx/trunk/test/support/assert_checkpoint.h Thu Apr 28 17:28:23 2016
@@ -33,7 +33,13 @@ inline void clearCheckpoint() {
     globalCheckpoint() = Checkpoint{0};
 }
 
-#define CHECKPOINT(msg) globalCheckpoint() = Checkpoint{__FILE__, __PRETTY_FUNCTION__, __LINE__, msg}
+#if defined(__GNUC__)
+#define CHECKPOINT_FUNCTION_NAME __PRETTY_FUNCTION__
+#else
+#define CHECKPOINT_FUNCTION_NAME __func__
+#endif
+
+#define CHECKPOINT(msg) globalCheckpoint() = Checkpoint{__FILE__, CHECKPOINT_FUNCTION_NAME, __LINE__, msg}
 
 inline void checkpointSignalHandler(int signal) {
     if (signal == SIGABRT) {

Modified: libcxx/trunk/test/support/platform_support.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/platform_support.h?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/support/platform_support.h (original)
+++ libcxx/trunk/test/support/platform_support.h Thu Apr 28 17:28:23 2016
@@ -91,6 +91,6 @@ get_temp_file_name()
     return Name;
 #endif
 }
-#endif // __CloundABI__
+#endif // __CloudABI__
 
 #endif // PLATFORM_SUPPORT_H

Modified: libcxx/trunk/test/support/test_macros.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/test_macros.h?rev=267947&r1=267946&r2=267947&view=diff
==============================================================================
--- libcxx/trunk/test/support/test_macros.h (original)
+++ libcxx/trunk/test/support/test_macros.h Thu Apr 28 17:28:23 2016
@@ -11,6 +11,8 @@
 #ifndef SUPPORT_TEST_MACROS_HPP
 #define SUPPORT_TEST_MACROS_HPP
 
+#include <ciso646> // Get STL specific macros like _LIBCPP_VERSION
+
 #define TEST_CONCAT1(X, Y) X##Y
 #define TEST_CONCAT(X, Y) TEST_CONCAT1(X, Y)
 
@@ -47,8 +49,6 @@
 #if TEST_STD_VER >= 11
 #define TEST_HAS_RVALUE_REFERENCES
 #define TEST_HAS_VARIADIC_TEMPLATES
-#define TEST_HAS_INITIALIZER_LISTS
-#define TEST_HAS_BASIC_CONSTEXPR
 #endif
 
 /* Features that were introduced in C++14 */
@@ -61,12 +61,6 @@
 #if TEST_STD_VER > 14
 #endif
 
-#if TEST_HAS_EXTENSION(cxx_decltype) || TEST_STD_VER >= 11
-#define TEST_DECLTYPE(T) decltype(T)
-#else
-#define TEST_DECLTYPE(T) __typeof__(T)
-#endif
-
 #if TEST_STD_VER >= 11
 #define TEST_CONSTEXPR constexpr
 #define TEST_NOEXCEPT noexcept
@@ -81,25 +75,6 @@
 #define TEST_NOEXCEPT
 #endif
 
-#if TEST_HAS_EXTENSION(cxx_static_assert) || TEST_STD_VER >= 11
-#  define TEST_STATIC_ASSERT(Expr, Msg) static_assert(Expr, Msg)
-#else
-#  define TEST_STATIC_ASSERT(Expr, Msg)                          \
-      typedef ::test_detail::static_assert_check<sizeof(         \
-          ::test_detail::static_assert_incomplete_test<(Expr)>)> \
-    TEST_CONCAT(test_assert, __LINE__)
-#
-#endif
-
-namespace test_detail {
-
-template <bool> struct static_assert_incomplete_test;
-template <> struct static_assert_incomplete_test<true> {};
-template <unsigned> struct static_assert_check {};
-
-} // end namespace test_detail
-
-
 #if !TEST_HAS_FEATURE(cxx_rtti) && !defined(__cxx_rtti)
 #define TEST_HAS_NO_RTTI
 #endif
@@ -113,4 +88,13 @@ template <unsigned> struct static_assert
 #define TEST_HAS_SANITIZERS
 #endif
 
+/* Macros for testing libc++ specific behavior and extensions */
+#if defined(_LIBCPP_VERSION)
+#define LIBCPP_ASSERT(...) assert(__VA_ARGS__)
+#define LIBCPP_STATIC_ASSERT(...) static_assert(__VA_ARGS__)
+#else
+#define LIBCPP_ASSERT(...) ((void)0)
+#define LIBCPP_STATIC_ASSERT(...) ((void)0)
+#endif
+
 #endif // SUPPORT_TEST_MACROS_HPP




More information about the cfe-commits mailing list