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 --- .../test/std/algorithms/alg.sorting/alg.min.max/max_element.pass.cpp | 4 ++-- .../std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp | 4 ++-- .../test/std/algorithms/alg.sorting/alg.min.max/min_element.pass.cpp | 4 ++-- .../std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp | 4 ++-- .../std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp | 4 ++-- .../algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) (limited to 'libcxx/test/std/algorithms/alg.sorting') diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_element.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_element.pass.cpp index 904d79ec393..3ecc250a9c8 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_element.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_element.pass.cpp @@ -57,13 +57,13 @@ test() test(1000); } -#if __cplusplus >= 201402L +#if TEST_STD_VER >= 14 constexpr int il[] = { 2, 4, 6, 8, 7, 5, 3, 1 }; #endif void constexpr_test() { -#if __cplusplus >= 201402L +#if TEST_STD_VER >= 14 constexpr auto p = std::max_element(il,il+8); static_assert ( *p == 8, "" ); #endif diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp index 752dabad4e4..fc88268aa84 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp @@ -75,14 +75,14 @@ void test_eq() delete [] a; } -#if __cplusplus >= 201402L +#if TEST_STD_VER >= 14 constexpr int il[] = { 2, 4, 6, 8, 7, 5, 3, 1 }; struct less { constexpr bool operator ()( const int &x, const int &y) const { return x < y; }}; #endif void constexpr_test() { -#if __cplusplus >= 201402L +#if TEST_STD_VER >= 14 constexpr auto p = std::max_element(il, il+8, less()); static_assert ( *p == 8, "" ); #endif diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element.pass.cpp index a9a9d61340f..45dd54b1ee4 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element.pass.cpp @@ -57,13 +57,13 @@ test() test(1000); } -#if __cplusplus >= 201402L +#if TEST_STD_VER >= 14 constexpr int il[] = { 2, 4, 6, 8, 7, 5, 3, 1 }; #endif void constexpr_test() { -#if __cplusplus >= 201402L +#if TEST_STD_VER >= 14 constexpr auto p = std::min_element(il, il+8); static_assert ( *p == 1, "" ); #endif diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp index 2eaa6451040..94ef482ddbd 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp @@ -75,14 +75,14 @@ void test_eq() delete [] a; } -#if __cplusplus >= 201402L +#if TEST_STD_VER >= 14 constexpr int il[] = { 2, 4, 6, 8, 7, 5, 3, 1 }; struct less { constexpr bool operator ()( const int &x, const int &y) const { return x < y; }}; #endif void constexpr_test() { -#if __cplusplus >= 201402L +#if TEST_STD_VER >= 14 constexpr auto p = std::min_element(il, il+8, less()); static_assert(*p == 1, ""); #endif diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp index 2f8532cfcdc..ef5474091db 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp @@ -74,13 +74,13 @@ test() } } -#if __cplusplus >= 201402L +#if TEST_STD_VER >= 14 constexpr int il[] = { 2, 4, 6, 8, 7, 5, 3, 1 }; #endif void constexpr_test() { -#if __cplusplus >= 201402L +#if TEST_STD_VER >= 14 constexpr auto p = std::minmax_element(il, il+8); static_assert ( *(p.first) == 1, "" ); static_assert ( *(p.second) == 8, "" ); diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp index 2a023580e3c..3a0c2dbbba1 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp @@ -79,14 +79,14 @@ test() } } -#if __cplusplus >= 201402L +#if TEST_STD_VER >= 14 constexpr int il[] = { 2, 4, 6, 8, 7, 5, 3, 1 }; struct less { constexpr bool operator ()( const int &x, const int &y) const { return x < y; }}; #endif void constexpr_test() { -#if __cplusplus >= 201402L +#if TEST_STD_VER >= 14 constexpr auto p = std::minmax_element(il, il+8, less()); static_assert ( *(p.first) == 1, "" ); static_assert ( *(p.second) == 8, "" ); -- cgit v1.2.3