Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50576 - sandbox/thread_safe_signals/trunk/libs/signals2/test
From: fmhess_at_[hidden]
Date: 2009-01-14 11:46:42


Author: fmhess
Date: 2009-01-14 11:46:41 EST (Wed, 14 Jan 2009)
New Revision: 50576
URL: http://svn.boost.org/trac/boost/changeset/50576

Log:
Added test for boost::signals2::dummy_mutex.

Text files modified:
   sandbox/thread_safe_signals/trunk/libs/signals2/test/mutex_test.cpp | 13 +++++++++++++
   1 files changed, 13 insertions(+), 0 deletions(-)

Modified: sandbox/thread_safe_signals/trunk/libs/signals2/test/mutex_test.cpp
==============================================================================
--- sandbox/thread_safe_signals/trunk/libs/signals2/test/mutex_test.cpp (original)
+++ sandbox/thread_safe_signals/trunk/libs/signals2/test/mutex_test.cpp 2009-01-14 11:46:41 EST (Wed, 14 Jan 2009)
@@ -12,6 +12,7 @@
 // added to test boost::signals2::mutex.
 // For more information, see http://www.boost.org
 
+#include <boost/signals2/dummy_mutex.hpp>
 #include <boost/signals2/mutex.hpp>
 #include <boost/test/minimal.hpp>
 #include <boost/thread/locks.hpp>
@@ -276,9 +277,21 @@
     timed_test(&do_test_mutex, 3);
 }
 
+void do_test_dummy_mutex()
+{
+ test_lock<boost::signals2::dummy_mutex>()();
+ test_trylock<boost::signals2::dummy_mutex>()();
+}
+
+void test_dummy_mutex()
+{
+ timed_test(&do_test_dummy_mutex, 2);
+}
+
 int test_main(int, char*[])
 {
     test_mutex();
+ test_dummy_mutex();
 
     return 0;
 }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk