diff --git a/containers_cpp/test/main.cc b/containers_cpp/test/main.cc index 4aff866..07fa628 100644 --- a/containers_cpp/test/main.cc +++ b/containers_cpp/test/main.cc @@ -24,6 +24,14 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include +#include +#include +#include +#include +#include +#include + #include #include @@ -32,44 +40,36 @@ #include "./stack_test.h" #include "./hazard_pointer_test.h" #include "./object_pool_test.h" -#include -#include -#include -#include -#include -#include - -#include #define COMMA , +using embb::containers::WaitFreeArrayValuePool; +using embb::containers::LockFreeTreeValuePool; +using embb::containers::WaitFreeSPSCQueue; +using embb::containers::LockFreeMPMCQueue; +using embb::containers::LockFreeStack; +using embb::containers::LockFreeTreeValuePool; +using embb::containers::WaitFreeArrayValuePool; +using embb::containers::test::PoolTest; +using embb::containers::test::HazardPointerTest; +using embb::containers::test::QueueTest; +using embb::containers::test::StackTest; +using embb::containers::test::ObjectPoolTest; + PT_MAIN("Data Structures C++") { - unsigned int max_threads = - static_cast(2 * partest::TestSuite::GetDefaultNumThreads()); + unsigned int max_threads = static_cast( + 2 * partest::TestSuite::GetDefaultNumThreads()); embb_thread_set_max_count(max_threads); - PT_RUN(embb::containers::test::PoolTest< - embb::containers::WaitFreeArrayValuePool >); - PT_RUN(embb::containers::test::PoolTest< - embb::containers::LockFreeTreeValuePool >); - - PT_RUN(embb::containers::test::HazardPointerTest); - - PT_RUN(embb::containers::test::QueueTest< - embb::containers::WaitFreeSPSCQueue< ::std::pair > >); - - PT_RUN(embb::containers::test::QueueTest< - embb::containers::LockFreeMPMCQueue< ::std::pair > + PT_RUN(PoolTest< WaitFreeArrayValuePool >); + PT_RUN(PoolTest< LockFreeTreeValuePool >); + PT_RUN(HazardPointerTest); + PT_RUN(QueueTest< WaitFreeSPSCQueue< ::std::pair > >); + PT_RUN(QueueTest< LockFreeMPMCQueue< ::std::pair > COMMA true COMMA true >); - - PT_RUN(embb::containers::test::StackTest< - embb::containers::LockFreeStack >); - - PT_RUN(embb::containers::test::ObjectPoolTest - >); - - PT_RUN(embb::containers::test::ObjectPoolTest - >); + PT_RUN(StackTest< LockFreeStack >); + PT_RUN(ObjectPoolTest< LockFreeTreeValuePool >); + PT_RUN(ObjectPoolTest< WaitFreeArrayValuePool >); PT_EXPECT(embb_get_bytes_allocated() == 0); }