1 | // Copyright (C) 2011 Tim Blechmann |
---|---|
2 | // |
3 | // Distributed under the Boost Software License, Version 1.0. (See |
4 | // accompanying file LICENSE_1_0.txt or copy at |
5 | // http://www.boost.org/LICENSE_1_0.txt) |
6 | |
7 | #include <boost/lockfree/stack.hpp> |
8 | |
9 | #include <boost/scoped_ptr.hpp> |
10 | |
11 | #define BOOST_TEST_MAIN |
12 | #ifdef BOOST_LOCKFREE_INCLUDE_TESTS |
13 | #include <boost/test/included/unit_test.hpp> |
14 | #else |
15 | #include <boost/test/unit_test.hpp> |
16 | #endif |
17 | |
18 | #include "test_common.hpp" |
19 | |
20 | |
21 | BOOST_AUTO_TEST_CASE( stack_test_unbounded ) |
22 | { |
23 | typedef queue_stress_tester<false> tester_type; |
24 | boost::scoped_ptr<tester_type> tester(new tester_type(4, 4) ); |
25 | |
26 | boost::lockfree::stack<long> q(128); |
27 | tester->run(stk&: q); |
28 | } |
29 |