diff options
author | Louis Dionne <ldionne@apple.com> | 2019-02-05 19:50:17 +0000 |
---|---|---|
committer | Louis Dionne <ldionne@apple.com> | 2019-02-05 19:50:17 +0000 |
commit | bb6d61c752070bdd2a5d835dd8e56958637dfdd5 (patch) | |
tree | f33049918931e458cae58ee2746050a1fe8c18e8 /libcxx/test/std/utilities | |
parent | 0ca702f8d51a8803419974a9657c34865f0f20c4 (diff) | |
download | bcm5719-llvm-bb6d61c752070bdd2a5d835dd8e56958637dfdd5.tar.gz bcm5719-llvm-bb6d61c752070bdd2a5d835dd8e56958637dfdd5.zip |
[libc++] Use UNSUPPORTED instead of TEST_STD_VER #ifdef
When the whole test only works starting at some version of the Standard,
use UNSUPPORTED lit markup instead of #ifdef TEST_STD_VER. This provides
more visibility into the test suite.
Reviewed as https://reviews.llvm.org/D57704.
Thanks to Andrey Maksimov for the patch.
llvm-svn: 353206
Diffstat (limited to 'libcxx/test/std/utilities')
4 files changed, 8 insertions, 26 deletions
diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp index 10475403d22..e17a6e9c5cb 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp @@ -6,13 +6,12 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + #include <scoped_allocator> #include <memory> #include <cassert> -#include "test_macros.h" - -#if TEST_STD_VER >= 11 // #include <memory> // // template <class Alloc> @@ -121,6 +120,3 @@ int main(int, char**) return 0; } -#else -int main(int, char**) { return 0; } -#endif diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator_pointers.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator_pointers.pass.cpp index bc89c62a847..ad4319410a7 100644 --- a/libcxx/test/std/utilities/memory/default.allocator/allocator_pointers.pass.cpp +++ b/libcxx/test/std/utilities/memory/default.allocator/allocator_pointers.pass.cpp @@ -6,12 +6,11 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + #include <memory> #include <cassert> -#include "test_macros.h" - -#if TEST_STD_VER >= 11 // #include <memory> // // template <class Alloc> @@ -120,6 +119,3 @@ int main(int, char**) return 0; } -#else -int main(int, char**) { return 0; } -#endif diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/nullptr.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/nullptr.pass.cpp index 993b32fdf01..0b25ac1ba95 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/nullptr.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/nullptr.pass.cpp @@ -11,11 +11,11 @@ // nullptr_t // is_null_pointer +// UNSUPPORTED: c++98, c++03, c++11 + #include <type_traits> #include <cstddef> // for std::nullptr_t -#include "test_macros.h" -#if TEST_STD_VER > 11 template <class T> void test_nullptr_imp() { @@ -54,8 +54,3 @@ int main(int, char**) static_assert(!std::is_null_pointer<incomplete_type>::value, ""); return 0; } -#else -int main(int, char**) { - return 0; -} -#endif diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp index 27f3d59349b..ede72c2a50f 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp @@ -6,11 +6,9 @@ // //===----------------------------------------------------------------------===// -// This is for bugs 18853 and 19118 - -#include "test_macros.h" +// UNSUPPORTED: c++98, c++03 -#if TEST_STD_VER >= 11 +// This is for bugs 18853 and 19118 #include <tuple> #include <functional> @@ -32,6 +30,3 @@ int main(int, char**) return 0; } -#else -int main(int, char**) { return 0; } -#endif |