Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69108 - in sandbox/async/libs/tp: build test
From: vicente.botet_at_[hidden]
Date: 2011-02-20 18:18:11


Author: viboes
Date: 2011-02-20 18:18:10 EST (Sun, 20 Feb 2011)
New Revision: 69108
URL: http://svn.boost.org/trac/boost/changeset/69108

Log:
Async.TP: Use lightweight_test instead of Boost.Test
Text files modified:
   sandbox/async/libs/tp/build/Jamfile.v2 | 8 +++---
   sandbox/async/libs/tp/test/Jamfile.v2 | 16 ++++++------
   sandbox/async/libs/tp/test/test_bounded_queue_fifo.cpp | 50 ++++++++++++++++++++-------------------
   sandbox/async/libs/tp/test/test_bounded_queue_lifo.cpp | 37 ++++++++++++++---------------
   sandbox/async/libs/tp/test/test_bounded_queue_priority.cpp | 37 ++++++++++++++---------------
   sandbox/async/libs/tp/test/test_bounded_queue_smart.cpp | 38 ++++++++++++++----------------
   sandbox/async/libs/tp/test/test_functions.hpp | 7 ++---
   sandbox/async/libs/tp/test/test_unbounded_queue_fifo.cpp | 35 +++++++++++++--------------
   sandbox/async/libs/tp/test/test_unbounded_queue_lifo.cpp | 35 +++++++++++++--------------
   sandbox/async/libs/tp/test/test_unbounded_queue_priority.cpp | 36 ++++++++++++++--------------
   sandbox/async/libs/tp/test/test_unbounded_queue_smart.cpp | 35 +++++++++++++--------------
   11 files changed, 164 insertions(+), 170 deletions(-)

Modified: sandbox/async/libs/tp/build/Jamfile.v2
==============================================================================
--- sandbox/async/libs/tp/build/Jamfile.v2 (original)
+++ sandbox/async/libs/tp/build/Jamfile.v2 2011-02-20 18:18:10 EST (Sun, 20 Feb 2011)
@@ -10,8 +10,8 @@
 project boost/tp
     : source-location ../src
     : requirements
- <include>../../..
- <include>$(BOOST_ROOT)
+ #<include>../../..
+ #<include>$(BOOST_ROOT)
 
     : usage-requirements # pass these requirement to dependents (i.e. users)
       <link>shared:<define>BOOST_THREADPOOL_DYN_LINK=1
@@ -22,8 +22,8 @@
 
 static-lib boost_threadpool
    : $(SOURCES).cpp
- : #<link>shared:<define>BOOST_THREADPOOL_DYN_LINK=1
+ : <link>shared:<define>BOOST_THREADPOOL_DYN_LINK=1
      <link>static:<define>BOOST_THREADPOOL_STATIC_LINK=1
    ;
 
-#boost-install boost_threadpool ;
+boost-install boost_threadpool ;

Modified: sandbox/async/libs/tp/test/Jamfile.v2
==============================================================================
--- sandbox/async/libs/tp/test/Jamfile.v2 (original)
+++ sandbox/async/libs/tp/test/Jamfile.v2 2011-02-20 18:18:10 EST (Sun, 20 Feb 2011)
@@ -2,24 +2,24 @@
 
 # Copyright (C) 2008 Oliver Kowalke
 
-# Use, modification and distribution is subject to the Boost Software License,
-# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
+# Use, modification and distribution is subject to the Boost Software License,
+# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
 
 # bring in rules for testing
 import testing ;
 
 project
     : requirements
- <library>/boost/test//boost_unit_test_framework
          <library>/boost/thread//boost_thread
          <library>/boost/system//boost_system
          #<library>/boost/exception//boost_exception
- <library>../../tp/build//boost_threadpool
- <link>static
+ <library>/boost/tp//boost_threadpool
+ #<library>../../tp/build//boost_threadpool
+ #<link>static
          <threading>multi
- <include>../../..
- <include>$(BOOST_ROOT)
+ #<include>../../..
+ #<include>$(BOOST_ROOT)
     ;
 
 rule tp-test ( source )

