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)
downloadefl-d48941c783a697c8a075a8703da4e92e08c4ae4c.tar.gz
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)
}
EFL_END_TEST
+EFL_START_TEST (spin_double_values)
+{
+ double step = 0.1;
+ efl_ui_range_limits_set(spin, 10, 30);
+ efl_ui_range_value_set(spin, 20);
+ efl_ui_range_step_set(spin, step);
+ ck_assert(EINA_DBL_EQ(efl_ui_range_step_get(spin), step));
+ get_me_to_those_events(spin);
+ ck_assert(EINA_DBL_EQ(efl_ui_range_value_get(spin), 20.0));
+
+ for (int i = 0; i < 5; ++i)
+ {
+ click_part(spin, "efl.inc_button");
+ get_me_to_those_events(spin);
+ }
+ ck_assert_int_eq(EINA_DBL_EQ(efl_ui_range_value_get(spin), 20.5), 1);
+}
+EFL_END_TEST
+
void efl_ui_test_spin_button(TCase *tc)
{
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)
tcase_add_test(tc, spin_value_inc_max);
tcase_add_test(tc, spin_value_dec_min);
tcase_add_test(tc, spin_wraparound);
+ tcase_add_test(tc, spin_double_values);
}