diff options
| author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-01 12:34:10 +0000 |
|---|---|---|
| committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-01 12:34:10 +0000 |
| commit | b14c3ddd1b8749827e97a72b0ccb84fc2d5edc15 (patch) | |
| tree | b8846cfc9da39aa7cfa941ad8b2fa2da3db5a631 /libstdc++-v3/testsuite | |
| parent | 9b574f1ece055ed1ad5ba32bc9ce570e9d9e2b29 (diff) | |
| download | ppe42-gcc-b14c3ddd1b8749827e97a72b0ccb84fc2d5edc15.tar.gz ppe42-gcc-b14c3ddd1b8749827e97a72b0ccb84fc2d5edc15.zip | |
* include/std/mutex (try_lock): Do not swallow exceptions.
* testsuite/30_threads/try_lock/4.cc: Fix test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@215755 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite')
| -rw-r--r-- | libstdc++-v3/testsuite/30_threads/try_lock/4.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libstdc++-v3/testsuite/30_threads/try_lock/4.cc b/libstdc++-v3/testsuite/30_threads/try_lock/4.cc index de9b69eef9e..86fe14e29a1 100644 --- a/libstdc++-v3/testsuite/30_threads/try_lock/4.cc +++ b/libstdc++-v3/testsuite/30_threads/try_lock/4.cc @@ -133,8 +133,15 @@ void test03() while (unreliable_lock::throw_on < 3) { unreliable_lock::count = 0; - int failed = std::try_lock(l1, l2, l3); - VERIFY( failed == unreliable_lock::throw_on ); + try + { + std::try_lock(l1, l2, l3); + VERIFY( false ); + } + catch (int e) + { + VERIFY( e == unreliable_lock::throw_on ); + } ++unreliable_lock::throw_on; } } |