Modified: sandbox/async/libs/tp/test/test_bounded_queue_fifo.cpp
==============================================================================
--- sandbox/async/libs/tp/test/test_bounded_queue_fifo.cpp (original)
+++ sandbox/async/libs/tp/test/test_bounded_queue_fifo.cpp 2011-02-20 18:18:10 EST (Sun, 20 Feb 2011)
@@ -1,5 +1,5 @@
-// Copyright (c) 2008 Oliver Kowalke.
-// Copyright (c) 2011 Vicente J. Botet Escriba.
+// Copyright (c) 2008 Oliver Kowalke.
+// Copyright (c) 2011 Vicente J. Botet Escriba.
 // Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -15,7 +15,6 @@
 #include <boost/function.hpp>
 #include <boost/thread/future.hpp>
 #include <boost/ref.hpp>
-#include <boost/test/unit_test.hpp>
 #include <boost/thread.hpp>
 #include <boost/thread/barrier.hpp>
 #include <boost/utility.hpp>
@@ -29,13 +28,15 @@
 #include <boost/tp/watermark.hpp>
 
 #include "test_functions.hpp"
+#include <boost/detail/lightweight_test.hpp>
+#define BOOST_CHECK_EQUAL(A,B) BOOST_TEST((A)==(B))
+#define BOOST_CHECK(A) BOOST_TEST(A)
 
 namespace pt = boost::posix_time;
 namespace tp = boost::tp;
 
-class fixed_bounded_channel_fifo
+namespace fixed_bounded_channel_fifo
 {
-public:
         // check size, active, idle
         void test_case_1()
         {
@@ -97,8 +98,11 @@
                         tp::low_watermark( 10) );
                 tp::task< void > t(
                         pool.submit(
- boost::bind(
- throwing_fn) ) );
+ boost::bind<void>(
+ throwing_fn
+ )
+ )
+ );
                 pool.shutdown();
                 bool thrown( false);
                 try
@@ -226,12 +230,12 @@
                                 boost::ref( b) ) );
                 std::vector< int > buffer;
                 pool.submit(
- boost::bind(
+ boost::bind<void>(
                                 buffer_fibonacci_fn,
                                 boost::ref( buffer),
                                 10) );
                 pool.submit(
- boost::bind(
+ boost::bind<void>(
                                 buffer_fibonacci_fn,
                                 boost::ref( buffer),
                                 0) );
@@ -265,12 +269,12 @@
                 std::vector< int > buffer;
                 tp::task< void > t(
                         pool.submit(
- boost::bind(
+ boost::bind<void>(
                                         buffer_fibonacci_fn,
                                         boost::ref( buffer),
                                         10) ) );
                 pool.submit(
- boost::bind(
+ boost::bind<void>(
                                 buffer_fibonacci_fn,
                                 boost::ref( buffer),
                                 0) );
@@ -290,21 +294,19 @@
         }
 };
 
-boost::unit_test::test_suite * init_unit_test_suite( int, char* [])
+int main()
 {
- boost::unit_test::test_suite * test( BOOST_TEST_SUITE("Boost.ThreadPool: fixed bounded_channel< fifo > pool test suite") );
 
- boost::shared_ptr< fixed_bounded_channel_fifo > instance( new fixed_bounded_channel_fifo() );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_fifo::test_case_1, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_fifo::test_case_2, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_fifo::test_case_3, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_fifo::test_case_4, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_fifo::test_case_5, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_fifo::test_case_6, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_fifo::test_case_7, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_fifo::test_case_8, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_fifo::test_case_9, instance) );
+ fixed_bounded_channel_fifo::test_case_1();
+ fixed_bounded_channel_fifo::test_case_2();
+ fixed_bounded_channel_fifo::test_case_3();
+ fixed_bounded_channel_fifo::test_case_4();
+ fixed_bounded_channel_fifo::test_case_5();
+ fixed_bounded_channel_fifo::test_case_6();
+ fixed_bounded_channel_fifo::test_case_7();
+ fixed_bounded_channel_fifo::test_case_8();
+ fixed_bounded_channel_fifo::test_case_9();
 
- return test;
+ return boost::report_errors();
 }
 

