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/utility | |
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/utility')
-rw-r--r-- | libcxx/test/std/utilities/utility/pairs/pair.astuple/get_const.pass.cpp | 4 | ||||
-rw-r--r-- | libcxx/test/std/utilities/utility/pairs/pair.astuple/get_non_const.pass.cpp | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_const.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_const.pass.cpp index fcda3664d9b..9ef7bcff2ba 100644 --- a/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_const.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_const.pass.cpp @@ -18,6 +18,8 @@ #include <utility> #include <cassert> +#include "test_macros.h" + int main() { { @@ -27,7 +29,7 @@ int main() assert(std::get<1>(p) == 4); } -#if __cplusplus > 201103L +#if TEST_STD_VER > 11 { typedef std::pair<int, short> P; constexpr P p1(3, 4); diff --git a/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_non_const.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_non_const.pass.cpp index 6d61c47ffbf..47b4c06134d 100644 --- a/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_non_const.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pair.astuple/get_non_const.pass.cpp @@ -18,7 +18,9 @@ #include <utility> #include <cassert> -#if __cplusplus > 201103L +#include "test_macros.h" + +#if TEST_STD_VER > 11 struct S { std::pair<int, int> a; int k; @@ -41,7 +43,7 @@ int main() assert(std::get<1>(p) == 6); } -#if __cplusplus > 201103L +#if TEST_STD_VER > 11 { static_assert(S().k == 1, ""); static_assert(std::get<1>(getP()) == 4, ""); |