summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libadhocutil/unittests/testSemaphore.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libadhocutil/unittests/testSemaphore.cpp b/libadhocutil/unittests/testSemaphore.cpp
index b5e435e..bde73a1 100644
--- a/libadhocutil/unittests/testSemaphore.cpp
+++ b/libadhocutil/unittests/testSemaphore.cpp
@@ -11,6 +11,14 @@ BOOST_AUTO_TEST_CASE( addRemoveOne )
s.wait();
}
+BOOST_AUTO_TEST_CASE( initial )
+{
+ AdHoc::Semaphore s(2);
+ s.wait();
+ s.wait();
+ BOOST_REQUIRE_EQUAL(false, s.wait(0));
+}
+
BOOST_AUTO_TEST_CASE( addRemoveSome )
{
AdHoc::Semaphore s;