queue_unbounded_stress_test.cpp 683 B

123456789101112131415161718192021222324252627
  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. #include <boost/lockfree/queue.hpp>
  7. #include <boost/scoped_ptr.hpp>
  8. #define BOOST_TEST_MAIN
  9. #ifdef BOOST_LOCKFREE_INCLUDE_TESTS
  10. #include <boost/test/included/unit_test.hpp>
  11. #else
  12. #include <boost/test/unit_test.hpp>
  13. #endif
  14. #include "test_common.hpp"
  15. BOOST_AUTO_TEST_CASE( queue_test_unbounded )
  16. {
  17. typedef queue_stress_tester<false> tester_type;
  18. boost::scoped_ptr<tester_type> tester(new tester_type(4, 4) );
  19. boost::lockfree::queue<long> q(128);
  20. tester->run(q);
  21. }