diff --git a/mtapi_c/test/embb_mtapi_test_id_pool.cc b/mtapi_c/test/embb_mtapi_test_id_pool.cc index a3d267c..1376d31 100644 --- a/mtapi_c/test/embb_mtapi_test_id_pool.cc +++ b/mtapi_c/test/embb_mtapi_test_id_pool.cc @@ -25,6 +25,7 @@ */ #include +#include IdPoolTest::IdPoolTest() { CreateUnit("mtapi id pool test single threaded"). @@ -58,7 +59,7 @@ void IdPoolTest::TestParallelPost() { // elements sequentially. TestAllocateDeallocateNElementsFromPool(id_pool_parallel, concurrent_accessors_id_pool_2*id_elements_per_accessor, true); - + // finalize pool embb_mtapi_id_pool_finalize(&id_pool_parallel); } @@ -79,7 +80,7 @@ void IdPoolTest::TestBasicPost() { void IdPoolTest::TestAllocateDeallocateNElementsFromPool( embb_mtapi_id_pool_t &pool, - int count_elements, + int count_elements, bool empty_check) { std::vector allocated; @@ -112,7 +113,7 @@ void IdPoolTest::TestAllocateDeallocateNElementsFromPool( ::std::random_shuffle(allocated.begin(), allocated.end()); for (int i = 0; i != count_elements; ++i) { - embb_mtapi_id_pool_deallocate(&pool, + embb_mtapi_id_pool_deallocate(&pool, allocated[static_cast(i)]); } } diff --git a/mtapi_c/test/embb_mtapi_test_id_pool.h b/mtapi_c/test/embb_mtapi_test_id_pool.h index 3bc3c0f..0fa80d7 100644 --- a/mtapi_c/test/embb_mtapi_test_id_pool.h +++ b/mtapi_c/test/embb_mtapi_test_id_pool.h @@ -41,11 +41,10 @@ class IdPoolTest : public partest::TestCase { IdPoolTest(); private: - static const unsigned int id_pool_size_1 = 100; static const unsigned int concurrent_accessors_id_pool_2 = 10; static const unsigned int id_elements_per_accessor = 10; - + /** * We create a pool of size number_accessors*elements_per_accessor, so * at each time we can guarantee each thread to be able to allocate @@ -72,7 +71,7 @@ class IdPoolTest : public partest::TestCase { static void TestAllocateDeallocateNElementsFromPool( embb_mtapi_id_pool_t &pool, - int count_elements, + int count_elements, bool empty_check = false); };