summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2020-01-03 15:35:49 -0800
committerCedric BAIL <cedric.bail@free.fr>2020-01-09 10:27:44 -0800
commit52d0452f0ddfd0c9c4305c71914b963fab7d2230 (patch)
tree3bbc104a4a29b596f40b254ac03a3a9d65fb357f
parent9ac976b079dae2e0355216af26f671837c9e5dc2 (diff)
elementary: add proper test for "child.selected" propagation.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11014
-rw-r--r--src/tests/elementary/efl_ui_test_select_model.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tests/elementary/efl_ui_test_select_model.c b/src/tests/elementary/efl_ui_test_select_model.c
index 12d5e6e148..78259085a3 100644
--- a/src/tests/elementary/efl_ui_test_select_model.c
+++ b/src/tests/elementary/efl_ui_test_select_model.c
@@ -102,8 +102,11 @@ EFL_START_TEST(efl_test_select_model)
102 model = efl_add_ref(EFL_UI_SELECT_MODEL_CLASS, efl_main_loop_get(), 102 model = efl_add_ref(EFL_UI_SELECT_MODEL_CLASS, efl_main_loop_get(),
103 efl_ui_view_model_set(efl_added, base_model)); 103 efl_ui_view_model_set(efl_added, base_model));
104 ck_assert(!!model); 104 ck_assert(!!model);
105 future = efl_model_property_set(model, "child.selected", eina_value_int_new(2)); 105
106 future = efl_model_property_ready_get(model, "child.selected");
106 eina_future_then(future, _wait_propagate, NULL, NULL); 107 eina_future_then(future, _wait_propagate, NULL, NULL);
108
109 efl_model_property_set(model, "child.selected", eina_value_int_new(2));
107 ecore_main_loop_begin(); 110 ecore_main_loop_begin();
108 111
109 future = efl_model_children_slice_get(model, 0, efl_model_children_count_get(model)); 112 future = efl_model_children_slice_get(model, 0, efl_model_children_count_get(model));
@@ -120,6 +123,8 @@ EFL_START_TEST(efl_test_select_model)
120 EINA_ITERATOR_FOREACH(it, index) 123 EINA_ITERATOR_FOREACH(it, index)
121 fail_if(*index == 2); 124 fail_if(*index == 2);
122 eina_iterator_free(it); 125 eina_iterator_free(it);
126
127 efl_model_property_set(model, "child.selected", eina_value_int_new(1));
123} 128}
124EFL_END_TEST 129EFL_END_TEST
125 130