diff options
| author | Eric Fiselier <eric@efcs.ca> | 2016-06-14 21:31:42 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2016-06-14 21:31:42 +0000 |
| commit | f2f2a6395fad5bd49a573fdf2b20072735d496f7 (patch) | |
| tree | 9e17e483fe805be6d7940b2b653063df88815347 /libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared | |
| parent | 23b6d6adc9dd38fe6c2cb433e163dc74b2cdc8e6 (diff) | |
| download | bcm5719-llvm-f2f2a6395fad5bd49a573fdf2b20072735d496f7.tar.gz bcm5719-llvm-f2f2a6395fad5bd49a573fdf2b20072735d496f7.zip | |
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
Diffstat (limited to 'libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared')
4 files changed, 6 insertions, 4 deletions
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<A>::count == 0); assert(test_deleter<A>::dealloc_count == 1); test_deleter<A>::dealloc_count = 0; -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 // Test an allocator that returns class-type pointers { std::shared_ptr<A> p(nullptr, test_deleter<A>(1), min_allocator<void>()); 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<A>::count == 0); assert(test_deleter<A>::dealloc_count == 1); test_deleter<A>::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 <cstdlib> #include <cassert> +#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<int>(new int)); } -#if __cplusplus >= 201402L +#if TEST_STD_VER >= 14 // LWG 2415 { std::unique_ptr<int, void (*)(int*)> p(nullptr, assert_deleter<int>); 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<Two>::alloc_count == 0); test<bare_allocator<void> >(); -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 test<min_allocator<void> >(); #endif } |

