Commit 5dbaeaed by Tobias Fuchs

containers_cpp: fixed cpplint warnings

parent 3ab938a6
...@@ -24,6 +24,14 @@ ...@@ -24,6 +24,14 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <embb/containers/lock_free_tree_value_pool.h>
#include <embb/containers/wait_free_array_value_pool.h>
#include <embb/containers/wait_free_spsc_queue.h>
#include <embb/containers/object_pool.h>
#include <embb/containers/lock_free_stack.h>
#include <embb/containers/lock_free_mpmc_queue.h>
#include <embb/base/c/memory_allocation.h>
#include <partest/partest.h> #include <partest/partest.h>
#include <embb/base/thread.h> #include <embb/base/thread.h>
...@@ -32,14 +40,6 @@ ...@@ -32,14 +40,6 @@
#include "./stack_test.h" #include "./stack_test.h"
#include "./hazard_pointer_test.h" #include "./hazard_pointer_test.h"
#include "./object_pool_test.h" #include "./object_pool_test.h"
#include <embb/containers/lock_free_tree_value_pool.h>
#include <embb/containers/wait_free_array_value_pool.h>
#include <embb/containers/wait_free_spsc_queue.h>
#include <embb/containers/object_pool.h>
#include <embb/containers/lock_free_stack.h>
#include <embb/containers/lock_free_mpmc_queue.h>
#include <embb/base/c/memory_allocation.h>
#define COMMA , #define COMMA ,
......
...@@ -108,7 +108,8 @@ QueueTestOrderMPMC_Post() { ...@@ -108,7 +108,8 @@ QueueTestOrderMPMC_Post() {
// Tally for all elements enqueued by all producers, // Tally for all elements enqueued by all producers,
// initialized with all 0: // initialized with all 0:
::std::vector<unsigned char> total_tally; ::std::vector<unsigned char> total_tally;
size_t n_elements_total = static_cast<size_t>(n_producers * n_producer_elements); size_t n_elements_total = static_cast<size_t>(
n_producers * n_producer_elements);
for (size_t i = 0; i < n_elements_total / 8; ++i) { for (size_t i = 0; i < n_elements_total / 8; ++i) {
total_tally.push_back(0); total_tally.push_back(0);
} }
...@@ -298,6 +299,7 @@ void QueueTest<Queue_t, MultipleProducers, MultipleConsumers>:: ...@@ -298,6 +299,7 @@ void QueueTest<Queue_t, MultipleProducers, MultipleConsumers>::
QueueTestSingleThreadEnqueueDequeue_Post() { QueueTestSingleThreadEnqueueDequeue_Post() {
delete queue; delete queue;
} }
} // namespace test } // namespace test
} // namespace containers } // namespace containers
} // namespace embb } // namespace embb
......
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
#ifndef CONTAINERS_CPP_TEST_QUEUE_TEST_H_ #ifndef CONTAINERS_CPP_TEST_QUEUE_TEST_H_
#define CONTAINERS_CPP_TEST_QUEUE_TEST_H_ #define CONTAINERS_CPP_TEST_QUEUE_TEST_H_
#include <vector>
#include <utility>
#include <partest/partest.h> #include <partest/partest.h>
#include <embb/base/duration.h> #include <embb/base/duration.h>
#include <vector>
#include <utility>
namespace embb { namespace embb {
namespace containers { namespace containers {
...@@ -41,6 +41,7 @@ template<typename Queue_t, ...@@ -41,6 +41,7 @@ template<typename Queue_t,
class QueueTest : public partest::TestCase { class QueueTest : public partest::TestCase {
public: public:
typedef ::std::pair<size_t, int> element_t; typedef ::std::pair<size_t, int> element_t;
private: private:
/// Minimum number of elements enqueued by every producer /// Minimum number of elements enqueued by every producer
/// in MP/MC unit test. Must be a multiple of 8. /// in MP/MC unit test. Must be a multiple of 8.
......
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