tests: move efl_ui_image test -> efl_ui_suite
ref T6815 Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D7825
This commit is contained in:
parent
633a2e506c
commit
2137154d2a
|
@ -1609,8 +1609,9 @@ 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_test_image.c \
|
||||
tests/elementary/efl_ui_test_image_zoomable.c \
|
||||
tests/elementary/efl_ui_test_layout.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", efl_ui_test_image},
|
||||
{ "efl_ui_image_zoomable", efl_ui_test_image_zoomable},
|
||||
{ "efl_ui_layout", efl_ui_test_layout},
|
||||
{ NULL, NULL }
|
||||
|
|
|
@ -20,6 +20,7 @@ void efl_ui_test_grid(TCase *tc);
|
|||
void efl_ui_test_atspi(TCase *tc);
|
||||
void efl_ui_test_image_zoomable(TCase *tc);
|
||||
void efl_ui_test_layout(TCase *tc);
|
||||
void efl_ui_test_image(TCase *tc);
|
||||
|
||||
Eo *win_add();
|
||||
Eo *win_add_focused();
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
#define EFL_NOLEGACY_API_SUPPORT
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "elementary_config.h"
|
||||
#endif
|
||||
|
||||
#include <Efl_Ui.h>
|
||||
#include "efl_ui_suite.h"
|
||||
|
||||
|
||||
EFL_START_TEST(efl_ui_image_test_icon)
|
||||
{
|
||||
Eo *win, *image;
|
||||
Eina_Bool ok;
|
||||
const char *icon_name;
|
||||
|
||||
win = win_add(NULL, "image", EFL_UI_WIN_BASIC);
|
||||
|
||||
image = efl_add(EFL_UI_IMAGE_CLASS, win);
|
||||
efl_gfx_entity_visible_set(image, EINA_TRUE);
|
||||
|
||||
ok = efl_ui_image_icon_set(image, "folder");
|
||||
ck_assert(ok);
|
||||
icon_name = efl_ui_image_icon_get(image);
|
||||
ck_assert_str_eq(icon_name, "folder");
|
||||
|
||||
ok = efl_ui_image_icon_set(image, "None");
|
||||
ck_assert(ok == 0);
|
||||
icon_name = efl_ui_image_icon_get(image);
|
||||
ck_assert(icon_name == NULL);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
void efl_ui_test_image(TCase *tc)
|
||||
{
|
||||
tcase_add_test(tc, efl_ui_image_test_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.c',
|
||||
'efl_ui_test_image_zoomable.c',
|
||||
'efl_ui_test_layout.c',
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue