summaryrefslogtreecommitdiff
path: root/src/tests/elementary/efl_ui_test_spin_button.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/elementary/efl_ui_test_spin_button.c')
-rw-r--r--src/tests/elementary/efl_ui_test_spin_button.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/tests/elementary/efl_ui_test_spin_button.c b/src/tests/elementary/efl_ui_test_spin_button.c
index 0d73e44271..a731bb67ce 100644
--- a/src/tests/elementary/efl_ui_test_spin_button.c
+++ b/src/tests/elementary/efl_ui_test_spin_button.c
@@ -193,6 +193,23 @@ EFL_START_TEST (spin_double_values)
193} 193}
194EFL_END_TEST 194EFL_END_TEST
195 195
196EFL_START_TEST (spin_double_values_hitting_max_with_step)
197{
198 //idea is to check that spin button can hit max with inc, even if value is not multiple is 2.7
199 efl_ui_range_limits_set(spin, 10, 30);
200 efl_ui_range_value_set(spin, 27);
201 efl_ui_range_step_set(spin, 2.7);
202 get_me_to_those_events(spin);
203
204 for (int i = 0; i < 2; ++i)
205 {
206 click_part(spin, "efl.inc_button");
207 get_me_to_those_events(spin);
208 }
209 ck_assert_int_eq(EINA_DBL_EQ(efl_ui_range_value_get(spin), 30), 1);
210}
211EFL_END_TEST
212
196static inline void 213static inline void
197_try_direct_text_input(const char *text, double result) 214_try_direct_text_input(const char *text, double result)
198{ 215{
@@ -253,6 +270,7 @@ void efl_ui_test_spin_button(TCase *tc)
253 tcase_add_test(tc, spin_value_dec_min); 270 tcase_add_test(tc, spin_value_dec_min);
254 tcase_add_test(tc, spin_wraparound); 271 tcase_add_test(tc, spin_wraparound);
255 tcase_add_test(tc, spin_double_values); 272 tcase_add_test(tc, spin_double_values);
273 tcase_add_test(tc, spin_double_values_hitting_max_with_step);
256 tcase_add_test(tc, spin_direct_text_input); 274 tcase_add_test(tc, spin_direct_text_input);
257 tcase_add_test(tc, spin_direct_text_input_comma_value); 275 tcase_add_test(tc, spin_direct_text_input_comma_value);
258} 276}