aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/libstdc++-v3/testsuite/30_threads/try_lock/4.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/libstdc++-v3/testsuite/30_threads/try_lock/4.cc')
-rw-r--r--gcc-4.9/libstdc++-v3/testsuite/30_threads/try_lock/4.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc-4.9/libstdc++-v3/testsuite/30_threads/try_lock/4.cc b/gcc-4.9/libstdc++-v3/testsuite/30_threads/try_lock/4.cc
index de9b69eef..86fe14e29 100644
--- a/gcc-4.9/libstdc++-v3/testsuite/30_threads/try_lock/4.cc
+++ b/gcc-4.9/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;
}
}