|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r85800 - in trunk/libs/asio/test: . ssl
From: chris_at_[hidden]
Date: 2013-09-20 08:04:00
Author: chris_kohlhoff
Date: 2013-09-20 08:04:00 EDT (Fri, 20 Sep 2013)
New Revision: 85800
URL: http://svn.boost.org/trac/boost/changeset/85800
Log:
Change unit tests so that they don't depend on Boost.Thread.
Text files modified:
trunk/libs/asio/test/Jamfile | 3 +--
trunk/libs/asio/test/Jamfile.v2 | 1 -
trunk/libs/asio/test/deadline_timer.cpp | 4 ++--
trunk/libs/asio/test/io_service.cpp | 6 +++---
trunk/libs/asio/test/ssl/Jamfile | 3 +--
trunk/libs/asio/test/ssl/Jamfile.v2 | 1 -
trunk/libs/asio/test/strand.cpp | 6 +++---
trunk/libs/asio/test/system_timer.cpp | 4 ++--
8 files changed, 12 insertions(+), 16 deletions(-)
Modified: trunk/libs/asio/test/Jamfile
==============================================================================
--- trunk/libs/asio/test/Jamfile Fri Sep 20 08:02:33 2013 (r85799)
+++ trunk/libs/asio/test/Jamfile 2013-09-20 08:04:00 EDT (Fri, 20 Sep 2013) (r85800)
@@ -25,8 +25,7 @@
}
template asio_unit_test
- : <lib>@boost/libs/thread/build/boost_thread
- <lib>@boost/libs/regex/build/boost_regex
+ : <lib>@boost/libs/regex/build/boost_regex
<lib>@boost/libs/test/build/boost_test_exec_monitor
<lib>@boost_system/libs/system/build/boost_system
: <include>../../.. <include>@boost <include>@boost_system
Modified: trunk/libs/asio/test/Jamfile.v2
==============================================================================
--- trunk/libs/asio/test/Jamfile.v2 Fri Sep 20 08:02:33 2013 (r85799)
+++ trunk/libs/asio/test/Jamfile.v2 2013-09-20 08:04:00 EDT (Fri, 20 Sep 2013) (r85800)
@@ -38,7 +38,6 @@
: requirements
<library>/boost/date_time//boost_date_time
<library>/boost/system//boost_system
- <library>/boost/thread//boost_thread
<library>/boost/regex//boost_regex
<library>/boost/test//boost_test_exec_monitor
<define>BOOST_ALL_NO_LIB=1
Modified: trunk/libs/asio/test/deadline_timer.cpp
==============================================================================
--- trunk/libs/asio/test/deadline_timer.cpp Fri Sep 20 08:02:33 2013 (r85799)
+++ trunk/libs/asio/test/deadline_timer.cpp 2013-09-20 08:04:00 EDT (Fri, 20 Sep 2013) (r85800)
@@ -20,11 +20,11 @@
#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
-#include <boost/thread/thread.hpp>
#include <boost/bind.hpp>
#include "archetypes/async_result.hpp"
#include <boost/asio/io_service.hpp>
#include <boost/asio/placeholders.hpp>
+#include <boost/asio/detail/thread.hpp>
using namespace boost::posix_time;
@@ -309,7 +309,7 @@
boost::asio::deadline_timer t2(ios);
int count = 0;
- boost::thread th(boost::bind(io_service_run, &ios));
+ boost::asio::detail::thread th(boost::bind(io_service_run, &ios));
t2.expires_from_now(boost::posix_time::seconds(2));
t2.wait();
Modified: trunk/libs/asio/test/io_service.cpp
==============================================================================
--- trunk/libs/asio/test/io_service.cpp Fri Sep 20 08:02:33 2013 (r85799)
+++ trunk/libs/asio/test/io_service.cpp 2013-09-20 08:04:00 EDT (Fri, 20 Sep 2013) (r85800)
@@ -17,6 +17,7 @@
#include <boost/asio/io_service.hpp>
#include <sstream>
+#include <boost/asio/detail/thread.hpp>
#include "unit_test.hpp"
#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
@@ -26,7 +27,6 @@
#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
#if defined(BOOST_ASIO_HAS_BOOST_BIND)
-# include <boost/thread/thread.hpp>
# include <boost/bind.hpp>
#else // defined(BOOST_ASIO_HAS_BOOST_BIND)
# include <functional>
@@ -221,8 +221,8 @@
BOOST_ASIO_CHECK(!ios.stopped());
ios.post(bindns::bind(start_sleep_increments, &ios, &count));
ios.post(bindns::bind(start_sleep_increments, &ios, &count2));
- boost::thread thread1(bindns::bind(io_service_run, &ios));
- boost::thread thread2(bindns::bind(io_service_run, &ios));
+ boost::asio::detail::thread thread1(bindns::bind(io_service_run, &ios));
+ boost::asio::detail::thread thread2(bindns::bind(io_service_run, &ios));
thread1.join();
thread2.join();
Modified: trunk/libs/asio/test/ssl/Jamfile
==============================================================================
--- trunk/libs/asio/test/ssl/Jamfile Fri Sep 20 08:02:33 2013 (r85799)
+++ trunk/libs/asio/test/ssl/Jamfile 2013-09-20 08:04:00 EDT (Fri, 20 Sep 2013) (r85800)
@@ -24,8 +24,7 @@
}
template unit_test
- : <lib>@boost/libs/thread/build/boost_thread
- <lib>@boost/libs/system/build/boost_system
+ : <lib>@boost/libs/system/build/boost_system
: <lib>@boost/libs/test/build/boost_test_exec_monitor
: <include>../../../..
<define>BOOST_ALL_NO_LIB=1
Modified: trunk/libs/asio/test/ssl/Jamfile.v2
==============================================================================
--- trunk/libs/asio/test/ssl/Jamfile.v2 Fri Sep 20 08:02:33 2013 (r85799)
+++ trunk/libs/asio/test/ssl/Jamfile.v2 2013-09-20 08:04:00 EDT (Fri, 20 Sep 2013) (r85800)
@@ -35,7 +35,6 @@
project
: requirements
<library>/boost/date_time//boost_date_time
- <library>/boost/thread//boost_thread
<library>/boost/test//boost_test_exec_monitor
<define>BOOST_ALL_NO_LIB=1
<threading>multi
Modified: trunk/libs/asio/test/strand.cpp
==============================================================================
--- trunk/libs/asio/test/strand.cpp Fri Sep 20 08:02:33 2013 (r85799)
+++ trunk/libs/asio/test/strand.cpp 2013-09-20 08:04:00 EDT (Fri, 20 Sep 2013) (r85800)
@@ -18,6 +18,7 @@
#include <sstream>
#include <boost/asio/io_service.hpp>
+#include <boost/asio/detail/thread.hpp>
#include "unit_test.hpp"
#if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
@@ -27,7 +28,6 @@
#endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
#if defined(BOOST_ASIO_HAS_BOOST_BIND)
-# include <boost/thread/thread.hpp>
# include <boost/bind.hpp>
#else // defined(BOOST_ASIO_HAS_BOOST_BIND)
# include <functional>
@@ -144,8 +144,8 @@
count = 0;
ios.reset();
ios.post(bindns::bind(start_sleep_increments, &ios, &s, &count));
- boost::thread thread1(bindns::bind(io_service_run, &ios));
- boost::thread thread2(bindns::bind(io_service_run, &ios));
+ boost::asio::detail::thread thread1(bindns::bind(io_service_run, &ios));
+ boost::asio::detail::thread thread2(bindns::bind(io_service_run, &ios));
// Check all events run one after another even though there are two threads.
timer timer1(ios, chronons::seconds(3));
Modified: trunk/libs/asio/test/system_timer.cpp
==============================================================================
--- trunk/libs/asio/test/system_timer.cpp Fri Sep 20 08:02:33 2013 (r85799)
+++ trunk/libs/asio/test/system_timer.cpp 2013-09-20 08:04:00 EDT (Fri, 20 Sep 2013) (r85800)
@@ -26,9 +26,9 @@
#if defined(BOOST_ASIO_HAS_STD_CHRONO)
#include <boost/asio/io_service.hpp>
+#include <boost/asio/detail/thread.hpp>
#if defined(BOOST_ASIO_HAS_BOOST_BIND)
-# include <boost/thread/thread.hpp>
# include <boost/bind.hpp>
#else // defined(BOOST_ASIO_HAS_BOOST_BIND)
# include <functional>
@@ -325,7 +325,7 @@
boost::asio::system_timer t2(ios);
int count = 0;
- boost::thread th(bindns::bind(io_service_run, &ios));
+ boost::asio::detail::thread th(bindns::bind(io_service_run, &ios));
t2.expires_from_now(chronons::seconds(2));
t2.wait();
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