|
Boost-Commit : |
From: anthony_at_[hidden]
Date: 2007-12-17 06:24:14
Author: anthonyw
Date: 2007-12-17 06:24:13 EST (Mon, 17 Dec 2007)
New Revision: 42117
URL: http://svn.boost.org/trac/boost/changeset/42117
Log:
Updated move function test to be fair to Borland
Text files modified:
trunk/libs/thread/test/test_move_function.cpp | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
Modified: trunk/libs/thread/test/test_move_function.cpp
==============================================================================
--- trunk/libs/thread/test/test_move_function.cpp (original)
+++ trunk/libs/thread/test/test_move_function.cpp 2007-12-17 06:24:13 EST (Mon, 17 Dec 2007)
@@ -12,21 +12,17 @@
{
boost::thread src(do_nothing);
boost::thread::id src_id=src.get_id();
- boost::thread dest=boost::move(src);
+ boost::thread dest(boost::move(src));
boost::thread::id dest_id=dest.get_id();
BOOST_CHECK(src_id==dest_id);
BOOST_CHECK(src.get_id()==boost::thread::id());
dest.join();
}
-boost::thread make_thread()
+void test_thread_move_from_rvalue()
{
- return boost::thread(do_nothing);
-}
-
-void test_thread_move_from_function_return()
-{
- boost::thread x=boost::move(make_thread());
+ boost::thread x(boost::move(boost::thread(do_nothing)));
+ BOOST_CHECK(x.get_id()!=boost::thread::id());
x.join();
}
@@ -37,6 +33,6 @@
BOOST_TEST_SUITE("Boost.Threads: thread move test suite");
test->add(BOOST_TEST_CASE(test_thread_move_from_lvalue_on_construction));
- test->add(BOOST_TEST_CASE(test_thread_move_from_function_return));
+ test->add(BOOST_TEST_CASE(test_thread_move_from_rvalue));
return test;
}
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