From a8807b5c28e5730bd27ac17dc6abf78cbd838043 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Wed, 21 Dec 2016 11:35:01 -0800 Subject: [PATCH] eldbus: always run the main loop. Now that future result are always delayed, we always need to run the main loop to collect them. --- src/tests/eldbus/eldbus_test_eldbus_model.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/tests/eldbus/eldbus_test_eldbus_model.c b/src/tests/eldbus/eldbus_test_eldbus_model.c index 3847c1cacb..4a9fa237bc 100644 --- a/src/tests/eldbus/eldbus_test_eldbus_model.c +++ b/src/tests/eldbus/eldbus_test_eldbus_model.c @@ -44,7 +44,7 @@ static void _future_check_err(void *data EINA_UNUSED, Efl_Event const *value EINA_UNUSED) { ck_assert_msg(0, "Future Expected Error:\n"); - + ecore_main_loop_quit(); } @@ -53,12 +53,9 @@ _error_then_ok(void* data, Efl_Event const* event) { Efl_Future_Event_Failure* info = event->info; Eina_Error const** expected_error = (Eina_Error const**)data; - if (*expected_error != NULL) - { - ck_assert_int_eq(info->error, **expected_error); - } - *expected_error = NULL; + if (*expected_error) + ck_assert_int_eq(info->error, **expected_error); ecore_main_loop_quit(); } @@ -82,8 +79,7 @@ efl_model_future_then(Efl_Future *future) { void *data = NULL; efl_future_then(future, &_future_then_quit_cb, &_error_then_cb, NULL, &data); - if(data == NULL) - ecore_main_loop_begin(); + ecore_main_loop_begin(); return data; } @@ -91,8 +87,7 @@ void check_efl_model_future_error(Efl_Future *future, Eina_Error *err) { efl_future_then(future, &_future_check_err, &_error_then_ok, NULL, &err); - if(err == NULL) - ecore_main_loop_begin(); + ecore_main_loop_begin(); } int @@ -100,8 +95,7 @@ efl_model_future_then_u(Efl_Future *future) { unsigned i = -1; efl_future_then(future, &_future_then_quit_u_cb, &_error_then_cb, NULL, &i); - if(i == (unsigned)-1) - ecore_main_loop_begin(); + ecore_main_loop_begin(); return i; } @@ -456,4 +450,3 @@ check_efl_model_property_int_set(Efl_Model *efl_model, const char *property, int ck_assert_int_eq(value, actual_value); eina_value_flush(&eina_value); } -