From 52d0452f0ddfd0c9c4305c71914b963fab7d2230 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 3 Jan 2020 15:35:49 -0800 Subject: [PATCH] elementary: add proper test for "child.selected" propagation. Reviewed-by: Mike Blumenkrantz Differential Revision: https://phab.enlightenment.org/D11014 --- src/tests/elementary/efl_ui_test_select_model.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) model = efl_add_ref(EFL_UI_SELECT_MODEL_CLASS, efl_main_loop_get(), efl_ui_view_model_set(efl_added, base_model)); ck_assert(!!model); - future = efl_model_property_set(model, "child.selected", eina_value_int_new(2)); + + future = efl_model_property_ready_get(model, "child.selected"); eina_future_then(future, _wait_propagate, NULL, NULL); + + efl_model_property_set(model, "child.selected", eina_value_int_new(2)); ecore_main_loop_begin(); 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) EINA_ITERATOR_FOREACH(it, index) fail_if(*index == 2); eina_iterator_free(it); + + efl_model_property_set(model, "child.selected", eina_value_int_new(1)); } EFL_END_TEST