From ace95e2f81a8979857b1674c2561ce4b80647ce5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Thu, 16 Jun 2016 19:05:36 +0900 Subject: [PATCH] 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. --- src/tests/evas/evas_test_mask.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/tests/evas/evas_test_mask.c b/src/tests/evas/evas_test_mask.c index d3518d0..033ffb4 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); -- 2.7.4