summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/test/IceUtil/thread/RWRecMutexTest.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/cpp/test/IceUtil/thread/RWRecMutexTest.cpp b/cpp/test/IceUtil/thread/RWRecMutexTest.cpp
index 09fff54b7db..b8d1d3b8886 100644
--- a/cpp/test/IceUtil/thread/RWRecMutexTest.cpp
+++ b/cpp/test/IceUtil/thread/RWRecMutexTest.cpp
@@ -306,6 +306,16 @@ RWRecMutexTest::run()
{
// Expected
}
+
+ try
+ {
+ RWRecMutex::TryWLock wlock(mutex, 10);
+ test(false);
+ }
+ catch(const LockedException&)
+ {
+ // Expected
+ }
}
// TEST: TryLock (write)
@@ -324,6 +334,15 @@ RWRecMutexTest::run()
}
try
{
+ RWRecMutex::TryRLock rlock(mutex, 10);
+ test(false);
+ }
+ catch(const LockedException&)
+ {
+ // Expected
+ }
+ try
+ {
RWRecMutex::TryWLock wlock(mutex);
// Expected
}
@@ -331,6 +350,15 @@ RWRecMutexTest::run()
{
test(false);
}
+ try
+ {
+ RWRecMutex::TryWLock wlock(mutex, 10);
+ // Expected
+ }
+ catch(const LockedException&)
+ {
+ test(false);
+ }
}
// TEST: read lock