summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShinwoo Kim <cinoo.kim@samsung.com>2019-07-11 12:02:27 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-07-11 17:40:47 +0200
commit89399672b7a90451071d03b9403d8c8b698d67e1 (patch)
tree2471cfc977cd9395115b992b25c99817db5df9ae /src
parent162c0e2ba562d953724da370d7b7ffe560350993 (diff)
test: add Efl.Ui.Format related test
This patch is including negative test as well. See https://phab.enlightenment.org/D9276. This could make @bu5hm4n very happy. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9281
Diffstat (limited to 'src')
-rw-r--r--src/tests/elementary/elm_test_progressbar.c11
-rw-r--r--src/tests/elementary/elm_test_slider.c38
2 files changed, 49 insertions, 0 deletions
diff --git a/src/tests/elementary/elm_test_progressbar.c b/src/tests/elementary/elm_test_progressbar.c
index 17abdb36af..4435fa6ed6 100644
--- a/src/tests/elementary/elm_test_progressbar.c
+++ b/src/tests/elementary/elm_test_progressbar.c
@@ -59,9 +59,20 @@ EFL_START_TEST(elm_atspi_role_get)
59} 59}
60EFL_END_TEST 60EFL_END_TEST
61 61
62EFL_START_TEST(elm_progressbar_unit_format_get_n)
63{
64 const char *fmt;
65
66 fmt = elm_progressbar_unit_format_get(NULL);
67
68 ck_assert(fmt == NULL);
69}
70EFL_END_TEST
71
62void elm_test_progressbar(TCase *tc) 72void elm_test_progressbar(TCase *tc)
63{ 73{
64 tcase_add_test(tc, elm_progressbar_legacy_type_check); 74 tcase_add_test(tc, elm_progressbar_legacy_type_check);
65 tcase_add_test(tc, elm_progressbar_custom_unit_check); 75 tcase_add_test(tc, elm_progressbar_custom_unit_check);
66 tcase_add_test(tc, elm_atspi_role_get); 76 tcase_add_test(tc, elm_atspi_role_get);
77 tcase_add_test(tc, elm_progressbar_unit_format_get_n);
67} 78}
diff --git a/src/tests/elementary/elm_test_slider.c b/src/tests/elementary/elm_test_slider.c
index 14035b4e48..76201fa305 100644
--- a/src/tests/elementary/elm_test_slider.c
+++ b/src/tests/elementary/elm_test_slider.c
@@ -135,10 +135,48 @@ EFL_START_TEST(elm_slider_events)
135} 135}
136EFL_END_TEST 136EFL_END_TEST
137 137
138EFL_START_TEST(elm_slider_indicator_format_set_get_p)
139{
140 Evas_Object *win, *slider;
141 const char *fmt;
142
143 win = win_add(NULL, "slider", ELM_WIN_BASIC);
144 slider = elm_slider_add(win);
145 elm_slider_indicator_format_set(slider, "%1.0f");
146 fmt = elm_slider_indicator_format_get(slider);
147
148 ck_assert(fmt != NULL);
149 ck_assert(!strcmp(fmt, "%1.0f"));
150}
151EFL_END_TEST
152
153EFL_START_TEST(elm_slider_indicator_format_get_n)
154{
155 const char *fmt;
156
157 fmt = elm_slider_indicator_format_get(NULL);
158
159 ck_assert(fmt == NULL);
160}
161EFL_END_TEST
162
163EFL_START_TEST(elm_slider_unit_format_get_n)
164{
165 const char *fmt;
166
167 fmt = elm_slider_unit_format_get(NULL);
168
169 ck_assert(fmt == NULL);
170}
171EFL_END_TEST
172
138void elm_test_slider(TCase *tc) 173void elm_test_slider(TCase *tc)
139{ 174{
140 tcase_add_test(tc, elm_slider_legacy_type_check); 175 tcase_add_test(tc, elm_slider_legacy_type_check);
141 tcase_add_test(tc, elm_slider_in_scroller); 176 tcase_add_test(tc, elm_slider_in_scroller);
142 tcase_add_test(tc, elm_slider_events); 177 tcase_add_test(tc, elm_slider_events);
143 tcase_add_test(tc, elm_atspi_role_get); 178 tcase_add_test(tc, elm_atspi_role_get);
179 tcase_add_test(tc, elm_slider_indicator_format_set_get_p);
180 tcase_add_test(tc, elm_slider_indicator_format_get_n);
181 tcase_add_test(tc, elm_slider_unit_format_get_n);
144} 182}