diff options
author | Asiri Rathnayake <asiri.rathnayake@arm.com> | 2016-05-28 08:57:35 +0000 |
---|---|---|
committer | Asiri Rathnayake <asiri.rathnayake@arm.com> | 2016-05-28 08:57:35 +0000 |
commit | 6edc12c8867fe8d21f9abf97b160d12dc2fa3954 (patch) | |
tree | b05c2b476059d6ecf37ebee52db35c369cd0a74d /libcxx/test/std/thread | |
parent | 6abd38bf6efc809654fcdf6c98d4378fcc4a040b (diff) | |
download | bcm5719-llvm-6edc12c8867fe8d21f9abf97b160d12dc2fa3954.tar.gz bcm5719-llvm-6edc12c8867fe8d21f9abf97b160d12dc2fa3954.zip |
[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
Diffstat (limited to 'libcxx/test/std/thread')
5 files changed, 5 insertions, 24 deletions
diff --git a/libcxx/test/std/thread/futures/futures.promise/set_rvalue.pass.cpp b/libcxx/test/std/thread/futures/futures.promise/set_rvalue.pass.cpp index 9cce3f59550..e0c6e15d98d 100644 --- a/libcxx/test/std/thread/futures/futures.promise/set_rvalue.pass.cpp +++ b/libcxx/test/std/thread/futures/futures.promise/set_rvalue.pass.cpp @@ -7,8 +7,7 @@ // //===----------------------------------------------------------------------===// // -// XFAIL: libcpp-no-exceptions -// UNSUPPORTED: libcpp-has-no-threads +// UNSUPPORTED: libcpp-has-no-threads, libcpp-no-exceptions // <future> diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_assign.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_assign.fail.cpp index 446807f3f33..79f43e860ca 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_assign.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_assign.fail.cpp @@ -7,6 +7,7 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11 // <shared_mutex> // template <class Mutex> class shared_lock; @@ -15,20 +16,12 @@ #include <shared_mutex> -#if _LIBCPP_STD_VER > 11 - std::shared_timed_mutex m0; std::shared_timed_mutex m1; -#endif // _LIBCPP_STD_VER > 11 - int main() { -#if _LIBCPP_STD_VER > 11 std::shared_lock<std::shared_timed_mutex> lk0(m0); std::shared_lock<std::shared_timed_mutex> lk1(m1); lk1 = lk0; -#else -# error -#endif // _LIBCPP_STD_VER > 11 } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_ctor.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_ctor.fail.cpp index 370c1fa4e33..d6bf57947af 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_ctor.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/copy_ctor.fail.cpp @@ -7,6 +7,7 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11 // <shared_mutex> // template <class Mutex> class shared_lock; @@ -15,16 +16,10 @@ #include <shared_mutex> -#if _LIBCPP_STD_VER > 11 std::shared_timed_mutex m; -#endif // _LIBCPP_STD_VER > 11 int main() { -#if _LIBCPP_STD_VER > 11 std::shared_lock<std::shared_timed_mutex> lk0(m); std::shared_lock<std::shared_timed_mutex> lk = lk0; -#else -# error -#endif // _LIBCPP_STD_VER > 11 } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/assign.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/assign.fail.cpp index 528aaca6d9e..0c5bfa804be 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/assign.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/assign.fail.cpp @@ -7,6 +7,7 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11 // <shared_mutex> // class shared_timed_mutex; @@ -17,11 +18,7 @@ int main() { -#if _LIBCPP_STD_VER > 11 std::shared_timed_mutex m0; std::shared_timed_mutex m1; m1 = m0; -#else -# error -#endif } diff --git a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/copy.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/copy.fail.cpp index dbf01002e69..3656ec62ec1 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/copy.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/copy.fail.cpp @@ -7,6 +7,7 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11 // <shared_mutex> // class shared_timed_mutex; @@ -17,10 +18,6 @@ int main() { -#if _LIBCPP_STD_VER > 11 std::shared_timed_mutex m0; std::shared_timed_mutex m1(m0); -#else -# error -#endif } |