From f2f2a6395fad5bd49a573fdf2b20072735d496f7 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Tue, 14 Jun 2016 21:31:42 +0000 Subject: Replace __cplusplus comparisons and dialect __has_feature checks with TEST_STD_VER. This is a huge cleanup that helps make the libc++ test suite more portable. Patch from STL@microsoft.com. Thanks STL! llvm-svn: 272716 --- .../util.smartptr.shared.const/nullptr_t_deleter_allocator.pass.cpp | 2 +- .../util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp | 2 +- .../util.smartptr.shared.const/unique_ptr.pass.cpp | 4 +++- .../util.smartptr.shared.create/allocate_shared_cxx03.pass.cpp | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) (limited to 'libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared') diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator.pass.cpp index b67f31ee45a..8a6cd0f352f 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator.pass.cpp @@ -65,7 +65,7 @@ int main() assert(test_deleter::count == 0); assert(test_deleter::dealloc_count == 1); test_deleter::dealloc_count = 0; -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 // Test an allocator that returns class-type pointers { std::shared_ptr p(nullptr, test_deleter(1), min_allocator()); diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp index 1a9c09cdb78..b0facfc1a6e 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp @@ -68,7 +68,7 @@ int main() assert(test_deleter::count == 0); assert(test_deleter::dealloc_count == 1); test_deleter::dealloc_count = 0; -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 // Test an allocator that returns class-type pointers { A* ptr = new A; diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp index 023c5c1eca6..1b06a99e636 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp @@ -19,6 +19,8 @@ #include #include +#include "test_macros.h" + bool throw_next = false; void* operator new(std::size_t s) throw(std::bad_alloc) @@ -105,7 +107,7 @@ int main() fn(std::unique_ptr(new int)); } -#if __cplusplus >= 201402L +#if TEST_STD_VER >= 14 // LWG 2415 { std::unique_ptr p(nullptr, assert_deleter); diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared_cxx03.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared_cxx03.pass.cpp index f6350c72bcc..527bbce1473 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared_cxx03.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared_cxx03.pass.cpp @@ -112,7 +112,7 @@ int main() assert(test_allocator::alloc_count == 0); test >(); -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 test >(); #endif } -- cgit v1.2.3