Commit 5e44f597 by Tobias Fuchs

containers_cpp: activated unit tests on Multiset

parent 29e2079e
...@@ -71,7 +71,7 @@ class Multiset { ...@@ -71,7 +71,7 @@ class Multiset {
private: private:
typedef primitives::LlxScxRecord< internal::MultisetNode<Type> > node_t; typedef primitives::LlxScxRecord< internal::MultisetNode<Type> > node_t;
typedef primitives::LlxScxRecord< internal::MultisetNode<Type> > * node_ptr_t; typedef primitives::LlxScxRecord< internal::MultisetNode<Type> > * node_ptr_t;
static const size_t UNDEFINED_POINTER = static_cast<node_ptr_t>(0); static const node_ptr_t UNDEFINED_POINTER;
static const size_t NUM_LLX_SCX_LINKS = 3; static const size_t NUM_LLX_SCX_LINKS = 3;
public: public:
...@@ -97,7 +97,7 @@ class Multiset { ...@@ -97,7 +97,7 @@ class Multiset {
ObjectPool< node_t, ValuePool > node_pool_; ObjectPool< node_t, ValuePool > node_pool_;
node_ptr_t head_; node_ptr_t head_;
node_ptr_t tail_; node_ptr_t tail_;
primitives::LlxScx< MultisetNode<Type> > llx_scx_; primitives::LlxScx< internal::MultisetNode<Type> > llx_scx_;
}; };
} // namespace containers } // namespace containers
......
...@@ -92,7 +92,7 @@ class LlxScxTest : public partest::TestCase { ...@@ -92,7 +92,7 @@ class LlxScxTest : public partest::TestCase {
void ParallelTest(); void ParallelTest();
int num_threads_; int num_threads_;
LlxScx<Node> llxscx_; primitives::LlxScx<Node> llxscx_;
Node tail; Node tail;
Node head; Node head;
}; };
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include "./hazard_pointer_test.h" #include "./hazard_pointer_test.h"
#include "./object_pool_test.h" #include "./object_pool_test.h"
#include "./llx_scx_test.h" #include "./llx_scx_test.h"
#include "./multiset_test.h"
#define COMMA , #define COMMA ,
...@@ -57,6 +58,7 @@ using embb::containers::test::QueueTest; ...@@ -57,6 +58,7 @@ using embb::containers::test::QueueTest;
using embb::containers::test::StackTest; using embb::containers::test::StackTest;
using embb::containers::test::ObjectPoolTest; using embb::containers::test::ObjectPoolTest;
using embb::containers::test::LlxScxTest; using embb::containers::test::LlxScxTest;
using embb::containers::test::MultisetTest;
PT_MAIN("Data Structures C++") { PT_MAIN("Data Structures C++") {
unsigned int max_threads = static_cast<unsigned int>( unsigned int max_threads = static_cast<unsigned int>(
...@@ -73,6 +75,7 @@ PT_MAIN("Data Structures C++") { ...@@ -73,6 +75,7 @@ PT_MAIN("Data Structures C++") {
PT_RUN(ObjectPoolTest< LockFreeTreeValuePool<bool COMMA false > >); PT_RUN(ObjectPoolTest< LockFreeTreeValuePool<bool COMMA false > >);
PT_RUN(ObjectPoolTest< WaitFreeArrayValuePool<bool COMMA false> >); PT_RUN(ObjectPoolTest< WaitFreeArrayValuePool<bool COMMA false> >);
PT_RUN(LlxScxTest); PT_RUN(LlxScxTest);
PT_RUN(MultisetTest);
PT_EXPECT(embb_get_bytes_allocated() == 0); PT_EXPECT(embb_get_bytes_allocated() == 0);
} }
...@@ -24,8 +24,6 @@ ...@@ -24,8 +24,6 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#if 0
#include <multiset_test.h> #include <multiset_test.h>
#include <embb/containers/multiset.h> #include <embb/containers/multiset.h>
...@@ -58,5 +56,3 @@ void MultisetTest::SerialTest() { ...@@ -58,5 +56,3 @@ void MultisetTest::SerialTest() {
} // namespace test } // namespace test
} // namespace containers } // namespace containers
} // namespace embb } // namespace embb
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment