1
/* EINA - EFL data type library
2
* Copyright (C) 2008 Cedric Bail
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2.1 of the License, or (at your option) any later version.
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this library;
16
* if not, see <http://www.gnu.org/licenses/>.
27
#include "eina_suite.h"
29
static Eina_Bool list_cb(Eina_Module *m, void *data EINA_UNUSED)
34
/* the reference count */
35
fail_if(!eina_module_load(m));
37
sym = eina_module_symbol_get(m, "dummy_symbol");
39
fail_if(*sym != 0xbad);
40
file = eina_module_file_get(m);
42
fail_if(eina_module_unload(m));
48
EFL_START_TEST(eina_module_load_unload)
52
Eina_Array_Iterator it;
55
_modules = eina_module_list_get(NULL,
56
PACKAGE_BUILD_DIR "/src/tests/eina",
61
eina_module_list_load(_modules);
62
eina_module_list_unload(_modules);
63
eina_module_list_free(_modules);
64
EINA_ARRAY_ITER_NEXT(_modules, i, module, it)
66
eina_array_free(_modules);
70
EFL_START_TEST(eina_module_find_test)
74
_modules = eina_module_list_get(NULL,
75
PACKAGE_BUILD_DIR "/src/tests/eina",
80
fail_if(eina_module_find(_modules, NULL) != NULL);
85
eina_test_module(TCase *tc)
87
tcase_add_test(tc, eina_module_load_unload);
88
tcase_add_test(tc, eina_module_find_test);