diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-11-18 00:05:25 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-11-18 00:05:25 +0000 |
commit | 9926d989f3e22082b6b3da129d1f724606010042 (patch) | |
tree | 048342e0f909605e129107e85e34fed3098ccbd9 | |
parent | Add a template resource pool with limits and caching support. (diff) | |
download | libadhocutil-9926d989f3e22082b6b3da129d1f724606010042.tar.bz2 libadhocutil-9926d989f3e22082b6b3da129d1f724606010042.tar.xz libadhocutil-9926d989f3e22082b6b3da129d1f724606010042.zip |
Add missing test for semaphore inital value
-rw-r--r-- | libadhocutil/unittests/testSemaphore.cpp | 8 |
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; |