summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_ecore_evas.c
diff options
context:
space:
mode:
authorDmytro Kaidalov <d.kaidalov@samsung.com>2013-04-12 10:45:05 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-04-12 10:46:47 +0900
commitfc0d46411c750cb8a3804c3808606facbeb19211 (patch)
treeae87241c23f0da14c4ea05fb7358098aeedb1e44 /src/tests/ecore/ecore_test_ecore_evas.c
parentb3159a889ca4a46f7512bcd462af442aae4a540f (diff)
ecore: add tests for Ecore_Evas.
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
Diffstat (limited to 'src/tests/ecore/ecore_test_ecore_evas.c')
-rw-r--r--src/tests/ecore/ecore_test_ecore_evas.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/tests/ecore/ecore_test_ecore_evas.c b/src/tests/ecore/ecore_test_ecore_evas.c
new file mode 100644
index 0000000..e590a68
--- /dev/null
+++ b/src/tests/ecore/ecore_test_ecore_evas.c
@@ -0,0 +1,42 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <Ecore_Evas.h>
6
7#include "ecore_suite.h"
8
9#define WINDOW_HEIGHT 200
10#define WINDOW_WIDTH 200
11
12START_TEST(ecore_test_ecore_evas_associate)
13{
14 Ecore_Evas *ee;
15 Evas *canvas;
16 Evas_Object *bg;
17 int ret;
18
19 ret = ecore_evas_init();
20 fail_if(ret == 0);
21
22 ee = ecore_evas_buffer_new(WINDOW_WIDTH, WINDOW_HEIGHT);
23 fail_if(ee == NULL);
24
25 canvas = ecore_evas_get(ee);
26 fail_if(ecore_evas_ecore_evas_get(canvas) != ee);
27
28 bg = evas_object_rectangle_add(canvas);
29 ret = ecore_evas_object_associate(ee, bg, ECORE_EVAS_OBJECT_ASSOCIATE_BASE);
30 fail_if(ret == 0);
31
32 ecore_evas_free(ee);
33
34 ret = ecore_evas_shutdown();
35 fail_if(ret != 0);
36}
37END_TEST
38
39void ecore_test_ecore_evas(TCase *tc)
40{
41 tcase_add_test(tc, ecore_test_ecore_evas_associate);
42}