|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r79426 - trunk/libs/lockfree/test
From: tim_at_[hidden]
Date: 2012-07-11 14:39:18
Author: timblechmann
Date: 2012-07-11 14:39:17 EDT (Wed, 11 Jul 2012)
New Revision: 79426
URL: http://svn.boost.org/trac/boost/changeset/79426
Log:
lockfree: split stress tests to multiple files
Signed-off-by: Tim Blechmann <tim_at_[hidden]>
Added:
trunk/libs/lockfree/test/queue_bounded_stress_test.cpp (contents, props changed)
trunk/libs/lockfree/test/queue_fixedsize_stress_test.cpp (contents, props changed)
trunk/libs/lockfree/test/queue_unbounded_stress_test.cpp (contents, props changed)
trunk/libs/lockfree/test/stack_bounded_stress_test.cpp (contents, props changed)
trunk/libs/lockfree/test/stack_fixedsize_stress_test.cpp (contents, props changed)
trunk/libs/lockfree/test/stack_unbounded_stress_test.cpp (contents, props changed)
Text files modified:
trunk/libs/lockfree/test/queue_test.cpp | 30 ------------------------------
trunk/libs/lockfree/test/stack_test.cpp | 36 ------------------------------------
2 files changed, 0 insertions(+), 66 deletions(-)
Added: trunk/libs/lockfree/test/queue_bounded_stress_test.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/lockfree/test/queue_bounded_stress_test.cpp 2012-07-11 14:39:17 EDT (Wed, 11 Jul 2012)
@@ -0,0 +1,19 @@
+#include <boost/lockfree/queue.hpp>
+
+#define BOOST_TEST_MAIN
+#ifdef BOOST_LOCKFREE_INCLUDE_TESTS
+#include <boost/test/included/unit_test.hpp>
+#else
+#include <boost/test/unit_test.hpp>
+#endif
+
+#include "test_common.hpp"
+
+BOOST_AUTO_TEST_CASE( queue_test_bounded )
+{
+ typedef queue_stress_tester<true> tester_type;
+ boost::scoped_ptr<tester_type> tester(new tester_type(4, 4) );
+
+ boost::lockfree::queue<long> q(128);
+ tester->run(q);
+}
Added: trunk/libs/lockfree/test/queue_fixedsize_stress_test.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/lockfree/test/queue_fixedsize_stress_test.cpp 2012-07-11 14:39:17 EDT (Wed, 11 Jul 2012)
@@ -0,0 +1,20 @@
+#include <boost/lockfree/queue.hpp>
+
+#define BOOST_TEST_MAIN
+#ifdef BOOST_LOCKFREE_INCLUDE_TESTS
+#include <boost/test/included/unit_test.hpp>
+#else
+#include <boost/test/unit_test.hpp>
+#endif
+
+#include "test_common.hpp"
+
+
+BOOST_AUTO_TEST_CASE( queue_test_fixed_size )
+{
+ typedef queue_stress_tester<> tester_type;
+ boost::scoped_ptr<tester_type> tester(new tester_type(4, 4) );
+
+ boost::lockfree::queue<long, boost::lockfree::capacity<8> > q;
+ tester->run(q);
+}
Modified: trunk/libs/lockfree/test/queue_test.cpp
==============================================================================
--- trunk/libs/lockfree/test/queue_test.cpp (original)
+++ trunk/libs/lockfree/test/queue_test.cpp 2012-07-11 14:39:17 EDT (Wed, 11 Jul 2012)
@@ -14,11 +14,8 @@
#include <boost/test/unit_test.hpp>
#endif
-#include <iostream>
#include <memory>
-#include "test_common.hpp"
-
using namespace boost;
using namespace boost::lockfree;
using namespace std;
@@ -126,30 +123,3 @@
BOOST_REQUIRE(f.empty());
}
-
-BOOST_AUTO_TEST_CASE( queue_test_bounded )
-{
- typedef queue_stress_tester<true> tester_type;
- boost::scoped_ptr<tester_type> tester(new tester_type(4, 4) );
-
- boost::lockfree::queue<long> q(128);
- tester->run(q);
-}
-
-BOOST_AUTO_TEST_CASE( queue_test_unbounded )
-{
- typedef queue_stress_tester<false> tester_type;
- boost::scoped_ptr<tester_type> tester(new tester_type(4, 4) );
-
- boost::lockfree::queue<long> q(128);
- tester->run(q);
-}
-
-BOOST_AUTO_TEST_CASE( queue_test_fixed_size )
-{
- typedef queue_stress_tester<> tester_type;
- boost::scoped_ptr<tester_type> tester(new tester_type(4, 4) );
-
- boost::lockfree::queue<long, boost::lockfree::capacity<8> > q;
- tester->run(q);
-}
Added: trunk/libs/lockfree/test/queue_unbounded_stress_test.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/lockfree/test/queue_unbounded_stress_test.cpp 2012-07-11 14:39:17 EDT (Wed, 11 Jul 2012)
@@ -0,0 +1,19 @@
+#include <boost/lockfree/queue.hpp>
+
+#define BOOST_TEST_MAIN
+#ifdef BOOST_LOCKFREE_INCLUDE_TESTS
+#include <boost/test/included/unit_test.hpp>
+#else
+#include <boost/test/unit_test.hpp>
+#endif
+
+#include "test_common.hpp"
+
+BOOST_AUTO_TEST_CASE( queue_test_unbounded )
+{
+ typedef queue_stress_tester<false> tester_type;
+ boost::scoped_ptr<tester_type> tester(new tester_type(4, 4) );
+
+ boost::lockfree::queue<long> q(128);
+ tester->run(q);
+}
Added: trunk/libs/lockfree/test/stack_bounded_stress_test.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/lockfree/test/stack_bounded_stress_test.cpp 2012-07-11 14:39:17 EDT (Wed, 11 Jul 2012)
@@ -0,0 +1,19 @@
+#include <boost/lockfree/stack.hpp>
+
+#define BOOST_TEST_MAIN
+#ifdef BOOST_LOCKFREE_INCLUDE_TESTS
+#include <boost/test/included/unit_test.hpp>
+#else
+#include <boost/test/unit_test.hpp>
+#endif
+
+#include "test_common.hpp"
+
+BOOST_AUTO_TEST_CASE( stack_test_bounded )
+{
+ typedef queue_stress_tester<true> tester_type;
+ boost::scoped_ptr<tester_type> tester(new tester_type(4, 4) );
+
+ boost::lockfree::stack<long> q(128);
+ tester->run(q);
+}
Added: trunk/libs/lockfree/test/stack_fixedsize_stress_test.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/lockfree/test/stack_fixedsize_stress_test.cpp 2012-07-11 14:39:17 EDT (Wed, 11 Jul 2012)
@@ -0,0 +1,20 @@
+#include <boost/lockfree/stack.hpp>
+
+#define BOOST_TEST_MAIN
+#ifdef BOOST_LOCKFREE_INCLUDE_TESTS
+#include <boost/test/included/unit_test.hpp>
+#else
+#include <boost/test/unit_test.hpp>
+#endif
+
+#include "test_common.hpp"
+
+
+BOOST_AUTO_TEST_CASE( stack_test_fixed_size )
+{
+ typedef queue_stress_tester<> tester_type;
+ boost::scoped_ptr<tester_type> tester(new tester_type(4, 4) );
+
+ boost::lockfree::stack<long, boost::lockfree::capacity<8> > q;
+ tester->run(q);
+}
Modified: trunk/libs/lockfree/test/stack_test.cpp
==============================================================================
--- trunk/libs/lockfree/test/stack_test.cpp (original)
+++ trunk/libs/lockfree/test/stack_test.cpp 2012-07-11 14:39:17 EDT (Wed, 11 Jul 2012)
@@ -6,7 +6,6 @@
#include <boost/thread.hpp>
-#include <iostream>
#include <boost/lockfree/stack.hpp>
#define BOOST_TEST_MAIN
@@ -16,14 +15,6 @@
#include <boost/test/unit_test.hpp>
#endif
-
-#include "test_helpers.hpp"
-
-#include <cstdio>
-
-#include "test_common.hpp"
-
-
BOOST_AUTO_TEST_CASE( simple_stack_test )
{
boost::lockfree::stack<long> stk(128);
@@ -116,30 +107,3 @@
BOOST_REQUIRE(!stk.pop(out));
BOOST_REQUIRE(stk.empty());
}
-
-
-BOOST_AUTO_TEST_CASE( stack_test_bounded )
-{
- typedef queue_stress_tester<true> tester_type;
- boost::scoped_ptr<tester_type> tester(new tester_type(4, 4) );
- boost::lockfree::stack<long> stk(128);
- tester->run(stk);
-}
-
-BOOST_AUTO_TEST_CASE( stack_test_unbounded )
-{
- typedef queue_stress_tester<false> tester_type;
- boost::scoped_ptr<tester_type> tester(new tester_type(4, 4) );
-
- boost::lockfree::stack<long> stk(128);
- tester->run(stk);
-}
-
-BOOST_AUTO_TEST_CASE( stack_test_fixed_size )
-{
- typedef queue_stress_tester<> tester_type;
- boost::scoped_ptr<tester_type> tester(new tester_type(4, 4) );
-
- boost::lockfree::stack<long, boost::lockfree::capacity<8> > stk;
- tester->run(stk);
-}
Added: trunk/libs/lockfree/test/stack_unbounded_stress_test.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/lockfree/test/stack_unbounded_stress_test.cpp 2012-07-11 14:39:17 EDT (Wed, 11 Jul 2012)
@@ -0,0 +1,20 @@
+#include <boost/lockfree/stack.hpp>
+
+#define BOOST_TEST_MAIN
+#ifdef BOOST_LOCKFREE_INCLUDE_TESTS
+#include <boost/test/included/unit_test.hpp>
+#else
+#include <boost/test/unit_test.hpp>
+#endif
+
+#include "test_common.hpp"
+
+
+BOOST_AUTO_TEST_CASE( stack_test_unbounded )
+{
+ typedef queue_stress_tester<false> tester_type;
+ boost::scoped_ptr<tester_type> tester(new tester_type(4, 4) );
+
+ boost::lockfree::stack<long> q(128);
+ tester->run(q);
+}
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