Modified: sandbox/async/libs/tp/test/test_bounded_queue_lifo.cpp
==============================================================================
--- sandbox/async/libs/tp/test/test_bounded_queue_lifo.cpp (original)
+++ sandbox/async/libs/tp/test/test_bounded_queue_lifo.cpp 2011-02-20 18:18:10 EST (Sun, 20 Feb 2011)
@@ -1,5 +1,5 @@
-// Copyright (c) 2008 Oliver Kowalke.
-// Copyright (c) 2011 Vicente J. Botet Escriba.
+// Copyright (c) 2008 Oliver Kowalke.
+// Copyright (c) 2011 Vicente J. Botet Escriba.
 // Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -15,7 +15,6 @@
 #include <boost/function.hpp>
 #include <boost/thread/future.hpp>
 #include <boost/ref.hpp>
-#include <boost/test/unit_test.hpp>
 #include <boost/thread.hpp>
 #include <boost/thread/barrier.hpp>
 #include <boost/utility.hpp>
@@ -29,13 +28,15 @@
 #include <boost/tp/watermark.hpp>
 
 #include "test_functions.hpp"
+#include <boost/detail/lightweight_test.hpp>
+#define BOOST_CHECK_EQUAL(A,B) BOOST_TEST((A)==(B))
+#define BOOST_CHECK(A) BOOST_TEST(A)
 
 namespace pt = boost::posix_time;
 namespace tp = boost::tp;
 
-class fixed_bounded_channel_lifo
+namespace fixed_bounded_channel_lifo
 {
-public:
         // check size, active, idle
         void test_case_1()
         {
@@ -278,7 +279,7 @@
                 b.wait();
                 pool.shutdown();
                 BOOST_CHECK_EQUAL( buffer[0], 0);
- // BUG BOOST_CHECK_EQUAL( buffer.size(), std::size_t( 1) );
+ BOOST_CHECK_EQUAL( buffer.size(), std::size_t( 1) );
                 bool thrown( false);
                 try
                 { t.result().get(); }
@@ -290,21 +291,19 @@
         }
 };
 
-boost::unit_test::test_suite * init_unit_test_suite( int, char* [])
+int main()
 {
- boost::unit_test::test_suite * test( BOOST_TEST_SUITE("Boost.ThreadPool: fixed bounded_channel< lifo > pool test suite") );
 
- boost::shared_ptr< fixed_bounded_channel_lifo > instance( new fixed_bounded_channel_lifo() );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_lifo::test_case_1, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_lifo::test_case_2, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_lifo::test_case_3, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_lifo::test_case_4, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_lifo::test_case_5, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_lifo::test_case_6, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_lifo::test_case_7, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_lifo::test_case_8, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_lifo::test_case_9, instance) );
+ fixed_bounded_channel_lifo::test_case_1();
+ fixed_bounded_channel_lifo::test_case_2();
+ fixed_bounded_channel_lifo::test_case_3();
+ fixed_bounded_channel_lifo::test_case_4();
+ fixed_bounded_channel_lifo::test_case_5();
+ fixed_bounded_channel_lifo::test_case_6();
+ fixed_bounded_channel_lifo::test_case_7();
+ fixed_bounded_channel_lifo::test_case_8();
+ fixed_bounded_channel_lifo::test_case_9();
 
- return test;
+ return boost::report_errors();
 }
 

Modified: sandbox/async/libs/tp/test/test_bounded_queue_priority.cpp
==============================================================================
--- sandbox/async/libs/tp/test/test_bounded_queue_priority.cpp (original)
+++ sandbox/async/libs/tp/test/test_bounded_queue_priority.cpp 2011-02-20 18:18:10 EST (Sun, 20 Feb 2011)
@@ -1,5 +1,5 @@
-// Copyright (c) 2008 Oliver Kowalke.
-// Copyright (c) 2011 Vicente J. Botet Escriba.
+// Copyright (c) 2008 Oliver Kowalke.
+// Copyright (c) 2011 Vicente J. Botet Escriba.
 // Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -15,7 +15,6 @@
 #include <boost/function.hpp>
 #include <boost/thread/future.hpp>
 #include <boost/ref.hpp>
-#include <boost/test/unit_test.hpp>
 #include <boost/thread.hpp>
 #include <boost/thread/barrier.hpp>
 #include <boost/utility.hpp>
@@ -30,12 +29,15 @@
 
 #include "test_functions.hpp"
 
+#include <boost/detail/lightweight_test.hpp>
+#define BOOST_CHECK_EQUAL(A,B) BOOST_TEST((A)==(B))
+#define BOOST_CHECK(A) BOOST_TEST(A)
+
 namespace pt = boost::posix_time;
 namespace tp = boost::tp;
 
