Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77041 - in trunk/libs/thread/test: sync/conditions/condition_variable sync/conditions/condition_variable_any sync/mutual_exclusion/locks/unique_lock/cons sync/mutual_exclusion/locks/unique_lock/locking sync/mutual_exclusion/mutex sync/mutual_exclusion/recursive_mutex sync/mutual_exclusion/recursive_timed_mutex sync/mutual_exclusion/timed_mutex threads/this_thread/sleep_for threads/this_thread/sleep_until threads/thread/destr threads/thread/members
From: vicente.botet_at_[hidden]
Date: 2012-02-16 13:12:06


Author: viboes
Date: 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
New Revision: 77041
URL: http://svn.boost.org/trac/boost/changeset/77041

Log:
Thread: Add explicit #error when the test is not applicable
Text files modified:
   trunk/libs/thread/test/sync/conditions/condition_variable/native_handle_pass.cpp | 2 ++
   trunk/libs/thread/test/sync/conditions/condition_variable/wait_for_pass.cpp | 5 +++++
   trunk/libs/thread/test/sync/conditions/condition_variable/wait_for_pred_pass.cpp | 5 +++++
   trunk/libs/thread/test/sync/conditions/condition_variable/wait_until_pass.cpp | 5 +++++
   trunk/libs/thread/test/sync/conditions/condition_variable/wait_until_pred_pass.cpp | 5 +++++
   trunk/libs/thread/test/sync/conditions/condition_variable_any/wait_for_pass.cpp | 5 +++++
   trunk/libs/thread/test/sync/conditions/condition_variable_any/wait_for_pred_pass.cpp | 5 +++++
   trunk/libs/thread/test/sync/conditions/condition_variable_any/wait_until_pass.cpp | 5 +++++
   trunk/libs/thread/test/sync/conditions/condition_variable_any/wait_until_pred_pass.cpp | 5 +++++
   trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/duration_pass.cpp | 5 +++++
   trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/mutex_pass.cpp | 6 ++++++
   trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/time_point_pass.cpp | 5 +++++
   trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/try_to_lock_pass.cpp | 5 +++++
   trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/locking/lock_pass.cpp | 6 ++++++
   trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/locking/try_lock_for_pass.cpp | 7 +++++++
   trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/locking/try_lock_pass.cpp | 1 -
   trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/locking/try_lock_until_pass.cpp | 8 ++++++++
   trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/locking/unlock_pass.cpp | 6 ++++++
   trunk/libs/thread/test/sync/mutual_exclusion/mutex/lock_pass.cpp | 6 ++++++
   trunk/libs/thread/test/sync/mutual_exclusion/mutex/native_handle_pass.cpp | 2 ++
   trunk/libs/thread/test/sync/mutual_exclusion/mutex/try_lock_pass.cpp | 6 ++++++
   trunk/libs/thread/test/sync/mutual_exclusion/recursive_mutex/lock_pass.cpp | 6 ++++++
   trunk/libs/thread/test/sync/mutual_exclusion/recursive_mutex/native_handle_pass.cpp | 2 ++
   trunk/libs/thread/test/sync/mutual_exclusion/recursive_mutex/try_lock_pass.cpp | 6 ++++++
   trunk/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/lock_pass.cpp | 7 +++++++
   trunk/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/native_handle_pass.cpp | 2 ++
   trunk/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/try_lock_for_pass.cpp | 7 +++++++
   trunk/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/try_lock_pass.cpp | 7 +++++++
   trunk/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/try_lock_until_pass.cpp | 6 ++++++
   trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/lock_pass.cpp | 6 ++++++
   trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/native_handle_pass.cpp | 2 ++
   trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/try_lock_for_pass.cpp | 6 ++++++
   trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/try_lock_pass.cpp | 6 ++++++
   trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/try_lock_until_pass.cpp | 6 ++++++
   trunk/libs/thread/test/threads/this_thread/sleep_for/sleep_for_pass.cpp | 6 ++++++
   trunk/libs/thread/test/threads/this_thread/sleep_until/sleep_until_pass.cpp | 6 ++++++
   trunk/libs/thread/test/threads/thread/destr/dtor_pass.cpp | 2 ++
   trunk/libs/thread/test/threads/thread/members/detach_pass.cpp | 2 ++
   38 files changed, 189 insertions(+), 1 deletions(-)

