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/algorithms/alg.sorting | |
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/algorithms/alg.sorting')
6 files changed, 12 insertions, 12 deletions
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<Iter>(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<Iter>(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, "" ); |