-class fixed_bounded_channel_priority
+namespace fixed_bounded_channel_priority
 {
-public:
         // check size, active, idle
         void test_case_1()
         {
@@ -304,21 +306,18 @@
         }
 };
 
-boost::unit_test::test_suite * init_unit_test_suite( int, char* [])
+int main()
 {
- boost::unit_test::test_suite * test( BOOST_TEST_SUITE("Boost.ThreadPool: fixed bounded_channel< priority< int > > pool test suite") );
-
- boost::shared_ptr< fixed_bounded_channel_priority > instance( new fixed_bounded_channel_priority() );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_priority::test_case_1, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_priority::test_case_2, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_priority::test_case_3, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_priority::test_case_4, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_priority::test_case_5, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_priority::test_case_6, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_priority::test_case_7, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_priority::test_case_8, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_priority::test_case_9, instance) );
+ fixed_bounded_channel_priority::test_case_1();
+ fixed_bounded_channel_priority::test_case_2();
+ fixed_bounded_channel_priority::test_case_3();
+ fixed_bounded_channel_priority::test_case_4();
+ fixed_bounded_channel_priority::test_case_5();
+ fixed_bounded_channel_priority::test_case_6();
+ fixed_bounded_channel_priority::test_case_7();
+ fixed_bounded_channel_priority::test_case_8();
+ fixed_bounded_channel_priority::test_case_9();
 
- return test;
+ return boost::report_errors();
 }
 

Modified: sandbox/async/libs/tp/test/test_bounded_queue_smart.cpp
==============================================================================
--- sandbox/async/libs/tp/test/test_bounded_queue_smart.cpp (original)
+++ sandbox/async/libs/tp/test/test_bounded_queue_smart.cpp 2011-02-20 18:18:10 EST (Sun, 20 Feb 2011)
@@ -1,5 +1,5 @@
-// Copyright (c) 2008 Oliver Kowalke.
-// Copyright (c) 2011 Vicente J. Botet Escriba.
+// Copyright (c) 2008 Oliver Kowalke.
+// Copyright (c) 2011 Vicente J. Botet Escriba.
 // Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -15,7 +15,6 @@
 #include <boost/function.hpp>
 #include <boost/thread/future.hpp>
 #include <boost/ref.hpp>
-#include <boost/test/unit_test.hpp>
 #include <boost/thread.hpp>
 #include <boost/thread/barrier.hpp>
 #include <boost/utility.hpp>
@@ -30,12 +29,15 @@
 
 #include "test_functions.hpp"
 
+#include <boost/detail/lightweight_test.hpp>
+#define BOOST_CHECK_EQUAL(A,B) BOOST_TEST((A)==(B))
+#define BOOST_CHECK(A) BOOST_TEST(A)
+
 namespace pt = boost::posix_time;
 namespace tp = boost::tp;
 
-class fixed_bounded_channel_smart
+namespace fixed_bounded_channel_smart
 {
-public:
         // check size, active, idle
         void test_case_1()
         {
@@ -310,21 +312,17 @@
         }
 };
 
-boost::unit_test::test_suite * init_unit_test_suite( int, char* [])
-{
- boost::unit_test::test_suite * test( BOOST_TEST_SUITE("Boost.ThreadPool: fixed bounded_channel< smart< int > > pool test suite") );
-
- boost::shared_ptr< fixed_bounded_channel_smart > instance( new fixed_bounded_channel_smart() );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_smart::test_case_1, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_smart::test_case_2, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_smart::test_case_3, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_smart::test_case_4, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_smart::test_case_5, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_smart::test_case_6, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_smart::test_case_7, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_smart::test_case_8, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_bounded_channel_smart::test_case_9, instance) );
+int main(){
+ fixed_bounded_channel_smart::test_case_1();
+ fixed_bounded_channel_smart::test_case_2();
+ fixed_bounded_channel_smart::test_case_3();
+ fixed_bounded_channel_smart::test_case_4();
+ fixed_bounded_channel_smart::test_case_5();
+ fixed_bounded_channel_smart::test_case_6();
+ fixed_bounded_channel_smart::test_case_7();
+ fixed_bounded_channel_smart::test_case_8();
+ fixed_bounded_channel_smart::test_case_9();
 
- return test;
+ return boost::report_errors();
 }
 

