summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2020-01-02 17:46:46 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-01-13 15:57:22 +0100
commitd48941c783a697c8a075a8703da4e92e08c4ae4c (patch)
tree8d9dbe3b5c4b03c485eb0c5456a226e40fac8d84
parente942d0e80b44d614c98d81925ba6ed3a824aaff4 (diff)
efl_ui_spin_button: add test for sequential inc
before there was a bug with this, as there was a int cast in the internal dataflow. This ensures that this is working. Differential Revision: https://phab.enlightenment.org/D11009
-rw-r--r--src/tests/elementary/efl_ui_test_spin_button.c20
1 files changed, 20 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 4daf08a3ca..9903e8312d 100644
--- a/src/tests/elementary/efl_ui_test_spin_button.c
+++ b/src/tests/elementary/efl_ui_test_spin_button.c
@@ -173,6 +173,25 @@ EFL_START_TEST (spin_wraparound)
173} 173}
174EFL_END_TEST 174EFL_END_TEST
175 175
176EFL_START_TEST (spin_double_values)
177{
178 double step = 0.1;
179 efl_ui_range_limits_set(spin, 10, 30);
180 efl_ui_range_value_set(spin, 20);
181 efl_ui_range_step_set(spin, step);
182 ck_assert(EINA_DBL_EQ(efl_ui_range_step_get(spin), step));
183 get_me_to_those_events(spin);
184 ck_assert(EINA_DBL_EQ(efl_ui_range_value_get(spin), 20.0));
185
186 for (int i = 0; i < 5; ++i)
187 {
188 click_part(spin, "efl.inc_button");
189 get_me_to_those_events(spin);
190 }
191 ck_assert_int_eq(EINA_DBL_EQ(efl_ui_range_value_get(spin), 20.5), 1);
192}
193EFL_END_TEST
194
176void efl_ui_test_spin_button(TCase *tc) 195void efl_ui_test_spin_button(TCase *tc)
177{ 196{
178 tcase_add_checked_fixture(tc, fail_on_errors_setup, fail_on_errors_teardown); 197 tcase_add_checked_fixture(tc, fail_on_errors_setup, fail_on_errors_teardown);
@@ -182,4 +201,5 @@ void efl_ui_test_spin_button(TCase *tc)
182 tcase_add_test(tc, spin_value_inc_max); 201 tcase_add_test(tc, spin_value_inc_max);
183 tcase_add_test(tc, spin_value_dec_min); 202 tcase_add_test(tc, spin_value_dec_min);
184 tcase_add_test(tc, spin_wraparound); 203 tcase_add_test(tc, spin_wraparound);
204 tcase_add_test(tc, spin_double_values);
185} 205}