aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-01-29 12:56:32 -0500
committerStefan Schmidt <s.schmidt@samsung.com>2019-01-30 10:11:41 +0100
commit2137154d2a7d5aed1cebf4ee7cbf198280f718d9 (patch)
tree5298ff5f09d5fd4f5424ee4cdbf469063532f733
parenttests: move efl_ui_layout tests into efl_ui_suite (diff)
downloadefl-2137154d2a7d5aed1cebf4ee7cbf198280f718d9.tar.gz
tests: move efl_ui_image test -> efl_ui_suite
ref https://phab.enlightenment.org/T6815 Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D7825
-rw-r--r--src/Makefile_Elementary.am3
-rw-r--r--src/tests/elementary/efl_ui_suite.c1
-rw-r--r--src/tests/elementary/efl_ui_suite.h1
-rw-r--r--src/tests/elementary/efl_ui_test_image.c36
-rw-r--r--src/tests/elementary/meson.build1
5 files changed, 41 insertions, 1 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index da52460707..f634210e73 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -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 = \
diff --git a/src/tests/elementary/efl_ui_suite.c b/src/tests/elementary/efl_ui_suite.c
index b98df8a03a..ba7d7ce131 100644
--- a/src/tests/elementary/efl_ui_suite.c
+++ b/src/tests/elementary/efl_ui_suite.c
@@ -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 }
diff --git a/src/tests/elementary/efl_ui_suite.h b/src/tests/elementary/efl_ui_suite.h
index 35cd13f845..f44d35cb54 100644
--- a/src/tests/elementary/efl_ui_suite.h
+++ b/src/tests/elementary/efl_ui_suite.h
@@ -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();
diff --git a/src/tests/elementary/efl_ui_test_image.c b/src/tests/elementary/efl_ui_test_image.c
new file mode 100644
index 0000000000..6c5e9f8bb5
--- /dev/null
+++ b/src/tests/elementary/efl_ui_test_image.c
@@ -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);
+}
diff --git a/src/tests/elementary/meson.build b/src/tests/elementary/meson.build
index 097590ef05..fda9355d35 100644
--- a/src/tests/elementary/meson.build
+++ b/src/tests/elementary/meson.build
@@ -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',
]