Modified: sandbox/async/libs/tp/test/test_functions.hpp
==============================================================================
--- sandbox/async/libs/tp/test/test_functions.hpp (original)
+++ sandbox/async/libs/tp/test/test_functions.hpp 2011-02-20 18:18:10 EST (Sun, 20 Feb 2011)
@@ -1,5 +1,5 @@
-// Copyright (c) 2008 Oliver Kowalke.
-// Copyright (c) 2011 Vicente J. Botet Escriba.
+// Copyright (c) 2008 Oliver Kowalke.
+// Copyright (c) 2011 Vicente J. Botet Escriba.
 // Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -17,8 +17,7 @@
 #include <boost/date_time/posix_time/posix_time.hpp>
 #include <boost/function.hpp>
 #include <boost/thread/future.hpp>
-#include <boost/test/unit_test.hpp>
-#include <boost/test/auto_unit_test.hpp>
+#include <boost/detail/lightweight_test.hpp>
 #include <boost/thread.hpp>
 #include <boost/thread/barrier.hpp>
 #include <boost/utility.hpp>

Modified: sandbox/async/libs/tp/test/test_unbounded_queue_fifo.cpp
==============================================================================
--- sandbox/async/libs/tp/test/test_unbounded_queue_fifo.cpp (original)
+++ sandbox/async/libs/tp/test/test_unbounded_queue_fifo.cpp 2011-02-20 18:18:10 EST (Sun, 20 Feb 2011)
@@ -1,5 +1,5 @@
-// Copyright (c) 2008 Oliver Kowalke.
-// Copyright (c) 2011 Vicente J. Botet Escriba.
+// Copyright (c) 2008 Oliver Kowalke.
+// Copyright (c) 2011 Vicente J. Botet Escriba.
 // Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -15,7 +15,6 @@
 #include <boost/function.hpp>
 #include <boost/thread/future.hpp>
 #include <boost/ref.hpp>
-#include <boost/test/unit_test.hpp>
 #include <boost/thread.hpp>
 #include <boost/thread/barrier.hpp>
 #include <boost/utility.hpp>
@@ -28,13 +27,15 @@
 #include <boost/tp/task.hpp>
 
 #include "test_functions.hpp"
+#include <boost/detail/lightweight_test.hpp>
+#define BOOST_CHECK_EQUAL(A,B) BOOST_TEST((A)==(B))
+#define BOOST_CHECK(A) BOOST_TEST(A)
 
 namespace pt = boost::posix_time;
 namespace tp = boost::tp;
 
-class fixed_unbounded_channel_fifo
+namespace fixed_unbounded_channel_fifo
 {
-public:
         // check size, active, idle
         void test_case_1()
         {
@@ -262,20 +263,18 @@
         }
 };
 
-boost::unit_test::test_suite * init_unit_test_suite( int, char* [])
+int main()
 {
- boost::unit_test::test_suite * test( BOOST_TEST_SUITE("Boost.ThreadPool: fixed unbounded_channel< fifo > pool test suite") );
 
- boost::shared_ptr< fixed_unbounded_channel_fifo > instance( new fixed_unbounded_channel_fifo() );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_fifo::test_case_1, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_fifo::test_case_2, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_fifo::test_case_3, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_fifo::test_case_4, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_fifo::test_case_5, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_fifo::test_case_6, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_fifo::test_case_7, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_fifo::test_case_8, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_fifo::test_case_9, instance) );
+ fixed_unbounded_channel_fifo::test_case_1();
+ fixed_unbounded_channel_fifo::test_case_2();
+ fixed_unbounded_channel_fifo::test_case_3();
+ fixed_unbounded_channel_fifo::test_case_4();
+ fixed_unbounded_channel_fifo::test_case_5();
+ fixed_unbounded_channel_fifo::test_case_6();
+ fixed_unbounded_channel_fifo::test_case_7();
+ fixed_unbounded_channel_fifo::test_case_8();
+ fixed_unbounded_channel_fifo::test_case_9();
 
- return test;
+ return boost::report_errors();
 }

