Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80847 - in trunk/libs/thread/test: . sync/futures/future sync/futures/packaged_task threads/thread/assign
From: vicente.botet_at_[hidden]
Date: 2012-10-04 13:08:25


Author: viboes
Date: 2012-10-04 13:08:23 EDT (Thu, 04 Oct 2012)
New Revision: 80847
URL: http://svn.boost.org/trac/boost/changeset/80847

Log:
Thread: constraint these test to run only when BOOST_THREAD_USES_CHRONO is defined
Text files modified:
   trunk/libs/thread/test/sync/futures/future/get_pass.cpp | 5 +++++
   trunk/libs/thread/test/sync/futures/packaged_task/operator_pass.cpp | 5 +++++
   trunk/libs/thread/test/test_3628.cpp | 6 ++++++
   trunk/libs/thread/test/test_7328.cpp | 6 ++++++
   trunk/libs/thread/test/threads/thread/assign/move_pass.cpp | 1 -
   5 files changed, 22 insertions(+), 1 deletions(-)

Modified: trunk/libs/thread/test/sync/futures/future/get_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/future/get_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/future/get_pass.cpp 2012-10-04 13:08:23 EDT (Thu, 04 Oct 2012)
@@ -25,6 +25,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 namespace boost
 {
 template <typename T>
@@ -212,3 +214,6 @@
   return boost::report_errors();
 }
 
+#else
+#error "Test not applicable: BOOST_THREAD_USES_CHRONO not defined for this platform as not supported"
+#endif

Modified: trunk/libs/thread/test/sync/futures/packaged_task/operator_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/packaged_task/operator_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/packaged_task/operator_pass.cpp 2012-10-04 13:08:23 EDT (Thu, 04 Oct 2012)
@@ -24,6 +24,8 @@
 #include <boost/thread/future.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 #if BOOST_THREAD_VERSION == 4
 #define BOOST_THREAD_DETAIL_SIGNATURE double()
 #else
@@ -211,3 +213,6 @@
   return boost::report_errors();
 }
 
+#else
+#error "Test not applicable: BOOST_THREAD_USES_CHRONO not defined for this platform as not supported"
+#endif

Modified: trunk/libs/thread/test/test_3628.cpp
==============================================================================
--- trunk/libs/thread/test/test_3628.cpp (original)
+++ trunk/libs/thread/test/test_3628.cpp 2012-10-04 13:08:23 EDT (Thu, 04 Oct 2012)
@@ -9,6 +9,8 @@
 #include <list>
 #include <iostream>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 using namespace std;
 
 boost::recursive_mutex theMutex;
@@ -87,3 +89,7 @@
   return 0;
 }
 
+
+#else
+#error "Test not applicable: BOOST_THREAD_USES_CHRONO not defined for this platform as not supported"
+#endif

Modified: trunk/libs/thread/test/test_7328.cpp
==============================================================================
--- trunk/libs/thread/test/test_7328.cpp (original)
+++ trunk/libs/thread/test/test_7328.cpp 2012-10-04 13:08:23 EDT (Thu, 04 Oct 2012)
@@ -7,6 +7,8 @@
 #include <boost/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 //using namespace boost;
 using namespace boost::chrono;
 
@@ -37,3 +39,7 @@
   BOOST_TEST(interrupted);
   return boost::report_errors();
 }
+
+#else
+#error "Test not applicable: BOOST_THREAD_USES_CHRONO not defined for this platform as not supported"
+#endif

Modified: trunk/libs/thread/test/threads/thread/assign/move_pass.cpp
==============================================================================
--- trunk/libs/thread/test/threads/thread/assign/move_pass.cpp (original)
+++ trunk/libs/thread/test/threads/thread/assign/move_pass.cpp 2012-10-04 13:08:23 EDT (Thu, 04 Oct 2012)
@@ -92,7 +92,6 @@
   BOOST_TEST(G::n_alive == 0);
   {
     boost::thread t0(G(), 5, 5.5);
- boost::thread::id id = t0.get_id();
     boost::thread t1;
     t0 = boost::move(t1);
     BOOST_TEST(false);


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