From 6edc12c8867fe8d21f9abf97b160d12dc2fa3954 Mon Sep 17 00:00:00 2001 From: Asiri Rathnayake Date: Sat, 28 May 2016 08:57:35 +0000 Subject: [libcxx] Improve tests to use the UNSUPPORTED lit directive Quite a few libcxx tests seem to follow the format: #if _LIBCPP_STD_VER > X // Do test. #else // Empty test. #endif We should instead use the UNSUPPORTED lit directive to exclude the test on earlier C++ standards. This gives us a more accurate number of test passes for those standards and avoids unnecessary conflicts with other lit directives on the same tests. Reviewers: bcraig, ericwf, mclow.lists Differential revision: http://reviews.llvm.org/D20730 llvm-svn: 271108 --- .../alloc.errors/new.badlength/bad_array_length.pass.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libcxx/test/std/language.support/support.dynamic/alloc.errors') diff --git a/libcxx/test/std/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp b/libcxx/test/std/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp index 7de50330455..cc99b83aca4 100644 --- a/libcxx/test/std/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp +++ b/libcxx/test/std/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp @@ -7,6 +7,7 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11 // test bad_array_length #include @@ -15,7 +16,6 @@ int main() { -#if __LIBCPP_STD_VER > 11 static_assert((std::is_base_of::value), "std::is_base_of::value"); static_assert(std::is_polymorphic::value, @@ -25,5 +25,4 @@ int main() b2 = b; const char* w = b2.what(); assert(w); -#endif } -- cgit v1.2.3