From: Louis Dionne Date: Tue, 5 Feb 2019 19:50:17 +0000 (+0000) Subject: [libc++] Use UNSUPPORTED instead of TEST_STD_VER #ifdef X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb6d61c752070bdd2a5d835dd8e56958637dfdd5;p=platform%2Fupstream%2Fllvm.git [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 --- diff --git a/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp b/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp index 1e54e56..b87797d 100644 --- a/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11 + // // quoted @@ -15,10 +17,6 @@ #include #include -#include "test_macros.h" - -#if TEST_STD_VER > 11 - template bool is_skipws ( const std::basic_istream& is ) { return ( is.flags() & std::ios_base::skipws ) != 0; @@ -173,12 +171,6 @@ int main(int, char**) assert ( unquote ( "" ) == "" ); // nothing there assert ( unquote ( L"" ) == L"" ); // nothing there test_padding (); - - return 0; -} -#else -int main(int, char**) { - return 0; + return 0; } -#endif 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 1047540..e17a6e9 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 #include #include -#include "test_macros.h" - -#if TEST_STD_VER >= 11 // #include // // template @@ -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 bc89c62..ad43194 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 #include -#include "test_macros.h" - -#if TEST_STD_VER >= 11 // #include // // template @@ -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 993b32f..0b25ac1 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 #include // for std::nullptr_t -#include "test_macros.h" -#if TEST_STD_VER > 11 template void test_nullptr_imp() { @@ -54,8 +54,3 @@ int main(int, char**) static_assert(!std::is_null_pointer::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 27f3d59..ede72c2 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 #include @@ -32,6 +30,3 @@ int main(int, char**) return 0; } -#else -int main(int, char**) { return 0; } -#endif