Modified: trunk/libs/thread/test/sync/conditions/condition_variable/native_handle_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/conditions/condition_variable/native_handle_pass.cpp (original)
+++ trunk/libs/thread/test/sync/conditions/condition_variable/native_handle_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -29,6 +29,8 @@
   boost::condition_variable cv;
   boost::condition_variable::native_handle_type h = cv.native_handle();
   BOOST_TEST(h != 0);
+#else
+#error "Test not applicable: BOOST_THREAD_DEFINES_CONDITION_VARIABLE_NATIVE_HANDLE not defined for this platform as not supported"
 #endif
   return boost::report_errors();
 }

Modified: trunk/libs/thread/test/sync/conditions/condition_variable/wait_for_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/conditions/condition_variable/wait_for_pass.cpp (original)
+++ trunk/libs/thread/test/sync/conditions/condition_variable/wait_for_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -23,6 +23,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 boost::condition_variable cv;
 boost::mutex mut;
 
@@ -87,4 +89,7 @@
 
   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/conditions/condition_variable/wait_for_pred_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/conditions/condition_variable/wait_for_pred_pass.cpp (original)
+++ trunk/libs/thread/test/sync/conditions/condition_variable/wait_for_pred_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -22,6 +22,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 class Pred
 {
   int& i_;
@@ -102,3 +104,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/conditions/condition_variable/wait_until_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/conditions/condition_variable/wait_until_pass.cpp (original)
+++ trunk/libs/thread/test/sync/conditions/condition_variable/wait_until_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -22,6 +22,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 struct Clock
 {
   typedef boost::chrono::milliseconds duration;
@@ -101,3 +103,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/conditions/condition_variable/wait_until_pred_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/conditions/condition_variable/wait_until_pred_pass.cpp (original)
+++ trunk/libs/thread/test/sync/conditions/condition_variable/wait_until_pred_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -22,6 +22,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 struct Clock
 {
   typedef boost::chrono::milliseconds duration;
@@ -115,3 +117,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/conditions/condition_variable_any/wait_for_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/conditions/condition_variable_any/wait_for_pass.cpp (original)
+++ trunk/libs/thread/test/sync/conditions/condition_variable_any/wait_for_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -22,6 +22,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 boost::condition_variable_any cv;
 
 typedef boost::timed_mutex L0;
@@ -92,3 +94,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/conditions/condition_variable_any/wait_for_pred_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/conditions/condition_variable_any/wait_for_pred_pass.cpp (original)
+++ trunk/libs/thread/test/sync/conditions/condition_variable_any/wait_for_pred_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -22,6 +22,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 class Pred
 {
   int& i_;
@@ -103,3 +105,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/conditions/condition_variable_any/wait_until_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/conditions/condition_variable_any/wait_until_pass.cpp (original)
+++ trunk/libs/thread/test/sync/conditions/condition_variable_any/wait_until_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -22,6 +22,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 struct Clock
 {
   typedef boost::chrono::milliseconds duration;
@@ -105,3 +107,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/conditions/condition_variable_any/wait_until_pred_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/conditions/condition_variable_any/wait_until_pred_pass.cpp (original)
+++ trunk/libs/thread/test/sync/conditions/condition_variable_any/wait_until_pred_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -22,6 +22,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 struct Clock
 {
   typedef boost::chrono::milliseconds duration;
@@ -119,3 +121,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/mutual_exclusion/locks/unique_lock/cons/duration_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/duration_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/duration_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -25,6 +25,8 @@
 #include <boost/detail/lightweight_test.hpp>
 #include <boost/chrono/chrono_io.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 boost::timed_mutex m;
 
 typedef boost::chrono::steady_clock Clock;
@@ -75,3 +77,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/mutual_exclusion/locks/unique_lock/cons/mutex_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/mutex_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/mutex_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -24,6 +24,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 boost::mutex m;
 
 typedef boost::chrono::system_clock Clock;
@@ -56,3 +58,7 @@
   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/mutual_exclusion/locks/unique_lock/cons/time_point_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/time_point_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/time_point_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -24,6 +24,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 boost::timed_mutex m;
 
 typedef boost::chrono::steady_clock Clock;
@@ -73,3 +75,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/mutual_exclusion/locks/unique_lock/cons/try_to_lock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/try_to_lock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/try_to_lock_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -24,6 +24,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 boost::mutex m;
 
 typedef boost::chrono::system_clock Clock;
@@ -69,4 +71,7 @@
 
   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/mutual_exclusion/locks/unique_lock/locking/lock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/locking/lock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/locking/lock_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -24,6 +24,8 @@
 #include <boost/detail/lightweight_test.hpp>
 #include <iostream>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 boost::mutex m;
 
 typedef boost::chrono::system_clock Clock;
@@ -75,3 +77,7 @@
   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/mutual_exclusion/locks/unique_lock/locking/try_lock_for_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/locking/try_lock_for_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/locking/try_lock_for_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -23,6 +23,9 @@
 //#include <boost/thread/mutex.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
+
 bool try_lock_for_called = false;
 
 typedef boost::chrono::milliseconds ms;
@@ -76,3 +79,7 @@
   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/mutual_exclusion/locks/unique_lock/locking/try_lock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/locking/try_lock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/locking/try_lock_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -71,4 +71,3 @@
 
   return boost::report_errors();
 }
-

Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/locking/try_lock_until_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/locking/try_lock_until_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/locking/try_lock_until_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -23,6 +23,9 @@
 #include <boost/thread/mutex.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
+
 bool try_lock_until_called = false;
 
 struct mutex
@@ -74,3 +77,8 @@
   }
   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/mutual_exclusion/locks/unique_lock/locking/unlock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/locking/unlock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/locking/unlock_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -23,6 +23,8 @@
 //#include <boost/thread/mutex.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 bool unlock_called = false;
 
 struct mutex
@@ -67,3 +69,7 @@
   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/mutual_exclusion/mutex/lock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/mutex/lock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/mutex/lock_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -22,6 +22,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 boost::mutex m;
 
 typedef boost::chrono::system_clock Clock;
@@ -52,3 +54,7 @@
   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/mutual_exclusion/mutex/native_handle_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/mutex/native_handle_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/mutex/native_handle_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -28,6 +28,8 @@
   boost::mutex m;
   boost::mutex::native_handle_type h = m.native_handle();
   BOOST_TEST(h);
+#else
+#error "Test not applicable: BOOST_THREAD_DEFINES_MUTEX_NATIVE_HANDLE not defined for this platform as not supported"
 #endif
   return boost::report_errors();
 }

Modified: trunk/libs/thread/test/sync/mutual_exclusion/mutex/try_lock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/mutex/try_lock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/mutex/try_lock_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -22,6 +22,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 boost::mutex m;
 
 typedef boost::chrono::system_clock Clock;
@@ -56,3 +58,7 @@
   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/mutual_exclusion/recursive_mutex/lock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/recursive_mutex/lock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/recursive_mutex/lock_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -22,6 +22,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 boost::recursive_mutex m;
 
 typedef boost::chrono::system_clock Clock;
@@ -54,3 +56,7 @@
   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/mutual_exclusion/recursive_mutex/native_handle_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/recursive_mutex/native_handle_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/recursive_mutex/native_handle_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -28,6 +28,8 @@
   boost::recursive_mutex m;
   boost::recursive_mutex::native_handle_type h = m.native_handle();
   BOOST_TEST(h);
+#else
+#error "Test not applicable: BOOST_THREAD_DEFINES_CONDITION_VARIABLE_NATIVE_HANDLE not defined for this platform as not supported"
 #endif
 
   return boost::report_errors();

Modified: trunk/libs/thread/test/sync/mutual_exclusion/recursive_mutex/try_lock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/recursive_mutex/try_lock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/recursive_mutex/try_lock_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -22,6 +22,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 boost::recursive_mutex m;
 
 typedef boost::chrono::system_clock Clock;
@@ -58,3 +60,7 @@
   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/mutual_exclusion/recursive_timed_mutex/lock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/lock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/lock_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -22,6 +22,9 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
+
 boost::recursive_timed_mutex m;
 
 typedef boost::chrono::system_clock Clock;
@@ -54,3 +57,7 @@
   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/mutual_exclusion/recursive_timed_mutex/native_handle_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/native_handle_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/native_handle_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -28,6 +28,8 @@
   boost::recursive_timed_mutex m;
   boost::recursive_timed_mutex::native_handle_type h = m.native_handle();
   BOOST_TEST(h);
+#else
+#error "Test not applicable: BOOST_THREAD_DEFINES_RECURSIVE_TIMED_MUTEX_NATIVE_HANDLE not defined for this platform as not supported"
 #endif
   return boost::report_errors();
 }

Modified: trunk/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/try_lock_for_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/try_lock_for_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/try_lock_for_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -23,6 +23,9 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
+
 boost::recursive_timed_mutex m;
 
 typedef boost::chrono::steady_clock Clock;
@@ -74,3 +77,7 @@
   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/mutual_exclusion/recursive_timed_mutex/try_lock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/try_lock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/try_lock_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -22,6 +22,9 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
+
 boost::recursive_timed_mutex m;
 
 typedef boost::chrono::system_clock Clock;
@@ -58,3 +61,7 @@
   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/mutual_exclusion/recursive_timed_mutex/try_lock_until_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/try_lock_until_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/try_lock_until_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -23,6 +23,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 boost::recursive_timed_mutex m;
 
 typedef boost::chrono::steady_clock Clock;
@@ -72,3 +74,7 @@
   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/mutual_exclusion/timed_mutex/lock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/lock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/lock_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -22,6 +22,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 boost::timed_mutex m;
 
 typedef boost::chrono::system_clock Clock;
@@ -51,4 +53,8 @@
 
   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/mutual_exclusion/timed_mutex/native_handle_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/native_handle_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/native_handle_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -29,6 +29,8 @@
   boost::timed_mutex m;
   boost::timed_mutex::native_handle_type h = m.native_handle();
   BOOST_TEST(h);
+#else
+#error "Test not applicable: BOOST_THREAD_DEFINES_TIMED_MUTEX_NATIVE_HANDLE not defined for this platform as not supported"
 #endif
   return boost::report_errors();
 }

Modified: trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/try_lock_for_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/try_lock_for_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/try_lock_for_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -23,6 +23,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 boost::timed_mutex m;
 
 typedef boost::chrono::steady_clock Clock;
@@ -72,3 +74,7 @@
   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/mutual_exclusion/timed_mutex/try_lock_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/try_lock_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/try_lock_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -22,6 +22,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 boost::timed_mutex m;
 
 typedef boost::chrono::system_clock Clock;
@@ -55,4 +57,8 @@
 
   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/mutual_exclusion/timed_mutex/try_lock_until_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/try_lock_until_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/try_lock_until_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -23,6 +23,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 boost::timed_mutex m;
 
 typedef boost::chrono::steady_clock Clock;
@@ -72,3 +74,7 @@
   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/this_thread/sleep_for/sleep_for_pass.cpp
==============================================================================
--- trunk/libs/thread/test/threads/this_thread/sleep_for/sleep_for_pass.cpp (original)
+++ trunk/libs/thread/test/threads/this_thread/sleep_for/sleep_for_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -20,6 +20,8 @@
 
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 int main()
 {
   typedef boost::chrono::system_clock Clock;
@@ -38,3 +40,7 @@
 
 }
 
+#else
+#error "Test not applicable: BOOST_THREAD_USES_CHRONO not defined for this platform as not supported"
+#endif
+

Modified: trunk/libs/thread/test/threads/this_thread/sleep_until/sleep_until_pass.cpp
==============================================================================
--- trunk/libs/thread/test/threads/this_thread/sleep_until/sleep_until_pass.cpp (original)
+++ trunk/libs/thread/test/threads/this_thread/sleep_until/sleep_until_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -20,6 +20,8 @@
 
 #include <boost/detail/lightweight_test.hpp>
 
+#if defined BOOST_THREAD_USES_CHRONO
+
 int main()
 {
   typedef boost::chrono::system_clock Clock;
@@ -37,3 +39,7 @@
 
 }
 
+#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/destr/dtor_pass.cpp
==============================================================================
--- trunk/libs/thread/test/threads/thread/destr/dtor_pass.cpp (original)
+++ trunk/libs/thread/test/threads/thread/destr/dtor_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -68,7 +68,9 @@
     BOOST_TEST(G::n_alive == 0);
     BOOST_TEST(!G::op_run);
     boost::thread t( (G()));
+#if defined BOOST_THREAD_USES_CHRONO
     boost::this_thread::sleep_for(boost::chrono::milliseconds(250));
+#endif
   }
 #if 0
   BOOST_TEST(false);

Modified: trunk/libs/thread/test/threads/thread/members/detach_pass.cpp
==============================================================================
--- trunk/libs/thread/test/threads/thread/members/detach_pass.cpp (original)
+++ trunk/libs/thread/test/threads/thread/members/detach_pass.cpp 2012-02-16 13:12:03 EST (Thu, 16 Feb 2012)
@@ -64,7 +64,9 @@
     BOOST_TEST(t0.joinable());
     t0.detach();
     BOOST_TEST(!t0.joinable());
+#if defined BOOST_THREAD_USES_CHRONO
     boost::this_thread::sleep_for(boost::chrono::milliseconds(250));
+#endif
     BOOST_TEST(G::op_run);
     BOOST_TEST(G::n_alive == 0);
   }


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