summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-06-16 19:05:36 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-06-17 11:37:39 +0900
commitace95e2f81a8979857b1674c2561ce4b80647ce5 (patch)
treeead47da5ae26f3d3a7470c7fb2b4911cd6d88724
parentbb7edc2ed487d9d19950e1840a1fcf53c130bb92 (diff)
downloadefl-ace95e2f81a8979857b1674c2561ce4b80647ce5.tar.gz
tests: Add test case for evas clipees get
This tests both legacy (list) and eo (iterator) APIs. THis is a terrible test with a single item, though.
-rw-r--r--src/tests/evas/evas_test_mask.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tests/evas/evas_test_mask.c b/src/tests/evas/evas_test_mask.c
index d3518d0558..033ffb4aed 100644
--- a/src/tests/evas/evas_test_mask.c
+++ b/src/tests/evas/evas_test_mask.c
@@ -63,6 +63,10 @@ START_TEST(evas_mask_test_setget)
{
Evas *e = _setup_evas();
Evas_Object *obj = NULL, *mask = NULL;
+ const Eina_List *list, *l;
+ Eina_Iterator *it;
+ Evas_Object *o;
+ int i;
obj = evas_object_text_add(e);
fail_if(evas_object_clip_get(obj) != NULL);
@@ -71,6 +75,25 @@ START_TEST(evas_mask_test_setget)
evas_object_clip_set(obj, mask);
fail_if(evas_object_clip_get(obj) != mask);
+ list = evas_object_clipees_get(mask);
+ i = 0;
+ EINA_LIST_FOREACH(list, l, o)
+ {
+ if (!i) fail_if(o != obj);
+ i++;
+ }
+ fail_if(i != 1);
+
+ it = evas_obj_clipees_get(mask);
+ i = 0;
+ EINA_ITERATOR_FOREACH(it, o)
+ {
+ if (!i) fail_if(o != obj);
+ i++;
+ }
+ fail_if(i != 1);
+ eina_iterator_free(it);
+
evas_object_clip_unset(obj);
fail_if(evas_object_clip_get(obj) != NULL);