diff options
author | Roger Ferrer Ibanez <roger.ferreribanez@arm.com> | 2016-11-01 15:00:16 +0000 |
---|---|---|
committer | Roger Ferrer Ibanez <roger.ferreribanez@arm.com> | 2016-11-01 15:00:16 +0000 |
commit | 60d6ef63a4e30bbba038d67849fa786314f670f6 (patch) | |
tree | 7a3fc11c8e3f9282fbf4a32283b12d81c222c0ac /libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/lock.pass.cpp | |
parent | 05ce4ca0dd8c43d86f3c5f9b4f55c9ce95ee5a73 (diff) | |
download | bcm5719-llvm-60d6ef63a4e30bbba038d67849fa786314f670f6.tar.gz bcm5719-llvm-60d6ef63a4e30bbba038d67849fa786314f670f6.zip |
Protect lock tests under libcpp-no-exceptions
Skip tests that expect an exception to be thrown.
Differential Revision: https://reviews.llvm.org/D26184
llvm-svn: 285695
Diffstat (limited to 'libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/lock.pass.cpp')
-rw-r--r-- | libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/lock.pass.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/lock.pass.cpp index 5c3513c98e0..25d78ab1902 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/lock.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/lock.pass.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// // -// XFAIL: libcpp-no-exceptions // UNSUPPORTED: libcpp-has-no-threads // UNSUPPORTED: c++98, c++03, c++11 @@ -54,6 +53,7 @@ void f() assert(lk.owns_lock() == true); ns d = t1 - t0 - WaitTime; assert(d < Tolerance); // within tolerance +#ifndef TEST_HAS_NO_EXCEPTIONS try { lk.lock(); @@ -63,8 +63,10 @@ void f() { assert(e.code().value() == EDEADLK); } +#endif lk.unlock(); lk.release(); +#ifndef TEST_HAS_NO_EXCEPTIONS try { lk.lock(); @@ -74,6 +76,7 @@ void f() { assert(e.code().value() == EPERM); } +#endif } int main() |