summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-07-22 12:27:20 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-07-31 10:18:20 +0200
commitc0082b1c71ed63f982bb4b9aed2af4b50d46dabe (patch)
treecdb98e30f30f4f4c20c52403efdf98f08977a917 /src/tests
parent911eab34207f6f9355f4ed15009d57e079183849 (diff)
efl_ui_range_display: move events from spin
we concluded min,reached and max,reached should be on every widget that implements range_display. This here is the start of that work, the events are moved, next commit fixes all widgets, the last commits enables tests in the spec unit test. ref T7897 ref T7895 Differential Revision: https://phab.enlightenment.org/D9371
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/elementary/efl_ui_test_slider.c6
-rw-r--r--src/tests/elementary/efl_ui_test_spin.c12
-rw-r--r--src/tests/elementary/efl_ui_test_spin_button.c30
3 files changed, 24 insertions, 24 deletions
diff --git a/src/tests/elementary/efl_ui_test_slider.c b/src/tests/elementary/efl_ui_test_slider.c
index ff820b01f5..39b11b5c7c 100644
--- a/src/tests/elementary/efl_ui_test_slider.c
+++ b/src/tests/elementary/efl_ui_test_slider.c
@@ -13,7 +13,7 @@ slider_changed(void *data EINA_UNUSED, const Efl_Event *ev)
13{ 13{
14 event_counter++; 14 event_counter++;
15 if (event_counter == 1) 15 if (event_counter == 1)
16 efl_event_callback_del(ev->object, EFL_UI_SLIDER_EVENT_CHANGED, slider_changed, NULL); 16 efl_event_callback_del(ev->object, EFL_UI_RANGE_EVENT_CHANGED, slider_changed, NULL);
17 else if (event_counter == 2) 17 else if (event_counter == 2)
18 ecore_main_loop_quit(); 18 ecore_main_loop_quit();
19} 19}
@@ -26,7 +26,7 @@ EFL_START_TEST(efl_ui_test_slider_events)
26 26
27 efl_gfx_entity_size_set(win, EINA_SIZE2D(400, 100)); 27 efl_gfx_entity_size_set(win, EINA_SIZE2D(400, 100));
28 slider = efl_add(EFL_UI_SLIDER_CLASS, win, 28 slider = efl_add(EFL_UI_SLIDER_CLASS, win,
29 efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, slider_changed, NULL), 29 efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, slider_changed, NULL),
30 efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_STEADY, slider_changed, NULL), 30 efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_STEADY, slider_changed, NULL),
31 efl_gfx_entity_size_set(efl_added, EINA_SIZE2D(400, 100)) 31 efl_gfx_entity_size_set(efl_added, EINA_SIZE2D(400, 100))
32 ); 32 );
@@ -60,7 +60,7 @@ EFL_START_TEST(efl_ui_test_slider_step)
60 60
61 efl_gfx_entity_size_set(win, EINA_SIZE2D(400, 100)); 61 efl_gfx_entity_size_set(win, EINA_SIZE2D(400, 100));
62 slider = efl_add(EFL_UI_SLIDER_CLASS, win, 62 slider = efl_add(EFL_UI_SLIDER_CLASS, win,
63 efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, slider_changed, NULL), 63 efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, slider_changed, NULL),
64 efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_STEADY, slider_changed, NULL), 64 efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_STEADY, slider_changed, NULL),
65 efl_gfx_entity_size_set(efl_added, EINA_SIZE2D(400, 100)) 65 efl_gfx_entity_size_set(efl_added, EINA_SIZE2D(400, 100))
66 ); 66 );
diff --git a/src/tests/elementary/efl_ui_test_spin.c b/src/tests/elementary/efl_ui_test_spin.c
index 98c5432a9d..abd55afd5c 100644
--- a/src/tests/elementary/efl_ui_test_spin.c
+++ b/src/tests/elementary/efl_ui_test_spin.c
@@ -33,9 +33,9 @@ EFL_START_TEST (spin_value_events)
33 33
34 efl_ui_range_limits_set(spin, -3.0, 3.0); 34 efl_ui_range_limits_set(spin, -3.0, 3.0);
35 efl_ui_range_value_set(spin, 0.0); 35 efl_ui_range_value_set(spin, 0.0);
36 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_CHANGED, _set_flag, &changed); 36 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_CHANGED, _set_flag, &changed);
37 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MIN_REACHED, _set_flag, &min_reached); 37 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MIN_REACHED, _set_flag, &min_reached);
38 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MAX_REACHED, _set_flag, &max_reached); 38 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MAX_REACHED, _set_flag, &max_reached);
39 39
40 efl_ui_range_value_set(spin, 1.0); 40 efl_ui_range_value_set(spin, 1.0);
41 ck_assert_int_eq(changed, EINA_TRUE); 41 ck_assert_int_eq(changed, EINA_TRUE);
@@ -67,9 +67,9 @@ EFL_START_TEST (spin_wheel_test)
67 efl_ui_range_limits_set(spin, -100.0, 100.0); 67 efl_ui_range_limits_set(spin, -100.0, 100.0);
68 efl_ui_range_value_set(spin, 0.0); 68 efl_ui_range_value_set(spin, 0.0);
69 efl_ui_range_step_set(spin, 10.0); 69 efl_ui_range_step_set(spin, 10.0);
70 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_CHANGED, _set_flag, &changed); 70 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_CHANGED, _set_flag, &changed);
71 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MIN_REACHED, _set_flag, &min_reached); 71 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MIN_REACHED, _set_flag, &min_reached);
72 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MAX_REACHED, _set_flag, &max_reached); 72 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MAX_REACHED, _set_flag, &max_reached);
73 73
74 efl_gfx_entity_size_set(win, EINA_SIZE2D(60, 60)); 74 efl_gfx_entity_size_set(win, EINA_SIZE2D(60, 60));
75 get_me_to_those_events(spin); 75 get_me_to_those_events(spin);
diff --git a/src/tests/elementary/efl_ui_test_spin_button.c b/src/tests/elementary/efl_ui_test_spin_button.c
index 78b21a4046..f9e6bce6b9 100644
--- a/src/tests/elementary/efl_ui_test_spin_button.c
+++ b/src/tests/elementary/efl_ui_test_spin_button.c
@@ -52,9 +52,9 @@ EFL_START_TEST (spin_value_events)
52 52
53 efl_ui_range_limits_set(spin, -3.0, 3.0); 53 efl_ui_range_limits_set(spin, -3.0, 3.0);
54 efl_ui_range_value_set(spin, 0.0); 54 efl_ui_range_value_set(spin, 0.0);
55 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_CHANGED, _set_flag, &changed); 55 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_CHANGED, _set_flag, &changed);
56 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MIN_REACHED, _set_flag, &min_reached); 56 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MIN_REACHED, _set_flag, &min_reached);
57 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MAX_REACHED, _set_flag, &max_reached); 57 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MAX_REACHED, _set_flag, &max_reached);
58 58
59 efl_ui_range_value_set(spin, 1.0); 59 efl_ui_range_value_set(spin, 1.0);
60 ck_assert_int_eq(changed, EINA_TRUE); 60 ck_assert_int_eq(changed, EINA_TRUE);
@@ -89,9 +89,9 @@ EFL_START_TEST (spin_wheel_test)
89 efl_ui_range_limits_set(spin, -100.0, 100.0); 89 efl_ui_range_limits_set(spin, -100.0, 100.0);
90 efl_ui_range_value_set(spin, 0.0); 90 efl_ui_range_value_set(spin, 0.0);
91 efl_ui_range_step_set(spin, 10.0); 91 efl_ui_range_step_set(spin, 10.0);
92 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_CHANGED, _set_flag, &changed); 92 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_CHANGED, _set_flag, &changed);
93 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MIN_REACHED, _set_flag, &min_reached); 93 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MIN_REACHED, _set_flag, &min_reached);
94 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MAX_REACHED, _set_flag, &max_reached); 94 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MAX_REACHED, _set_flag, &max_reached);
95 95
96 efl_gfx_entity_size_set(win, EINA_SIZE2D(60, 60)); 96 efl_gfx_entity_size_set(win, EINA_SIZE2D(60, 60));
97 get_me_to_those_events(spin); 97 get_me_to_those_events(spin);
@@ -122,9 +122,9 @@ EFL_START_TEST (spin_value_inc)
122 122
123 efl_ui_range_limits_set(spin, 0.0, 3.0); 123 efl_ui_range_limits_set(spin, 0.0, 3.0);
124 efl_ui_range_value_set(spin, 1.0); 124 efl_ui_range_value_set(spin, 1.0);
125 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_CHANGED, _set_flag, &changed); 125 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_CHANGED, _set_flag, &changed);
126 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MIN_REACHED, _set_flag, &min_reached); 126 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MIN_REACHED, _set_flag, &min_reached);
127 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MAX_REACHED, _set_flag, &max_reached); 127 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MAX_REACHED, _set_flag, &max_reached);
128 efl_event_callback_add(spin, EFL_UI_SPIN_BUTTON_EVENT_DELAY_CHANGED, _set_flag_quit, &delay_changed); 128 efl_event_callback_add(spin, EFL_UI_SPIN_BUTTON_EVENT_DELAY_CHANGED, _set_flag_quit, &delay_changed);
129 129
130 click_spin_part(spin, "efl.inc_button"); 130 click_spin_part(spin, "efl.inc_button");
@@ -147,9 +147,9 @@ EFL_START_TEST (spin_value_inc_max)
147 147
148 efl_ui_range_limits_set(spin, 0.0, 3.0); 148 efl_ui_range_limits_set(spin, 0.0, 3.0);
149 efl_ui_range_value_set(spin, 2.0); 149 efl_ui_range_value_set(spin, 2.0);
150 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_CHANGED, _set_flag, &changed); 150 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_CHANGED, _set_flag, &changed);
151 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MIN_REACHED, _set_flag, &min_reached); 151 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MIN_REACHED, _set_flag, &min_reached);
152 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MAX_REACHED, _set_flag, &max_reached); 152 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MAX_REACHED, _set_flag, &max_reached);
153 efl_event_callback_add(spin, EFL_UI_SPIN_BUTTON_EVENT_DELAY_CHANGED, _set_flag_quit, &delay_changed); 153 efl_event_callback_add(spin, EFL_UI_SPIN_BUTTON_EVENT_DELAY_CHANGED, _set_flag_quit, &delay_changed);
154 154
155 click_spin_part(spin, "efl.inc_button"); 155 click_spin_part(spin, "efl.inc_button");
@@ -172,9 +172,9 @@ EFL_START_TEST (spin_value_dec_min)
172 172
173 efl_ui_range_limits_set(spin, 0.0, 3.0); 173 efl_ui_range_limits_set(spin, 0.0, 3.0);
174 efl_ui_range_value_set(spin, 1.0); 174 efl_ui_range_value_set(spin, 1.0);
175 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_CHANGED, _set_flag, &changed); 175 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_CHANGED, _set_flag, &changed);
176 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MIN_REACHED, _set_flag, &min_reached); 176 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MIN_REACHED, _set_flag, &min_reached);
177 efl_event_callback_add(spin, EFL_UI_SPIN_EVENT_MAX_REACHED, _set_flag, &max_reached); 177 efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MAX_REACHED, _set_flag, &max_reached);
178 efl_event_callback_add(spin, EFL_UI_SPIN_BUTTON_EVENT_DELAY_CHANGED, _set_flag_quit, &delay_changed); 178 efl_event_callback_add(spin, EFL_UI_SPIN_BUTTON_EVENT_DELAY_CHANGED, _set_flag_quit, &delay_changed);
179 179
180 click_spin_part(spin, "efl.dec_button"); 180 click_spin_part(spin, "efl.dec_button");