Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54056 - sandbox/task/libs/task/test
From: oliver.kowalke_at_[hidden]
Date: 2009-06-18 12:08:48


Author: olli
Date: 2009-06-18 12:08:47 EDT (Thu, 18 Jun 2009)
New Revision: 54056
URL: http://svn.boost.org/trac/boost/changeset/54056

Log:
tests for pools check if moved pool is usable
Text files modified:
   sandbox/task/libs/task/test/test_bounded_pool.cpp | 8 ++++++++
   sandbox/task/libs/task/test/test_unbounded_pool.cpp | 8 ++++++++
   2 files changed, 16 insertions(+), 0 deletions(-)

Modified: sandbox/task/libs/task/test/test_bounded_pool.cpp
==============================================================================
--- sandbox/task/libs/task/test/test_bounded_pool.cpp (original)
+++ sandbox/task/libs/task/test/test_bounded_pool.cpp 2009-06-18 12:08:47 EDT (Thu, 18 Jun 2009)
@@ -67,6 +67,14 @@
                 BOOST_CHECK_EQUAL( pool2.active(), std::size_t( 0) );
                 BOOST_CHECK_EQUAL( pool2.upper_bound(), std::size_t( 10) );
                 BOOST_CHECK_EQUAL( pool2.lower_bound(), std::size_t( 5) );
+
+ tsk::task< int > t(
+ boost::bind(
+ fibonacci_fn,
+ 10) );
+ tsk::handle< int > h(
+ tsk::async( boost::move( t), pool2) );
+ BOOST_CHECK_EQUAL( h.get(), 55);
         }
 
         // check submit

Modified: sandbox/task/libs/task/test/test_unbounded_pool.cpp
==============================================================================
--- sandbox/task/libs/task/test/test_unbounded_pool.cpp (original)
+++ sandbox/task/libs/task/test/test_unbounded_pool.cpp 2009-06-18 12:08:47 EDT (Thu, 18 Jun 2009)
@@ -56,6 +56,14 @@
                 BOOST_CHECK_EQUAL( pool2.size(), std::size_t( 3) );
                 BOOST_CHECK_EQUAL( pool2.idle(), std::size_t( 3) );
                 BOOST_CHECK_EQUAL( pool2.active(), std::size_t( 0) );
+
+ tsk::task< int > t(
+ boost::bind(
+ fibonacci_fn,
+ 10) );
+ tsk::handle< int > h(
+ tsk::async( boost::move( t), pool2) );
+ BOOST_CHECK_EQUAL( h.get(), 55);
         }
 
         // check submit


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