summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2019-03-11 00:59:07 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-03-11 21:23:51 +0100
commit0838c1af6351d2be6164f5f07c06f5de08a8179b (patch)
tree5a2d04de327c197aee92d4918b1e9296463b883e /src/tests
parente2b63eae75b094efcc91bea208239e9fdae6e056 (diff)
ui.widget: add exception handling code and unit test of sub_object_add/del function
Add missing exception check code with unit test. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8282
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/elementary/efl_ui_test_widget.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tests/elementary/efl_ui_test_widget.c b/src/tests/elementary/efl_ui_test_widget.c
index ad1a60fa0e..d5f9c4d525 100644
--- a/src/tests/elementary/efl_ui_test_widget.c
+++ b/src/tests/elementary/efl_ui_test_widget.c
@@ -172,6 +172,22 @@ EFL_START_TEST(efl_ui_test_widget_sub_iterator)
172} 172}
173EFL_END_TEST 173EFL_END_TEST
174 174
175EFL_START_TEST(efl_ui_test_widget_sub_object_add_del)
176{
177 State s;
178
179 _small_ui(&s);
180 ck_assert(!efl_ui_widget_sub_object_add(s.btn1, s.btn1));
181 ck_assert(efl_ui_widget_sub_object_add(s.box, s.btn1));
182 ck_assert(!efl_ui_widget_sub_object_add(s.box, NULL));
183
184 ck_assert(!efl_ui_widget_sub_object_del(s.btn1, s.btn1));
185 ck_assert(!efl_ui_widget_sub_object_del(s.box, NULL));
186 ck_assert(!efl_ui_widget_sub_object_del(s.btn1, s.box));
187 ck_assert(efl_ui_widget_sub_object_del(s.box, s.btn1));
188}
189EFL_END_TEST
190
175void efl_ui_test_widget(TCase *tc) 191void efl_ui_test_widget(TCase *tc)
176{ 192{
177 tcase_add_test(tc, efl_ui_test_widget_parent_iterator); 193 tcase_add_test(tc, efl_ui_test_widget_parent_iterator);
@@ -179,4 +195,5 @@ void efl_ui_test_widget(TCase *tc)
179 tcase_add_test(tc, efl_ui_test_widget_widget_sub_iterator); 195 tcase_add_test(tc, efl_ui_test_widget_widget_sub_iterator);
180 tcase_add_test(tc, efl_ui_test_widget_iterator); 196 tcase_add_test(tc, efl_ui_test_widget_iterator);
181 tcase_add_test(tc, efl_ui_test_widget_sub_iterator); 197 tcase_add_test(tc, efl_ui_test_widget_sub_iterator);
198 tcase_add_test(tc, efl_ui_test_widget_sub_object_add_del);
182} 199}