tests:efl.ui.image.zoomable: add a test case for icon APIs
authorAmitesh Singh <amitesh.sh@samsung.com>
Mon, 5 Jun 2017 08:26:54 +0000 (17:26 +0900)
committerAmitesh Singh <amitesh.sh@samsung.com>
Mon, 5 Jun 2017 08:28:02 +0000 (17:28 +0900)
src/tests/elementary/elm_test_photocam.c

index e8d1f78..8d9cff1 100644 (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);
 }