diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-04-08 03:09:47 +0000 |
---|---|---|
committer | <> | 2015-05-05 14:37:32 +0000 |
commit | f2541bb90af059680aa7036f315f052175999355 (patch) | |
tree | a5b214744b256f07e1dc2bd7273035a7808c659f /libs/atomic/test/ordering.cpp | |
parent | ed232fdd34968697a68783b3195b1da4226915b5 (diff) | |
download | boost-tarball-master.tar.gz |
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_58_0.tar.bz2.HEADboost_1_58_0master
Diffstat (limited to 'libs/atomic/test/ordering.cpp')
-rw-r--r-- | libs/atomic/test/ordering.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libs/atomic/test/ordering.cpp b/libs/atomic/test/ordering.cpp index f76985504..2bfcd4adf 100644 --- a/libs/atomic/test/ordering.cpp +++ b/libs/atomic/test/ordering.cpp @@ -26,18 +26,19 @@ // Overall this yields 0.995 * 0.995 > 0.99 confidence that the // fences work as expected if this test program does not // report an error. + #include <boost/atomic.hpp> + #include <boost/bind.hpp> #include <boost/date_time/posix_time/posix_time_types.hpp> #include <boost/date_time/posix_time/time_formatters.hpp> -#include <boost/test/test_tools.hpp> -#include <boost/test/included/test_exec_monitor.hpp> #include <boost/thread/thread.hpp> #include <boost/thread/thread_time.hpp> #include <boost/thread/locks.hpp> #include <boost/thread/mutex.hpp> #include <boost/thread/condition_variable.hpp> #include <boost/thread/barrier.hpp> +#include <boost/core/lightweight_test.hpp> // Two threads perform the following operations: // @@ -224,7 +225,7 @@ test_seq_cst(void) total_store_order_test<boost::memory_order_relaxed, boost::memory_order_relaxed> test; test.run(timeout); if (!test.detected_conflict()) { - BOOST_WARN_MESSAGE(false, "Failed to detect order=seq_cst violation while ith order=relaxed -- intrinsic ordering too strong for this test"); + std::cout << "Failed to detect order=seq_cst violation while ith order=relaxed -- intrinsic ordering too strong for this test\n"; return; } @@ -248,12 +249,12 @@ test_seq_cst(void) total_store_order_test<boost::memory_order_seq_cst, boost::memory_order_relaxed> test; test.run(timeout); - BOOST_CHECK_MESSAGE(!test.detected_conflict(), "sequential consistency"); + BOOST_TEST(!test.detected_conflict()); // sequential consistency error } -int test_main(int, char *[]) +int main(int, char *[]) { test_seq_cst(); - return 0; + return boost::report_errors(); } |