Modified: sandbox/async/libs/tp/test/test_unbounded_queue_lifo.cpp
==============================================================================
--- sandbox/async/libs/tp/test/test_unbounded_queue_lifo.cpp (original)
+++ sandbox/async/libs/tp/test/test_unbounded_queue_lifo.cpp 2011-02-20 18:18:10 EST (Sun, 20 Feb 2011)
@@ -1,5 +1,5 @@
-// Copyright (c) 2008 Oliver Kowalke.
-// Copyright (c) 2011 Vicente J. Botet Escriba.
+// Copyright (c) 2008 Oliver Kowalke.
+// Copyright (c) 2011 Vicente J. Botet Escriba.
 // Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -15,7 +15,6 @@
 #include <boost/function.hpp>
 #include <boost/thread/future.hpp>
 #include <boost/ref.hpp>
-#include <boost/test/unit_test.hpp>
 #include <boost/thread.hpp>
 #include <boost/thread/barrier.hpp>
 #include <boost/utility.hpp>
@@ -28,13 +27,15 @@
 #include <boost/tp/task.hpp>
 
 #include "test_functions.hpp"
+#include <boost/detail/lightweight_test.hpp>
+#define BOOST_CHECK_EQUAL(A,B) BOOST_TEST((A)==(B))
+#define BOOST_CHECK(A) BOOST_TEST(A)
 
 namespace pt = boost::posix_time;
 namespace tp = boost::tp;
 
-class fixed_unbounded_channel_lifo
+namespace fixed_unbounded_channel_lifo
 {
-public:
         // check size, active, idle
         void test_case_1()
         {
@@ -262,20 +263,18 @@
         }
 };
 
-boost::unit_test::test_suite * init_unit_test_suite( int, char* [])
+int main()
 {
- boost::unit_test::test_suite * test( BOOST_TEST_SUITE("Boost.ThreadPool: fixed unbounded_channel< lifo > pool test suite") );
 
- boost::shared_ptr< fixed_unbounded_channel_lifo > instance( new fixed_unbounded_channel_lifo() );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_lifo::test_case_1, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_lifo::test_case_2, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_lifo::test_case_3, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_lifo::test_case_4, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_lifo::test_case_5, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_lifo::test_case_6, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_lifo::test_case_7, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_lifo::test_case_8, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_lifo::test_case_9, instance) );
+ fixed_unbounded_channel_lifo::test_case_1();
+ fixed_unbounded_channel_lifo::test_case_2();
+ fixed_unbounded_channel_lifo::test_case_3();
+ fixed_unbounded_channel_lifo::test_case_4();
+ fixed_unbounded_channel_lifo::test_case_5();
+ fixed_unbounded_channel_lifo::test_case_6();
+ fixed_unbounded_channel_lifo::test_case_7();
+ fixed_unbounded_channel_lifo::test_case_8();
+ fixed_unbounded_channel_lifo::test_case_9();
 
- return test;
+ return boost::report_errors();
 }

Modified: sandbox/async/libs/tp/test/test_unbounded_queue_priority.cpp
==============================================================================
--- sandbox/async/libs/tp/test/test_unbounded_queue_priority.cpp (original)
+++ sandbox/async/libs/tp/test/test_unbounded_queue_priority.cpp 2011-02-20 18:18:10 EST (Sun, 20 Feb 2011)
@@ -1,5 +1,5 @@
-// Copyright (c) 2008 Oliver Kowalke.
-// Copyright (c) 2011 Vicente J. Botet Escriba.
+// Copyright (c) 2008 Oliver Kowalke.
+// Copyright (c) 2011 Vicente J. Botet Escriba.
 // Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -15,7 +15,6 @@
 #include <boost/function.hpp>
 #include <boost/thread/future.hpp>
 #include <boost/ref.hpp>
-#include <boost/test/unit_test.hpp>
 #include <boost/thread.hpp>
 #include <boost/thread/barrier.hpp>
 #include <boost/utility.hpp>
@@ -29,12 +28,15 @@
 
 #include "test_functions.hpp"
 
+#include <boost/detail/lightweight_test.hpp>
+#define BOOST_CHECK_EQUAL(A,B) BOOST_TEST((A)==(B))
+#define BOOST_CHECK(A) BOOST_TEST(A)
+
 namespace pt = boost::posix_time;
 namespace tp = boost::tp;
 
-class fixed_unbounded_channel_priority
+namespace fixed_unbounded_channel_priority
 {
-public:
         // check size, active, idle
         void test_case_1()
         {
@@ -276,21 +278,19 @@
         }
 };
 
