diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-05-27 22:41:45 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-05-27 22:41:45 +0000 |
commit | 38e229f9092e30f6d7f886147d6de29c0bf9e6b5 (patch) | |
tree | f68e97b6d556bc8314c6e2511cca474db8a29f98 /libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr | |
parent | 88cec7f7c071b328c5f926f1e41473ec24616394 (diff) | |
download | bcm5719-llvm-38e229f9092e30f6d7f886147d6de29c0bf9e6b5.tar.gz bcm5719-llvm-38e229f9092e30f6d7f886147d6de29c0bf9e6b5.zip |
Guard testing of tuple extensions to make tests portable
llvm-svn: 271065
Diffstat (limited to 'libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr')
4 files changed, 15 insertions, 2 deletions
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.pass.cpp index 817cc8f1099..6ab303c735b 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.pass.cpp @@ -82,6 +82,8 @@ void test_default_constructible_extension_sfinae() MoveOnly, Tuple, MoveOnly, MoveOnly >::value, ""); } + // testing extensions +#ifdef _LIBCPP_VERSION { typedef std::tuple<MoveOnly, int> Tuple; typedef std::tuple<MoveOnly, Tuple, MoveOnly, MoveOnly> NestedTuple; @@ -96,6 +98,7 @@ void test_default_constructible_extension_sfinae() MoveOnly, Tuple, MoveOnly, MoveOnly >::value, ""); } +#endif } int main() @@ -118,6 +121,7 @@ int main() assert(std::get<2>(t) == 2); } // extensions +#ifdef _LIBCPP_VERSION { std::tuple<MoveOnly, MoveOnly, MoveOnly> t(MoveOnly(0), MoveOnly(1)); @@ -131,7 +135,8 @@ int main() assert(std::get<1>(t) == MoveOnly()); assert(std::get<2>(t) == MoveOnly()); } -#if _LIBCPP_STD_VER > 11 +#endif +#if TEST_STD_VER > 11 { constexpr std::tuple<Empty> t0{Empty()}; } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_copy.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_copy.pass.cpp index 14e127e59ba..7c9f60cbf90 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_copy.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_copy.pass.cpp @@ -52,6 +52,8 @@ int main() assert(alloc_last::allocator_constructed); assert(std::get<0>(t) == 2); } +// testing extensions +#ifdef _LIBCPP_VERSION { typedef std::tuple<alloc_first, alloc_last> T; T t0(2, 3); @@ -75,4 +77,5 @@ int main() assert(std::get<1>(t) == 2); assert(std::get<2>(t) == 3); } +#endif } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move.pass.cpp index 54d3f7ee0c0..a3e1a9de619 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move.pass.cpp @@ -53,6 +53,8 @@ int main() assert(alloc_last::allocator_constructed); assert(std::get<0>(t) == 1); } +// testing extensions +#ifdef _LIBCPP_VERSION { typedef std::tuple<MoveOnly, alloc_first> T; T t0(0 ,1); @@ -74,4 +76,5 @@ int main() assert(std::get<1>(t) == 2); assert(std::get<2>(t) == 3); } +#endif } diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp index e787e877722..1d43a974f25 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp @@ -136,7 +136,8 @@ int main() assert(std::get<2>(t) == 2); assert(std::get<3>(t) == 3); } - // extensions +// extensions +#ifdef _LIBCPP_VERSION { std::tuple<int, char*, std::string> t(2); assert(std::get<0>(t) == 2); @@ -156,4 +157,5 @@ int main() assert(std::get<2>(t) == "text"); assert(std::get<3>(t) == 0.0); } +#endif } |