diff options
Diffstat (limited to 'libs/thread/test/test_thread_move.cpp')
-rw-r--r-- | libs/thread/test/test_thread_move.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/libs/thread/test/test_thread_move.cpp b/libs/thread/test/test_thread_move.cpp index fe01b62fd..e86db8cad 100644 --- a/libs/thread/test/test_thread_move.cpp +++ b/libs/thread/test/test_thread_move.cpp @@ -2,6 +2,9 @@ // // 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) + +#define BOOST_TEST_MODULE Boost.Threads: thread move test suite + #include <boost/thread/thread_only.hpp> #include <boost/test/unit_test.hpp> @@ -10,7 +13,7 @@ void do_nothing(boost::thread::id* my_id) *my_id=boost::this_thread::get_id(); } -void test_move_on_construction() +BOOST_AUTO_TEST_CASE(test_move_on_construction) { boost::thread::id the_id; boost::thread x=boost::thread(do_nothing,&the_id); @@ -24,7 +27,7 @@ boost::thread make_thread(boost::thread::id* the_id) return boost::thread(do_nothing,the_id); } -void test_move_from_function_return() +BOOST_AUTO_TEST_CASE(test_move_from_function_return) { boost::thread::id the_id; boost::thread x=make_thread(&the_id); @@ -33,7 +36,7 @@ void test_move_from_function_return() BOOST_CHECK_EQUAL(the_id,x_id); } -void test_move_assign() +BOOST_AUTO_TEST_CASE(test_move_assign) { boost::thread::id the_id; boost::thread x(do_nothing,&the_id); @@ -44,15 +47,4 @@ void test_move_assign() BOOST_CHECK_EQUAL(the_id,y_id); } -boost::unit_test::test_suite* init_unit_test_suite(int, char*[]) -{ - boost::unit_test::test_suite* test = - BOOST_TEST_SUITE("Boost.Threads: thread move test suite"); - - test->add(BOOST_TEST_CASE(test_move_on_construction)); - test->add(BOOST_TEST_CASE(test_move_from_function_return)); - test->add(BOOST_TEST_CASE(test_move_assign)); - return test; -} - |