summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-11-18 00:05:25 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2015-11-18 00:05:25 +0000
commit9926d989f3e22082b6b3da129d1f724606010042 (patch)
tree048342e0f909605e129107e85e34fed3098ccbd9
parentAdd a template resource pool with limits and caching support. (diff)
downloadlibadhocutil-9926d989f3e22082b6b3da129d1f724606010042.tar.bz2
libadhocutil-9926d989f3e22082b6b3da129d1f724606010042.tar.xz
libadhocutil-9926d989f3e22082b6b3da129d1f724606010042.zip
Add missing test for semaphore inital value
-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;