diff options
Diffstat (limited to 'test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/unlock.pass.cpp')
| -rw-r--r-- | test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/unlock.pass.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/unlock.pass.cpp b/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/unlock.pass.cpp index 6a7385ed42a6..903b53ace0f2 100644 --- a/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/unlock.pass.cpp +++ b/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/unlock.pass.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// // -// XFAIL: libcpp-no-exceptions // UNSUPPORTED: libcpp-has-no-threads // UNSUPPORTED: c++98, c++03, c++11 @@ -20,6 +19,8 @@ #include <shared_mutex> #include <cassert> +#include "test_macros.h" + bool unlock_called = false; struct mutex @@ -36,6 +37,7 @@ int main() lk.unlock(); assert(unlock_called == true); assert(lk.owns_lock() == false); +#ifndef TEST_HAS_NO_EXCEPTIONS try { lk.unlock(); @@ -45,7 +47,9 @@ int main() { assert(e.code().value() == EPERM); } +#endif lk.release(); +#ifndef TEST_HAS_NO_EXCEPTIONS try { lk.unlock(); @@ -55,4 +59,5 @@ int main() { assert(e.code().value() == EPERM); } +#endif } |
