forked from enlightenment/efl
tests: move image_zoomable into efl_ui_suite
ref T6815 Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D7807
This commit is contained in:
parent
166dafb0d8
commit
7628bd76ed
|
@ -1609,6 +1609,7 @@ tests_elementary_efl_ui_suite_SOURCES = \
|
|||
tests/elementary/efl_ui_suite.c \
|
||||
tests/elementary/elm_test_init.c \
|
||||
tests/elementary/efl_ui_test_atspi.c \
|
||||
tests/elementary/efl_ui_test_image_zoomable.c \
|
||||
tests/elementary/efl_ui_test_grid.c
|
||||
|
||||
tests_elementary_efl_ui_suite_CPPFLAGS = \
|
||||
|
|
|
@ -14,6 +14,7 @@ static const Efl_Test_Case etc[] = {
|
|||
//{ "elm_widget_focus", elm_test_widget_focus},
|
||||
{ "efl_ui_atspi", efl_ui_test_atspi},
|
||||
{ "efl_ui_grid", efl_ui_test_grid},
|
||||
{ "efl_ui_image_zoomable", efl_ui_test_image_zoomable},
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include <Eo.h>
|
||||
void efl_ui_test_grid(TCase *tc);
|
||||
void efl_ui_test_atspi(TCase *tc);
|
||||
void efl_ui_test_image_zoomable(TCase *tc);
|
||||
|
||||
Eo *win_add();
|
||||
Eo *win_add_focused();
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "elementary_config.h"
|
||||
#endif
|
||||
#define EFL_NOLEGACY_API_SUPPORT
|
||||
|
||||
#include <Efl_Ui.h>
|
||||
#include "efl_ui_suite.h"
|
||||
|
||||
|
||||
EFL_START_TEST(efl_ui_test_image_zoomable_icon)
|
||||
{
|
||||
Evas_Object *win, *img_zoomable;
|
||||
Eina_Bool ok;
|
||||
const char *icon_name;
|
||||
|
||||
win = win_add(NULL, "photocam", EFL_UI_WIN_BASIC);
|
||||
|
||||
img_zoomable = efl_add(EFL_UI_IMAGE_ZOOMABLE_CLASS, win);
|
||||
efl_gfx_entity_visible_set(img_zoomable, EINA_TRUE);
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
void efl_ui_test_image_zoomable(TCase *tc)
|
||||
{
|
||||
tcase_add_test(tc, efl_ui_test_image_zoomable_icon);
|
||||
}
|
|
@ -41,33 +41,8 @@ EFL_START_TEST(elm_atspi_role_get)
|
|||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(efl_ui_image_zoomable_icon)
|
||||
{
|
||||
Evas_Object *win, *img_zoomable;
|
||||
Eina_Bool ok;
|
||||
const char *icon_name;
|
||||
|
||||
win = 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);
|
||||
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
void elm_test_photocam(TCase *tc)
|
||||
{
|
||||
tcase_add_test(tc, elm_photocam_legacy_type_check);
|
||||
tcase_add_test(tc, elm_atspi_role_get);
|
||||
tcase_add_test(tc, efl_ui_image_zoomable_icon);
|
||||
}
|
||||
|
|
|
@ -122,6 +122,7 @@ efl_ui_suite_src = [
|
|||
'elm_test_init.c',
|
||||
'efl_ui_test_atspi.c',
|
||||
'efl_ui_test_grid.c',
|
||||
'efl_ui_test_image_zoomable.c',
|
||||
]
|
||||
|
||||
efl_ui_suite = executable('efl_ui_suite',
|
||||
|
|
Loading…
Reference in New Issue