diff options
Diffstat (limited to 'libcxx/test/support')
-rw-r--r-- | libcxx/test/support/MoveOnly.h | 2 | ||||
-rw-r--r-- | libcxx/test/support/count_new.hpp | 10 | ||||
-rw-r--r-- | libcxx/test/support/min_allocator.h | 4 | ||||
-rw-r--r-- | libcxx/test/support/test_macros.h | 2 |
4 files changed, 10 insertions, 8 deletions
diff --git a/libcxx/test/support/MoveOnly.h b/libcxx/test/support/MoveOnly.h index ee6ae7c7e5f..a3e9cca89ee 100644 --- a/libcxx/test/support/MoveOnly.h +++ b/libcxx/test/support/MoveOnly.h @@ -10,6 +10,8 @@ #ifndef MOVEONLY_H #define MOVEONLY_H +#include "test_macros.h" + #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #include <cstddef> diff --git a/libcxx/test/support/count_new.hpp b/libcxx/test/support/count_new.hpp index e8968a93de9..8f66c5057d1 100644 --- a/libcxx/test/support/count_new.hpp +++ b/libcxx/test/support/count_new.hpp @@ -14,13 +14,11 @@ # include <cassert> # include <new> -#ifndef __has_feature -# define __has_feature(x) 0 -#endif +#include "test_macros.h" -#if __has_feature(address_sanitizer) \ - || __has_feature(memory_sanitizer) \ - || __has_feature(thread_sanitizer) +#if TEST_HAS_FEATURE(address_sanitizer) \ + || TEST_HAS_FEATURE(memory_sanitizer) \ + || TEST_HAS_FEATURE(thread_sanitizer) #define DISABLE_NEW_COUNT #endif diff --git a/libcxx/test/support/min_allocator.h b/libcxx/test/support/min_allocator.h index 5e3ae5d2a13..68cde7917a2 100644 --- a/libcxx/test/support/min_allocator.h +++ b/libcxx/test/support/min_allocator.h @@ -40,7 +40,7 @@ public: }; -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 #include <memory> @@ -286,6 +286,6 @@ public: friend bool operator!=(min_allocator x, min_allocator y) {return !(x == y);} }; -#endif // __cplusplus >= 201103L +#endif // TEST_STD_VER >= 11 #endif // MIN_ALLOCATOR_H diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h index 00ab7c423fa..037edbcb989 100644 --- a/libcxx/test/support/test_macros.h +++ b/libcxx/test/support/test_macros.h @@ -35,6 +35,7 @@ #endif /* Make a nice name for the standard version */ +#ifndef TEST_STD_VER #if __cplusplus <= 199711L # define TEST_STD_VER 3 #elif __cplusplus <= 201103L @@ -44,6 +45,7 @@ #else # define TEST_STD_VER 99 // greater than current standard #endif +#endif /* Features that were introduced in C++14 */ #if TEST_STD_VER >= 14 |