-boost::unit_test::test_suite * init_unit_test_suite( int, char* [])
+int main()
 {
- boost::unit_test::test_suite * test( BOOST_TEST_SUITE("Boost.ThreadPool: fixed unbounded_channel< priority< int > > pool test suite") );
 
- boost::shared_ptr< fixed_unbounded_channel_priority > instance( new fixed_unbounded_channel_priority() );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_priority::test_case_1, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_priority::test_case_2, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_priority::test_case_3, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_priority::test_case_4, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_priority::test_case_5, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_priority::test_case_6, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_priority::test_case_7, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_priority::test_case_8, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_priority::test_case_9, instance) );
+ fixed_unbounded_channel_priority::test_case_1();
+ fixed_unbounded_channel_priority::test_case_2();
+ fixed_unbounded_channel_priority::test_case_3();
+ fixed_unbounded_channel_priority::test_case_4();
+ fixed_unbounded_channel_priority::test_case_5();
+ fixed_unbounded_channel_priority::test_case_6();
+ fixed_unbounded_channel_priority::test_case_7();
+ fixed_unbounded_channel_priority::test_case_8();
+ fixed_unbounded_channel_priority::test_case_9();
 
- return test;
+ return boost::report_errors();
 }
 

Modified: sandbox/async/libs/tp/test/test_unbounded_queue_smart.cpp
==============================================================================
--- sandbox/async/libs/tp/test/test_unbounded_queue_smart.cpp (original)
+++ sandbox/async/libs/tp/test/test_unbounded_queue_smart.cpp 2011-02-20 18:18:10 EST (Sun, 20 Feb 2011)
@@ -1,5 +1,5 @@
-// Copyright (c) 2008 Oliver Kowalke.
-// Copyright (c) 2011 Vicente J. Botet Escriba.
+// Copyright (c) 2008 Oliver Kowalke.
+// Copyright (c) 2011 Vicente J. Botet Escriba.
 // Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -15,7 +15,6 @@
 #include <boost/function.hpp>
 #include <boost/thread/future.hpp>
 #include <boost/ref.hpp>
-#include <boost/test/unit_test.hpp>
 #include <boost/thread.hpp>
 #include <boost/thread/barrier.hpp>
 #include <boost/utility.hpp>
@@ -28,13 +27,15 @@
 #include <boost/tp/task.hpp>
 
 #include "test_functions.hpp"
+#include <boost/detail/lightweight_test.hpp>
+#define BOOST_CHECK_EQUAL(A,B) BOOST_TEST((A)==(B))
+#define BOOST_CHECK(A) BOOST_TEST(A)
 
 namespace pt = boost::posix_time;
 namespace tp = boost::tp;
 
-class fixed_unbounded_channel_smart
+namespace fixed_unbounded_channel_smart
 {
-public:
         // check size, active, idle
         void test_case_1()
         {
@@ -282,21 +283,19 @@
         }
 };
 
-boost::unit_test::test_suite * init_unit_test_suite( int, char* [])
+int main()
 {
- boost::unit_test::test_suite * test( BOOST_TEST_SUITE("Boost.ThreadPool: fixed unbounded_channel< smart< int > > pool test suite") );
 
- boost::shared_ptr< fixed_unbounded_channel_smart > instance( new fixed_unbounded_channel_smart() );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_smart::test_case_1, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_smart::test_case_2, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_smart::test_case_3, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_smart::test_case_4, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_smart::test_case_5, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_smart::test_case_6, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_smart::test_case_7, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_smart::test_case_8, instance) );
- test->add( BOOST_CLASS_TEST_CASE( & fixed_unbounded_channel_smart::test_case_9, instance) );
+ fixed_unbounded_channel_smart::test_case_1();
+ fixed_unbounded_channel_smart::test_case_2();
+ fixed_unbounded_channel_smart::test_case_3();
+ fixed_unbounded_channel_smart::test_case_4();
+ fixed_unbounded_channel_smart::test_case_5();
+ fixed_unbounded_channel_smart::test_case_6();
+ fixed_unbounded_channel_smart::test_case_7();
+ fixed_unbounded_channel_smart::test_case_8();
+ fixed_unbounded_channel_smart::test_case_9();
 
- return test;
+ return boost::report_errors();
 }
 


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