diff options
author | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
commit | dd7595a3475407a7fa96a97393bae8c5220e8762 (patch) | |
tree | e341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/ecore/src/tests/ecore_test_ecore_x.c | |
parent | Add the skeleton. (diff) | |
download | SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2 SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz |
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.
Diffstat (limited to '')
-rw-r--r-- | libraries/ecore/src/tests/ecore_test_ecore_x.c | 56 |
1 files changed, 56 insertions, 0 deletions
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 @@ | |||
1 | #ifdef HAVE_CONFIG_H | ||
2 | # include <config.h> | ||
3 | #endif | ||
4 | |||
5 | #include <Ecore_X.h> | ||
6 | |||
7 | #include "ecore_suite.h" | ||
8 | |||
9 | |||
10 | /* TODO: change to HAVE_ECORE_X when xcb implementation is done */ | ||
11 | #ifdef HAVE_ECORE_X_XLIB | ||
12 | |||
13 | START_TEST(ecore_test_ecore_x_init) | ||
14 | { | ||
15 | int ret; | ||
16 | |||
17 | ret = ecore_x_init(NULL); | ||
18 | fail_if(ret != 1); | ||
19 | |||
20 | ret = ecore_x_shutdown(); | ||
21 | fail_if(ret != 0); | ||
22 | } | ||
23 | END_TEST | ||
24 | |||
25 | START_TEST(ecore_test_ecore_x_bell) | ||
26 | { | ||
27 | int i; | ||
28 | int ret; | ||
29 | |||
30 | ret = ecore_x_init(NULL); | ||
31 | fail_if(ret != 1); | ||
32 | |||
33 | printf("You should hear 3 beeps now.\n"); | ||
34 | for (i = 0; i < 3; i++) | ||
35 | { | ||
36 | ret = ecore_x_bell(0); | ||
37 | fail_if(ret != EINA_TRUE); | ||
38 | ecore_x_sync(); | ||
39 | sleep(1); | ||
40 | } | ||
41 | |||
42 | ecore_x_shutdown(); | ||
43 | } | ||
44 | END_TEST | ||
45 | |||
46 | #endif | ||
47 | |||
48 | void ecore_test_ecore_x(TCase *tc) | ||
49 | { | ||
50 | |||
51 | /* TODO: change to HAVE_ECORE_X when xcb implementation is done */ | ||
52 | #ifdef HAVE_ECORE_X_XLIB | ||
53 | tcase_add_test(tc, ecore_test_ecore_x_init); | ||
54 | tcase_add_test(tc, ecore_test_ecore_x_bell); | ||
55 | #endif | ||
56 | } | ||