diff --git a/test/std/containers/associative/tree_balance_after_insert.pass.cpp b/test/libcxx/containers/associative/tree_balance_after_insert.pass.cpp similarity index 100% rename from test/std/containers/associative/tree_balance_after_insert.pass.cpp rename to test/libcxx/containers/associative/tree_balance_after_insert.pass.cpp diff --git a/test/std/containers/associative/tree_left_rotate.pass.cpp b/test/libcxx/containers/associative/tree_left_rotate.pass.cpp similarity index 100% rename from test/std/containers/associative/tree_left_rotate.pass.cpp rename to test/libcxx/containers/associative/tree_left_rotate.pass.cpp diff --git a/test/std/containers/associative/tree_remove.pass.cpp b/test/libcxx/containers/associative/tree_remove.pass.cpp similarity index 100% rename from test/std/containers/associative/tree_remove.pass.cpp rename to test/libcxx/containers/associative/tree_remove.pass.cpp diff --git a/test/std/containers/associative/tree_right_rotate.pass.cpp b/test/libcxx/containers/associative/tree_right_rotate.pass.cpp similarity index 100% rename from test/std/containers/associative/tree_right_rotate.pass.cpp rename to test/libcxx/containers/associative/tree_right_rotate.pass.cpp diff --git a/test/std/containers/sequences/list/list.special/db_swap_1.pass.cpp b/test/libcxx/containers/sequences/list/list.special/db_swap_1.pass.cpp similarity index 100% rename from test/std/containers/sequences/list/list.special/db_swap_1.pass.cpp rename to test/libcxx/containers/sequences/list/list.special/db_swap_1.pass.cpp diff --git a/test/std/containers/unord/next_prime.pass.cpp b/test/libcxx/containers/unord/next_prime.pass.cpp similarity index 100% rename from test/std/containers/unord/next_prime.pass.cpp rename to test/libcxx/containers/unord/next_prime.pass.cpp diff --git a/test/std/containers/unord/unord.map/db_iterators_7.pass.cpp b/test/libcxx/containers/unord/unord.map/db_iterators_7.pass.cpp similarity index 100% rename from test/std/containers/unord/unord.map/db_iterators_7.pass.cpp rename to test/libcxx/containers/unord/unord.map/db_iterators_7.pass.cpp diff --git a/test/std/containers/unord/unord.map/db_iterators_8.pass.cpp b/test/libcxx/containers/unord/unord.map/db_iterators_8.pass.cpp similarity index 100% rename from test/std/containers/unord/unord.map/db_iterators_8.pass.cpp rename to test/libcxx/containers/unord/unord.map/db_iterators_8.pass.cpp diff --git a/test/std/containers/unord/unord.map/db_local_iterators_7.pass.cpp b/test/libcxx/containers/unord/unord.map/db_local_iterators_7.pass.cpp similarity index 100% rename from test/std/containers/unord/unord.map/db_local_iterators_7.pass.cpp rename to test/libcxx/containers/unord/unord.map/db_local_iterators_7.pass.cpp diff --git a/test/std/containers/unord/unord.map/db_local_iterators_8.pass.cpp b/test/libcxx/containers/unord/unord.map/db_local_iterators_8.pass.cpp similarity index 100% rename from test/std/containers/unord/unord.map/db_local_iterators_8.pass.cpp rename to test/libcxx/containers/unord/unord.map/db_local_iterators_8.pass.cpp diff --git a/test/std/containers/sequences/deque/deque.capacity/resize_size.pass.cpp b/test/std/containers/sequences/deque/deque.capacity/resize_size.pass.cpp index 84f04f9d5..53c6bd338 100644 --- a/test/std/containers/sequences/deque/deque.capacity/resize_size.pass.cpp +++ b/test/std/containers/sequences/deque/deque.capacity/resize_size.pass.cpp @@ -12,6 +12,8 @@ // void resize(size_type n); #include +#include +#include #include #include "test_macros.h" diff --git a/test/std/containers/sequences/deque/deque.capacity/resize_size_value.pass.cpp b/test/std/containers/sequences/deque/deque.capacity/resize_size_value.pass.cpp index 2bf2423fb..12af64386 100644 --- a/test/std/containers/sequences/deque/deque.capacity/resize_size_value.pass.cpp +++ b/test/std/containers/sequences/deque/deque.capacity/resize_size_value.pass.cpp @@ -12,6 +12,8 @@ // void resize(size_type n, const value_type& v); #include +#include +#include #include #include "test_macros.h" diff --git a/test/std/containers/sequences/deque/deque.modifiers/erase_iter.pass.cpp b/test/std/containers/sequences/deque/deque.modifiers/erase_iter.pass.cpp index a45b75d25..a1c42a71d 100644 --- a/test/std/containers/sequences/deque/deque.modifiers/erase_iter.pass.cpp +++ b/test/std/containers/sequences/deque/deque.modifiers/erase_iter.pass.cpp @@ -12,6 +12,8 @@ // iterator erase(const_iterator p) #include +#include +#include #include #include "min_allocator.h" diff --git a/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.pass.cpp b/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.pass.cpp index 0576aca5c..15d7400b8 100644 --- a/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.pass.cpp +++ b/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.pass.cpp @@ -14,6 +14,8 @@ // iterator erase(const_iterator f, const_iterator l) #include +#include +#include #include #include "min_allocator.h" diff --git a/test/std/containers/unord/unord.map/unord.map.modifiers/try.emplace.pass.cpp b/test/std/containers/unord/unord.map/unord.map.modifiers/try.emplace.pass.cpp index eabcf2e85..adc4d6944 100644 --- a/test/std/containers/unord/unord.map/unord.map.modifiers/try.emplace.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.modifiers/try.emplace.pass.cpp @@ -22,7 +22,6 @@ // template // iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args); // C++17 -#include <__config> #include #include #include diff --git a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp b/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp index 685011587..12b2f6b64 100644 --- a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp +++ b/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp @@ -17,6 +17,7 @@ // template result_type operator()(_URNG& g, const param_type& parm); #include +#include #include #include #include diff --git a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp b/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp index af75fce51..9606f96f9 100644 --- a/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp +++ b/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp @@ -19,6 +19,7 @@ #include #include +#include #include #include #include diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.elem/tuple.by.type.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.elem/tuple.by.type.pass.cpp index b661a78de..01ee1ca1f 100644 --- a/test/std/utilities/tuple/tuple.tuple/tuple.elem/tuple.by.type.pass.cpp +++ b/test/std/utilities/tuple/tuple.tuple/tuple.elem/tuple.by.type.pass.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/test/support/asan_testing.h b/test/support/asan_testing.h index 45ad04b1b..b1209de23 100644 --- a/test/support/asan_testing.h +++ b/test/support/asan_testing.h @@ -10,9 +10,9 @@ #ifndef ASAN_TESTING_H #define ASAN_TESTING_H -#include <__config> +#include "test_macros.h" -#ifndef _LIBCPP_HAS_NO_ASAN +#if TEST_HAS_FEATURE(address_sanitizer) extern "C" int __sanitizer_verify_contiguous_container ( const void *beg, const void *mid, const void *end ); @@ -27,7 +27,7 @@ bool is_contiguous_container_asan_correct ( const std::vector &c ) #else template -bool is_contiguous_container_asan_correct ( const std::vector &c ) +bool is_contiguous_container_asan_correct ( const std::vector &) { return true; } diff --git a/test/support/constexpr_char_traits.hpp b/test/support/constexpr_char_traits.hpp index b069c9007..0a73d3ad1 100644 --- a/test/support/constexpr_char_traits.hpp +++ b/test/support/constexpr_char_traits.hpp @@ -11,9 +11,9 @@ #ifndef _CONSTEXPR_CHAR_TRAITS #define _CONSTEXPR_CHAR_TRAITS -#include <__config> #include +#include "test_macros.h" template struct constexpr_char_traits @@ -24,41 +24,41 @@ struct constexpr_char_traits typedef std::streampos pos_type; typedef std::mbstate_t state_type; - static _LIBCPP_CONSTEXPR_AFTER_CXX11 void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT + static TEST_CONSTEXPR_CXX14 void assign(char_type& __c1, const char_type& __c2) TEST_NOEXCEPT {__c1 = __c2;} - static _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT + static TEST_CONSTEXPR bool eq(char_type __c1, char_type __c2) TEST_NOEXCEPT {return __c1 == __c2;} - static _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT + static TEST_CONSTEXPR bool lt(char_type __c1, char_type __c2) TEST_NOEXCEPT {return __c1 < __c2;} - static _LIBCPP_CONSTEXPR_AFTER_CXX11 int compare(const char_type* __s1, const char_type* __s2, size_t __n); - static _LIBCPP_CONSTEXPR_AFTER_CXX11 size_t length(const char_type* __s); - static _LIBCPP_CONSTEXPR_AFTER_CXX11 const char_type* find(const char_type* __s, size_t __n, const char_type& __a); - static _LIBCPP_CONSTEXPR_AFTER_CXX11 char_type* move(char_type* __s1, const char_type* __s2, size_t __n); - static _LIBCPP_CONSTEXPR_AFTER_CXX11 char_type* copy(char_type* __s1, const char_type* __s2, size_t __n); - static _LIBCPP_CONSTEXPR_AFTER_CXX11 char_type* assign(char_type* __s, size_t __n, char_type __a); + static TEST_CONSTEXPR_CXX14 int compare(const char_type* __s1, const char_type* __s2, size_t __n); + static TEST_CONSTEXPR_CXX14 size_t length(const char_type* __s); + static TEST_CONSTEXPR_CXX14 const char_type* find(const char_type* __s, size_t __n, const char_type& __a); + static TEST_CONSTEXPR_CXX14 char_type* move(char_type* __s1, const char_type* __s2, size_t __n); + static TEST_CONSTEXPR_CXX14 char_type* copy(char_type* __s1, const char_type* __s2, size_t __n); + static TEST_CONSTEXPR_CXX14 char_type* assign(char_type* __s, size_t __n, char_type __a); - static _LIBCPP_CONSTEXPR int_type not_eof(int_type __c) _NOEXCEPT + static TEST_CONSTEXPR int_type not_eof(int_type __c) TEST_NOEXCEPT {return eq_int_type(__c, eof()) ? ~eof() : __c;} - static _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT + static TEST_CONSTEXPR char_type to_char_type(int_type __c) TEST_NOEXCEPT {return char_type(__c);} - static _LIBCPP_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT + static TEST_CONSTEXPR int_type to_int_type(char_type __c) TEST_NOEXCEPT {return int_type(__c);} - static _LIBCPP_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT + static TEST_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) TEST_NOEXCEPT {return __c1 == __c2;} - static _LIBCPP_CONSTEXPR int_type eof() _NOEXCEPT + static TEST_CONSTEXPR int_type eof() TEST_NOEXCEPT {return int_type(EOF);} }; template -_LIBCPP_CONSTEXPR_AFTER_CXX11 int +TEST_CONSTEXPR_CXX14 int constexpr_char_traits<_CharT>::compare(const char_type* __s1, const char_type* __s2, size_t __n) { for (; __n; --__n, ++__s1, ++__s2) @@ -72,7 +72,7 @@ constexpr_char_traits<_CharT>::compare(const char_type* __s1, const char_type* _ } template -_LIBCPP_CONSTEXPR_AFTER_CXX11 size_t +TEST_CONSTEXPR_CXX14 size_t constexpr_char_traits<_CharT>::length(const char_type* __s) { size_t __len = 0; @@ -82,7 +82,7 @@ constexpr_char_traits<_CharT>::length(const char_type* __s) } template -_LIBCPP_CONSTEXPR_AFTER_CXX11 const _CharT* +TEST_CONSTEXPR_CXX14 const _CharT* constexpr_char_traits<_CharT>::find(const char_type* __s, size_t __n, const char_type& __a) { for (; __n; --__n) @@ -95,7 +95,7 @@ constexpr_char_traits<_CharT>::find(const char_type* __s, size_t __n, const char } template -_LIBCPP_CONSTEXPR_AFTER_CXX11 _CharT* +TEST_CONSTEXPR_CXX14 _CharT* constexpr_char_traits<_CharT>::move(char_type* __s1, const char_type* __s2, size_t __n) { char_type* __r = __s1; @@ -115,7 +115,7 @@ constexpr_char_traits<_CharT>::move(char_type* __s1, const char_type* __s2, size } template -_LIBCPP_CONSTEXPR_AFTER_CXX11 _CharT* +TEST_CONSTEXPR_CXX14 _CharT* constexpr_char_traits<_CharT>::copy(char_type* __s1, const char_type* __s2, size_t __n) { _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range"); @@ -126,7 +126,7 @@ constexpr_char_traits<_CharT>::copy(char_type* __s1, const char_type* __s2, size } template -_LIBCPP_CONSTEXPR_AFTER_CXX11 _CharT* +TEST_CONSTEXPR_CXX14 _CharT* constexpr_char_traits<_CharT>::assign(char_type* __s, size_t __n, char_type __a) { char_type* __r = __s; diff --git a/test/support/platform_support.h b/test/support/platform_support.h index 233e721ff..1aec3cdae 100644 --- a/test/support/platform_support.h +++ b/test/support/platform_support.h @@ -15,8 +15,6 @@ #ifndef PLATFORM_SUPPORT_H #define PLATFORM_SUPPORT_H -#include <__config> - // locale names #ifdef _WIN32 // WARNING: Windows does not support UTF-8 codepages. @@ -54,7 +52,7 @@ #include #include #include -#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__) +#if defined(_WIN32) || defined(__MINGW32__) #include // _mktemp #else #include // close @@ -67,12 +65,12 @@ extern "C" { } #endif -#ifndef _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE +#ifndef __CloudABI__ inline std::string get_temp_file_name() { -#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__) +#if defined(_WIN32) || defined(__MINGW32__) char Path[MAX_PATH+1]; char FN[MAX_PATH+1]; do { } while (0 == GetTempPath(MAX_PATH+1, Path)); @@ -93,6 +91,6 @@ get_temp_file_name() return Name; #endif } -#endif // _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE +#endif // __CloundABI__ #endif // PLATFORM_SUPPORT_H diff --git a/test/support/test_macros.h b/test/support/test_macros.h index c34e8cf7e..09d878b14 100644 --- a/test/support/test_macros.h +++ b/test/support/test_macros.h @@ -70,8 +70,14 @@ #if TEST_STD_VER >= 11 #define TEST_CONSTEXPR constexpr #define TEST_NOEXCEPT noexcept +# if TEST_STD_VER >= 14 +# define TEST_CONSTEXPR_CXX14 constexpr +# else +# define TEST_CONSTEXPR_CXX14 +# endif #else #define TEST_CONSTEXPR +#define TEST_CONSTEXPR_CXX14 #define TEST_NOEXCEPT #endif