summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-09-26 17:03:43 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-09-26 18:00:32 +0200
commit2d206757ed78b385606134e7addeb9618c44372b (patch)
tree37af2d68ab4f200819222cc4d954753fd07eb53f
parent5256b9476d12c8057532de45a1500a3290649c7d (diff)
tests/check: add port of check widget mouse testing for efl_ui_check
Summary: coverage++ Depends on D10194 Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10195
-rw-r--r--src/tests/elementary/efl_ui_test_check.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/tests/elementary/efl_ui_test_check.c b/src/tests/elementary/efl_ui_test_check.c
index 232bc7cae5..a013f93f10 100644
--- a/src/tests/elementary/efl_ui_test_check.c
+++ b/src/tests/elementary/efl_ui_test_check.c
@@ -70,6 +70,31 @@ EFL_START_TEST(check_selection_events)
70} 70}
71EFL_END_TEST 71EFL_END_TEST
72 72
73
74EFL_START_TEST(efl_ui_test_check_callbacks)
75{
76 int called = 0;
77 int i;
78
79 efl_gfx_entity_size_set(win, EINA_SIZE2D(500, 500));
80
81 efl_text_set(check, "TEST TEST TEST");
82 efl_event_callback_add(check, EFL_UI_EVENT_SELECTED_CHANGED, (void*)event_callback_single_call_int_data, &called);
83
84 efl_gfx_entity_size_set(check, EINA_SIZE2D(200, 100));
85 get_me_to_those_events(check);
86
87 for (i = 0; i < 4; i++)
88 {
89 called = 0;
90 click_object(check);
91 ecore_main_loop_iterate();
92 ck_assert_int_eq(efl_ui_selectable_selected_get(check), !(i % 2));
93 ck_assert_int_eq(called, 1);
94 }
95}
96EFL_END_TEST
97
73void efl_ui_test_check(TCase *tc) 98void efl_ui_test_check(TCase *tc)
74{ 99{
75 tcase_add_checked_fixture(tc, check_setup, NULL); 100 tcase_add_checked_fixture(tc, check_setup, NULL);
@@ -77,4 +102,5 @@ void efl_ui_test_check(TCase *tc)
77 tcase_add_test(tc, check_text); 102 tcase_add_test(tc, check_text);
78 tcase_add_test(tc, check_content); 103 tcase_add_test(tc, check_content);
79 tcase_add_test(tc, check_selection_events); 104 tcase_add_test(tc, check_selection_events);
105 tcase_add_test(tc, efl_ui_test_check_callbacks);
80} 106}