forked from enlightenment/efl
this variable tells that the build is being done in tree and we should not look at install locations. SVN revision: 82217devs/devilhorns/wayland_egl
parent
365a4acf97
commit
733425c62c
27 changed files with 445 additions and 53 deletions
@ -0,0 +1,2 @@ |
||||
This is just a test file used to help ecore_imf determine its prefix |
||||
location. |
@ -0,0 +1,2 @@ |
||||
This is just a test file used to help eeze determine its prefix |
||||
location. |
@ -0,0 +1,85 @@ |
||||
#ifdef HAVE_CONFIG_H |
||||
# include <config.h> |
||||
#endif |
||||
|
||||
#include <Ecore_IMF.h> |
||||
|
||||
#include "ecore_suite.h" |
||||
|
||||
START_TEST(ecore_test_ecore_imf_init) |
||||
{ |
||||
ecore_imf_init(); |
||||
ecore_imf_shutdown(); |
||||
} |
||||
END_TEST |
||||
|
||||
static const char *built_modules[] = { |
||||
#ifdef ENABLE_XIM |
||||
"xim", |
||||
#endif |
||||
#ifdef BUILD_ECORE_IMF_IBUS |
||||
"ibus", |
||||
#endif |
||||
#ifdef BUILD_ECORE_IMF_SCIM |
||||
"scim", |
||||
#endif |
||||
NULL |
||||
}; |
||||
|
||||
static Eina_Bool |
||||
_find_list(const Eina_List *lst, const char *item) |
||||
{ |
||||
const Eina_List *n; |
||||
const char *s; |
||||
EINA_LIST_FOREACH(lst, n, s) |
||||
{ |
||||
if (strcmp(s, item) == 0) |
||||
return EINA_TRUE; |
||||
} |
||||
return EINA_FALSE; |
||||
} |
||||
|
||||
START_TEST(ecore_test_ecore_imf_modules) |
||||
{ |
||||
Eina_List *modules; |
||||
const char **itr; |
||||
|
||||
ecore_imf_init(); |
||||
modules = ecore_imf_context_available_ids_get(); |
||||
|
||||
for (itr = built_modules; *itr != NULL; itr++) |
||||
{ |
||||
Eina_Bool found = _find_list(modules, *itr); |
||||
fail_if(!found, "imf module should be built, but was not found: %s", |
||||
*itr); |
||||
} |
||||
|
||||
eina_list_free(modules); |
||||
ecore_imf_shutdown(); |
||||
} |
||||
END_TEST |
||||
|
||||
START_TEST(ecore_test_ecore_imf_modules_load) |
||||
{ |
||||
Eina_List *modules; |
||||
const char **itr; |
||||
|
||||
ecore_imf_init(); |
||||
|
||||
for (itr = built_modules; *itr != NULL; itr++) |
||||
{ |
||||
Ecore_IMF_Context *ctx = ecore_imf_context_add(*itr); |
||||
fail_if(ctx == NULL, "could not add imf context: %s", *itr); |
||||
ecore_imf_context_del(ctx); |
||||
} |
||||
|
||||
ecore_imf_shutdown(); |
||||
} |
||||
END_TEST |
||||
|
||||
void ecore_test_ecore_imf(TCase *tc) |
||||
{ |
||||
tcase_add_test(tc, ecore_test_ecore_imf_init); |
||||
tcase_add_test(tc, ecore_test_ecore_imf_modules); |
||||
tcase_add_test(tc, ecore_test_ecore_imf_modules_load); |
||||
} |
@ -0,0 +1,84 @@ |
||||
#ifdef HAVE_CONFIG_H |
||||
# include "config.h" |
||||
#endif |
||||
|
||||
#include <stdio.h> |
||||
|
||||
#include "evas_suite.h" |
||||
#include "Evas.h" |
||||
|
||||
static Eina_Bool |
||||
_find_list(const Eina_List *lst, const char *item) |
||||
{ |
||||
const Eina_List *n; |
||||
const char *s; |
||||
EINA_LIST_FOREACH(lst, n, s) |
||||
{ |
||||
if (strcmp(s, item) == 0) |
||||
return EINA_TRUE; |
||||
} |
||||
return EINA_FALSE; |
||||
} |
||||
|
||||
static const char *built_engines[] = { |
||||
"software_generic", |
||||
"buffer", |
||||
#ifdef BUILD_ENGINE_FB |
||||
"fb", |
||||
#endif |
||||
#ifdef BUILD_ENGINE_GL_X11 |
||||
"gl_x11", |
||||
#endif |
||||
#ifdef BUILD_ENGINE_PSL1GHT |
||||
"psl1ght", |
||||
#endif |
||||
#ifdef BUILD_ENGINE_SOFTWARE_DDRAW |
||||
"software_ddraw", |
||||
#endif |
||||
#ifdef BUILD_ENGINE_SOFTWARE_GDI |
||||
"software_gdi", |
||||
#endif |
||||
#ifdef BUILD_ENGINE_SOFTWARE_X11 |
||||
"software_x11", |
||||
#endif |
||||
#ifdef BUILD_ENGINE_WAYLAND_EGL |
||||
"wayland_egl", |
||||
#endif |
||||
#ifdef BUILD_ENGINE_WAYLAND_SHM |
||||
"wayland_shm", |
||||
#endif |
||||
NULL |
||||
}; |
||||
|
||||
START_TEST(evas_render_engines) |
||||
{ |
||||
Eina_List *lst = evas_render_method_list(); |
||||
const char **itr; |
||||
|
||||
for (itr = built_engines; *itr != NULL; itr++) |
||||
{ |
||||
Eina_Bool found = _find_list(lst, *itr); |
||||
fail_if(!found, "module should be built, but was not found: %s", *itr); |
||||
} |
||||
|
||||
evas_render_method_list_free(lst); |
||||
} |
||||
END_TEST |
||||
|
||||
START_TEST(evas_render_lookup) |
||||
{ |
||||
const char **itr; |
||||
|
||||
for (itr = built_engines; *itr != NULL; itr++) |
||||
{ |
||||
int id = evas_render_method_lookup(*itr); |
||||
fail_if(id == 0, "could not load engine: %s", *itr); |
||||
} |
||||
} |
||||
END_TEST |
||||
|
||||
void evas_test_render_engines(TCase *tc) |
||||
{ |
||||
tcase_add_test(tc, evas_render_engines); |
||||
tcase_add_test(tc, evas_render_lookup); |
||||
} |
Loading…
Reference in new issue