cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d13f16b0e2534571ff3a8c4dc2a8cd34ae3e60a8
commit d13f16b0e2534571ff3a8c4dc2a8cd34ae3e60a8 Author: kabeer khan <kabeer.k...@samsung.com> Date: Wed Sep 10 12:45:50 2014 +0200 eina: resolved TODO in eina tests - added delete array list Summary: Signed-off-by: kabeer khan <kabeer.k...@samsung.com> Reviewers: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1428 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/tests/eina/eina_suite.c | 10 ++++++++-- src/tests/eina/eina_test_mempool.c | 10 +++++++++- src/tests/eina/eina_test_module.c | 9 +++++++-- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/tests/eina/eina_suite.c b/src/tests/eina/eina_suite.c index a386ae1..8ed038a 100644 --- a/src/tests/eina/eina_suite.c +++ b/src/tests/eina/eina_suite.c @@ -142,10 +142,16 @@ static void _mempool_init(void) static void _mempool_shutdown(void) { + unsigned int i; + Eina_Array_Iterator it; + Eina_Module *module; eina_module_list_free(_modules); if (_modules) - eina_array_free(_modules); - /* TODO delete the list */ + { + EINA_ARRAY_ITER_NEXT(_modules, i, module, it) + free(module); + eina_array_free(_modules); + } eina_shutdown(); } diff --git a/src/tests/eina/eina_test_mempool.c b/src/tests/eina/eina_test_mempool.c index 7106afa..bdcd295 100644 --- a/src/tests/eina/eina_test_mempool.c +++ b/src/tests/eina/eina_test_mempool.c @@ -41,8 +41,16 @@ _mempool_init(void) static void _mempool_shutdown(void) { + unsigned int i; + Eina_Array_Iterator it; + Eina_Module *module; eina_module_list_free(_modules); - /* TODO delete the list */ + if (_modules) + { + EINA_ARRAY_ITER_NEXT(_modules, i, module, it) + free(module); + eina_array_free(_modules); + } eina_shutdown(); } diff --git a/src/tests/eina/eina_test_module.c b/src/tests/eina/eina_test_module.c index 7dd14b0..018e062 100644 --- a/src/tests/eina/eina_test_module.c +++ b/src/tests/eina/eina_test_module.c @@ -47,7 +47,10 @@ static Eina_Bool list_cb(Eina_Module *m, void *data EINA_UNUSED) START_TEST(eina_module_load_unload) { Eina_Array *_modules; - + unsigned int i; + Eina_Array_Iterator it; + Eina_Module *module; + eina_init(); _modules = eina_module_list_get(NULL, PACKAGE_BUILD_DIR "/src/tests/", @@ -58,7 +61,9 @@ START_TEST(eina_module_load_unload) eina_module_list_load(_modules); eina_module_list_unload(_modules); eina_module_list_free(_modules); - /* TODO delete the list */ + EINA_ARRAY_ITER_NEXT(_modules, i, module, it) + free(module); + eina_array_free(_modules); eina_shutdown(); } END_TEST --