tests:efl.ui.image.zoomable: add a test case for icon APIs

This commit is contained in:
Amitesh Singh 2017-06-05 17:26:54 +09:00
parent 5882d343f0
commit df54c13403
1 changed files with 28 additions and 1 deletions

View File

@ -24,7 +24,34 @@ START_TEST (elm_atspi_role_get)
}
END_TEST
START_TEST (efl_ui_image_zoomable_icon)
{
Evas_Object *win, *img_zoomable;
Eina_Bool ok;
const char *icon_name;
elm_init(1, NULL);
win = elm_win_add(NULL, "photocam", ELM_WIN_BASIC);
img_zoomable = efl_add(EFL_UI_IMAGE_ZOOMABLE_CLASS, win);
evas_object_show(img_zoomable);
ok = efl_ui_image_icon_set(img_zoomable, "folder");
ck_assert(ok);
icon_name = efl_ui_image_icon_get(img_zoomable);
ck_assert_str_eq(icon_name, "folder");
ok = efl_ui_image_icon_set(img_zoomable, "None");
ck_assert(ok == 0);
icon_name = efl_ui_image_icon_get(img_zoomable);
ck_assert(icon_name == NULL);
elm_shutdown();
}
END_TEST
void elm_test_photocam(TCase *tc)
{
tcase_add_test(tc, elm_atspi_role_get);
tcase_add_test(tc, elm_atspi_role_get);
tcase_add_test(tc, efl_ui_image_zoomable_icon);
}