summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2020-01-02 16:45:05 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-01-13 15:57:21 +0100
commite942d0e80b44d614c98d81925ba6ed3a824aaff4 (patch)
tree3a9c51446e222134d0f98f3be26c91be95eff8aa
parentb6ea86497000a907c964586dc771d0c2077c1652 (diff)
efl_ui_spin_button: test wraparround
this tests the wraparround feature. Differential Revision: https://phab.enlightenment.org/D11008
-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 a60314ff21..4daf08a3ca 100644
--- a/src/tests/elementary/efl_ui_test_spin_button.c
+++ b/src/tests/elementary/efl_ui_test_spin_button.c
@@ -156,6 +156,23 @@ EFL_START_TEST (spin_value_dec_min)
156} 156}
157EFL_END_TEST 157EFL_END_TEST
158 158
159EFL_START_TEST (spin_wraparound)
160{
161 efl_ui_spin_button_wraparound_set(spin, EINA_TRUE);
162 efl_ui_range_limits_set(spin, 10, 30);
163 efl_ui_range_step_set(spin, 20);
164
165 efl_ui_range_value_set(spin, 20);
166 click_spin_part(spin, "efl.inc_button");
167 ck_assert_int_eq(efl_ui_range_value_get(spin), 10);
168
169 efl_ui_range_value_set(spin, 20);
170 click_spin_part(spin, "efl.dec_button");
171 ck_assert_int_eq(efl_ui_range_value_get(spin), 30);
172
173}
174EFL_END_TEST
175
159void efl_ui_test_spin_button(TCase *tc) 176void efl_ui_test_spin_button(TCase *tc)
160{ 177{
161 tcase_add_checked_fixture(tc, fail_on_errors_setup, fail_on_errors_teardown); 178 tcase_add_checked_fixture(tc, fail_on_errors_setup, fail_on_errors_teardown);
@@ -164,4 +181,5 @@ void efl_ui_test_spin_button(TCase *tc)
164 tcase_add_test(tc, spin_value_inc); 181 tcase_add_test(tc, spin_value_inc);
165 tcase_add_test(tc, spin_value_inc_max); 182 tcase_add_test(tc, spin_value_inc_max);
166 tcase_add_test(tc, spin_value_dec_min); 183 tcase_add_test(tc, spin_value_dec_min);
184 tcase_add_test(tc, spin_wraparound);
167} 185}