summaryrefslogtreecommitdiff
path: root/src/tests/edje/edje_test_edje.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/edje/edje_test_edje.c')
-rw-r--r--src/tests/edje/edje_test_edje.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/tests/edje/edje_test_edje.c b/src/tests/edje/edje_test_edje.c
index 50fdcac3f6..3bd890e3fb 100644
--- a/src/tests/edje/edje_test_edje.c
+++ b/src/tests/edje/edje_test_edje.c
@@ -412,6 +412,49 @@ START_TEST(edje_test_swallows_eoapi)
412} 412}
413END_TEST 413END_TEST
414 414
415START_TEST(edje_test_access)
416{
417 Evas *evas = EDJE_TEST_INIT_EVAS();
418 const char *name;
419 Evas_Object *obj;
420 Eina_Iterator *it;
421 Eina_List *list;
422 char buf[20];
423 int i = 0;
424
425 obj = edje_object_add(evas);
426 fail_unless(edje_object_file_set(obj, test_layout_get("test_layout.edj"), "test_group"));
427
428 /* eo api */
429 it = edje_obj_access_part_iterate(obj);
430 fail_if(!it);
431
432 EINA_ITERATOR_FOREACH(it, name)
433 {
434 i++;
435 sprintf(buf, "access_%d", i);
436 fail_if(!name || strcmp(name, buf) != 0);
437 }
438 fail_if(i != 2);
439 eina_iterator_free(it);
440
441 i = 0;
442
443 /* legacy api */
444 list = edje_object_access_part_list_get(obj);
445 fail_if(!list);
446 EINA_LIST_FREE(list, name)
447 {
448 i++;
449 sprintf(buf, "access_%d", i);
450 fail_if(!name || strcmp(name, buf) != 0);
451 }
452 fail_if(i != 2);
453
454 EDJE_TEST_FREE_EVAS();
455}
456END_TEST
457
415START_TEST(edje_test_box) 458START_TEST(edje_test_box)
416{ 459{
417 Evas *evas; 460 Evas *evas;
@@ -466,5 +509,6 @@ void edje_test_edje(TCase *tc)
466 tcase_add_test(tc, edje_test_color_class); 509 tcase_add_test(tc, edje_test_color_class);
467 tcase_add_test(tc, edje_test_swallows); 510 tcase_add_test(tc, edje_test_swallows);
468 tcase_add_test(tc, edje_test_swallows_eoapi); 511 tcase_add_test(tc, edje_test_swallows_eoapi);
512 tcase_add_test(tc, edje_test_access);
469 tcase_add_test(tc, edje_test_box); 513 tcase_add_test(tc, edje_test_box);
470} 514}