Commit 0deb6bf8 by lucapegolotti

containers_cpp: minor problems fix in blocking container tests

parent 173916a8
...@@ -104,7 +104,7 @@ void BlockingContainerTest<Container_t>::BlockingContainerTest1_ThreadMethod() { ...@@ -104,7 +104,7 @@ void BlockingContainerTest<Container_t>::BlockingContainerTest1_ThreadMethod() {
for (std::vector<int>::iterator it = my_elements.begin(); for (std::vector<int>::iterator it = my_elements.begin();
it != my_elements.end(); it != my_elements.end();
++it) { ++it) {
SpecializezdPush(*it); SpecializedPush(*it);
} }
my_elements.clear(); my_elements.clear();
......
...@@ -35,7 +35,7 @@ namespace containers { ...@@ -35,7 +35,7 @@ namespace containers {
namespace test { namespace test {
template<typename Container_t> template<typename Container_t>
class BlockingContainerTest : public partest::TestCase { class BlockingContainerTest : public partest::TestCase {
private: protected:
int n_threads; int n_threads;
int n_iterations; int n_iterations;
int n_container_elements_per_thread; int n_container_elements_per_thread;
...@@ -44,6 +44,10 @@ class BlockingContainerTest : public partest::TestCase { ...@@ -44,6 +44,10 @@ class BlockingContainerTest : public partest::TestCase {
std::vector<int> expected_container_elements; std::vector<int> expected_container_elements;
std::vector<int>* thread_local_vectors; std::vector<int>* thread_local_vectors;
virtual void SpecializedPush(const int& element) = 0;
virtual void SpecializedPop(int& element) = 0;
public: public:
BlockingContainerTest(); BlockingContainerTest();
...@@ -53,11 +57,6 @@ class BlockingContainerTest : public partest::TestCase { ...@@ -53,11 +57,6 @@ class BlockingContainerTest : public partest::TestCase {
void BlockingContainerTest1_ThreadMethod(); void BlockingContainerTest1_ThreadMethod();
protected:
virtual void SpecializedPush(const int& element) = 0;
virtual void SpecializedPop(int& element) = 0;
}; };
} // namespace test } // namespace test
} // namespace containers } // namespace containers
......
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