|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r74803 - in branches/release/libs/chrono/test: . clock
From: vicente.botet_at_[hidden]
Date: 2011-10-08 09:47:20
Author: viboes
Date: 2011-10-08 09:47:19 EDT (Sat, 08 Oct 2011)
New Revision: 74803
URL: http://svn.boost.org/trac/boost/changeset/74803
Log:
Chrono: Merge #5998 - Jamfile and clock_test were forgoten in the preceding commit
Text files modified:
branches/release/libs/chrono/test/Jamfile.v2 | 42 +++++++++-----------------------
branches/release/libs/chrono/test/clock/clock_pass.cpp | 52 ++++++++++++++++++++++++++++-----------
2 files changed, 49 insertions(+), 45 deletions(-)
Modified: branches/release/libs/chrono/test/Jamfile.v2
==============================================================================
--- branches/release/libs/chrono/test/Jamfile.v2 (original)
+++ branches/release/libs/chrono/test/Jamfile.v2 2011-10-08 09:47:19 EDT (Sat, 08 Oct 2011)
@@ -59,9 +59,7 @@
[ run $(sources)
: :
: <define>BOOST_CHRONO_HEADER_ONLY
- # comment one of the following lines
- #<define>BOOST_SYSTEM_INLINED
- <library>/boost/system//boost_system
+ <define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
: $(sources[1]:B)_header ]
;
}
@@ -81,9 +79,7 @@
[ run $(sources)
: :
: <define>BOOST_CHRONO_HEADER_ONLY
- # comment one of the following lines
- #<define>BOOST_SYSTEM_INLINED
- <library>/boost/system//boost_system
+ <define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
: $(name)_header ]
;
}
@@ -105,9 +101,7 @@
[ run $(sources)
: :
: <define>BOOST_CHRONO_HEADER_ONLY
- # comment one of the following lines
- #<define>BOOST_SYSTEM_INLINED
- <library>/boost/system//boost_system
+ <define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
: $(sources[1]:B)_header ]
;
}
@@ -127,9 +121,7 @@
[ run $(sources)
: :
: <define>BOOST_CHRONO_HEADER_ONLY
- # comment one of the following lines
- #<define>BOOST_SYSTEM_INLINED
- <library>/boost/system//boost_system
+ <define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
: $(name)_header ]
;
}
@@ -150,9 +142,7 @@
[ run $(sources)
: :
: <define>BOOST_CHRONO_HEADER_ONLY
- # comment one of the following lines
- #<define>BOOST_SYSTEM_INLINED
- <library>/boost/system//boost_system
+ <define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
: $(sources[1]:B)_header ]
;
}
@@ -173,9 +163,7 @@
[ run $(sources)
: :
: <define>BOOST_CHRONO_HEADER_ONLY
- # comment one of the following lines
- #<define>BOOST_SYSTEM_INLINED
- <library>/boost/system//boost_system
+ <define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
: $(name)_header ]
;
}
@@ -186,9 +174,7 @@
[ run $(sources)
: :
: <define>BOOST_CHRONO_HEADER_ONLY
- # comment one of the following lines
- #<define>BOOST_SYSTEM_INLINED
- <library>/boost/system//boost_system
+ <define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
: $(sources[1]:B)_header ]
;
}
@@ -199,9 +185,7 @@
[ run $(sources)
: :
: <define>BOOST_CHRONO_HEADER_ONLY
- # comment one of the following lines
- #<define>BOOST_SYSTEM_INLINED
- <library>/boost/system//boost_system
+ <define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
: $(name)_header ]
;
}
@@ -214,9 +198,8 @@
: $(sources[1]:B)_lib ]
[ compile $(sources)
: <define>BOOST_CHRONO_HEADER_ONLY
- # comment the following line
- <define>BOOST_SYSTEM_INLINED
- : $(sources[1]:B)_header ]
+ <define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+ : $(sources[1]:B)_header ]
;
}
@@ -227,9 +210,8 @@
:
: $(name)_lib ]
[ compile $(sources)
- : <define>BOOST_CHRONO_HEADER_ONLY
- # comment the following line
- <define>BOOST_SYSTEM_INLINED
+ : <define>BOOST_CHRONO_HEADER_ONLY
+ <define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
: $(name)_header ]
;
}
Modified: branches/release/libs/chrono/test/clock/clock_pass.cpp
==============================================================================
--- branches/release/libs/chrono/test/clock/clock_pass.cpp (original)
+++ branches/release/libs/chrono/test/clock/clock_pass.cpp 2011-10-08 09:47:19 EDT (Sat, 08 Oct 2011)
@@ -38,6 +38,8 @@
typename Clock::time_point t1 = Clock::now();
}
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+
template <typename Clock>
void check_clock_now_ec()
{
@@ -52,6 +54,7 @@
typename Clock::time_point t1 = Clock::now(boost::throws());
}
+
template <typename Clock>
void check_clock_now_err(int err)
{
@@ -91,27 +94,22 @@
}
Clock::set_errno(0);
}
+#endif
int main()
{
check_clock_invariants<boost::chrono::high_resolution_clock>();
check_clock_now<boost::chrono::high_resolution_clock>();
- check_clock_now_ec<boost::chrono::high_resolution_clock>();
- check_clock_now_throws<boost::chrono::high_resolution_clock>();
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
check_clock_invariants<boost::chrono::steady_clock>();
BOOST_CHRONO_STATIC_ASSERT(boost::chrono::steady_clock::is_steady, NOTHING, ());
check_clock_now<boost::chrono::steady_clock>();
- check_clock_now_ec<boost::chrono::steady_clock>();
- check_clock_now_throws<boost::chrono::steady_clock>();
#endif
check_clock_invariants<boost::chrono::system_clock>();
BOOST_CHRONO_STATIC_ASSERT(!boost::chrono::system_clock::is_steady, NOTHING, ());
check_clock_now<boost::chrono::system_clock>();
- check_clock_now_ec<boost::chrono::system_clock>();
- check_clock_now_throws<boost::chrono::system_clock>();
{
typedef boost::chrono::system_clock C;
C::time_point t1 = C::from_time_t(C::to_time_t(C::now()));
@@ -133,35 +131,59 @@
check_clock_invariants<boost::chrono::thread_clock>();
BOOST_CHRONO_STATIC_ASSERT(boost::chrono::thread_clock::is_steady, NOTHING, ());
check_clock_now<boost::chrono::thread_clock>();
- check_clock_now_ec<boost::chrono::thread_clock>();
- check_clock_now_throws<boost::chrono::thread_clock>();
#endif
#if defined(BOOST_CHRONO_HAS_PROCESS_CLOCKS)
check_clock_invariants<boost::chrono::process_real_cpu_clock>();
BOOST_CHRONO_STATIC_ASSERT(boost::chrono::process_real_cpu_clock::is_steady, NOTHING, ());
check_clock_now<boost::chrono::process_real_cpu_clock>();
- check_clock_now_ec<boost::chrono::process_real_cpu_clock>();
- check_clock_now_throws<boost::chrono::process_real_cpu_clock>();
check_clock_invariants<boost::chrono::process_user_cpu_clock>();
BOOST_CHRONO_STATIC_ASSERT(boost::chrono::process_user_cpu_clock::is_steady, NOTHING, ());
check_clock_now<boost::chrono::process_user_cpu_clock>();
- check_clock_now_ec<boost::chrono::process_user_cpu_clock>();
- check_clock_now_throws<boost::chrono::process_user_cpu_clock>();
check_clock_invariants<boost::chrono::process_system_cpu_clock>();
BOOST_CHRONO_STATIC_ASSERT(boost::chrono::process_system_cpu_clock::is_steady, NOTHING, ());
check_clock_now<boost::chrono::process_system_cpu_clock>();
- check_clock_now_ec<boost::chrono::process_system_cpu_clock>();
- check_clock_now_throws<boost::chrono::process_system_cpu_clock>();
check_clock_invariants<boost::chrono::process_cpu_clock>();
BOOST_CHRONO_STATIC_ASSERT(boost::chrono::process_cpu_clock::is_steady, NOTHING, ());
check_clock_now<boost::chrono::process_cpu_clock>();
+#endif
+
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+ check_clock_now_ec<boost::chrono::high_resolution_clock>();
+ check_clock_now_throws<boost::chrono::high_resolution_clock>();
+
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ check_clock_now_ec<boost::chrono::steady_clock>();
+ check_clock_now_throws<boost::chrono::steady_clock>();
+#endif
+
+ check_clock_now_ec<boost::chrono::system_clock>();
+ check_clock_now_throws<boost::chrono::system_clock>();
+
+#if defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
+ check_clock_now_ec<boost::chrono::thread_clock>();
+ check_clock_now_throws<boost::chrono::thread_clock>();
+#endif
+
+#if defined(BOOST_CHRONO_HAS_PROCESS_CLOCKS)
+ check_clock_now_ec<boost::chrono::process_real_cpu_clock>();
+ check_clock_now_throws<boost::chrono::process_real_cpu_clock>();
+
+ check_clock_now_ec<boost::chrono::process_user_cpu_clock>();
+ check_clock_now_throws<boost::chrono::process_user_cpu_clock>();
+
+ check_clock_now_ec<boost::chrono::process_system_cpu_clock>();
+ check_clock_now_throws<boost::chrono::process_system_cpu_clock>();
+
check_clock_now_ec<boost::chrono::process_cpu_clock>();
check_clock_now_throws<boost::chrono::process_cpu_clock>();
#endif
-
+
+#endif
+
return boost::report_errors();
}
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