From 5e44f5974aa4d6b1149f1b3b7284775460ff4cc8 Mon Sep 17 00:00:00 2001 From: Tobias Fuchs Date: Thu, 26 Mar 2015 02:31:43 +0100 Subject: [PATCH] containers_cpp: activated unit tests on Multiset --- containers_cpp/include/embb/containers/multiset.h | 4 ++-- containers_cpp/test/llx_scx_test.h | 2 +- containers_cpp/test/main.cc | 3 +++ containers_cpp/test/multiset_test.cc | 4 ---- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/containers_cpp/include/embb/containers/multiset.h b/containers_cpp/include/embb/containers/multiset.h index fff7cc3..a094c91 100644 --- a/containers_cpp/include/embb/containers/multiset.h +++ b/containers_cpp/include/embb/containers/multiset.h @@ -71,7 +71,7 @@ class Multiset { private: typedef primitives::LlxScxRecord< internal::MultisetNode > node_t; typedef primitives::LlxScxRecord< internal::MultisetNode > * node_ptr_t; - static const size_t UNDEFINED_POINTER = static_cast(0); + static const node_ptr_t UNDEFINED_POINTER; static const size_t NUM_LLX_SCX_LINKS = 3; public: @@ -97,7 +97,7 @@ class Multiset { ObjectPool< node_t, ValuePool > node_pool_; node_ptr_t head_; node_ptr_t tail_; - primitives::LlxScx< MultisetNode > llx_scx_; + primitives::LlxScx< internal::MultisetNode > llx_scx_; }; } // namespace containers diff --git a/containers_cpp/test/llx_scx_test.h b/containers_cpp/test/llx_scx_test.h index ef3699f..3228c1f 100644 --- a/containers_cpp/test/llx_scx_test.h +++ b/containers_cpp/test/llx_scx_test.h @@ -92,7 +92,7 @@ class LlxScxTest : public partest::TestCase { void ParallelTest(); int num_threads_; - LlxScx llxscx_; + primitives::LlxScx llxscx_; Node tail; Node head; }; diff --git a/containers_cpp/test/main.cc b/containers_cpp/test/main.cc index 6ee68d4..b5bb09f 100644 --- a/containers_cpp/test/main.cc +++ b/containers_cpp/test/main.cc @@ -41,6 +41,7 @@ #include "./hazard_pointer_test.h" #include "./object_pool_test.h" #include "./llx_scx_test.h" +#include "./multiset_test.h" #define COMMA , @@ -57,6 +58,7 @@ using embb::containers::test::QueueTest; using embb::containers::test::StackTest; using embb::containers::test::ObjectPoolTest; using embb::containers::test::LlxScxTest; +using embb::containers::test::MultisetTest; PT_MAIN("Data Structures C++") { unsigned int max_threads = static_cast( @@ -73,6 +75,7 @@ PT_MAIN("Data Structures C++") { PT_RUN(ObjectPoolTest< LockFreeTreeValuePool >); PT_RUN(ObjectPoolTest< WaitFreeArrayValuePool >); PT_RUN(LlxScxTest); + PT_RUN(MultisetTest); PT_EXPECT(embb_get_bytes_allocated() == 0); } diff --git a/containers_cpp/test/multiset_test.cc b/containers_cpp/test/multiset_test.cc index c0a19fa..0d20f13 100644 --- a/containers_cpp/test/multiset_test.cc +++ b/containers_cpp/test/multiset_test.cc @@ -24,8 +24,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#if 0 - #include #include @@ -58,5 +56,3 @@ void MultisetTest::SerialTest() { } // namespace test } // namespace containers } // namespace embb - -#endif -- libgit2 0.26.0