From dd7595a3475407a7fa96a97393bae8c5220e8762 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Wed, 4 Jan 2012 18:41:13 +1000 Subject: Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje. Note that embryo wont be used, but I'm not sure yet if you can build edje without it. --- libraries/ecore/src/tests/ecore_test_ecore_x.c | 56 ++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 libraries/ecore/src/tests/ecore_test_ecore_x.c (limited to 'libraries/ecore/src/tests/ecore_test_ecore_x.c') diff --git a/libraries/ecore/src/tests/ecore_test_ecore_x.c b/libraries/ecore/src/tests/ecore_test_ecore_x.c new file mode 100644 index 0000000..4b9e126 --- /dev/null +++ b/libraries/ecore/src/tests/ecore_test_ecore_x.c @@ -0,0 +1,56 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include "ecore_suite.h" + + +/* TODO: change to HAVE_ECORE_X when xcb implementation is done */ +#ifdef HAVE_ECORE_X_XLIB + +START_TEST(ecore_test_ecore_x_init) +{ + int ret; + + ret = ecore_x_init(NULL); + fail_if(ret != 1); + + ret = ecore_x_shutdown(); + fail_if(ret != 0); +} +END_TEST + +START_TEST(ecore_test_ecore_x_bell) +{ + int i; + int ret; + + ret = ecore_x_init(NULL); + fail_if(ret != 1); + + printf("You should hear 3 beeps now.\n"); + for (i = 0; i < 3; i++) + { + ret = ecore_x_bell(0); + fail_if(ret != EINA_TRUE); + ecore_x_sync(); + sleep(1); + } + + ecore_x_shutdown(); +} +END_TEST + +#endif + +void ecore_test_ecore_x(TCase *tc) +{ + +/* TODO: change to HAVE_ECORE_X when xcb implementation is done */ +#ifdef HAVE_ECORE_X_XLIB + tcase_add_test(tc, ecore_test_ecore_x_init); + tcase_add_test(tc, ecore_test_ecore_x_bell); +#endif +} -- cgit v1.1