efl_promise_progress_set(p, &progress);
efl_promise_value_set(p, &value, NULL);
+ ecore_main_loop_iterate();
+
fail_if(!fo.then || fo.cancel || !fo.progress);
fail_if(!deadf || deadp);
fail_if(!efl_future_then(f, _then, _cancel, _progress, &fo));
+ ecore_main_loop_iterate();
+
fail_if(f);
fail_if(!fo.then || fo.cancel || fo.progress);
fail_if(!deadf || deadp);
efl_promise_value_set(p, &value, NULL);
+ ecore_main_loop_iterate();
+
fail_if(fo.then || !fo.cancel || !fo.progress);
fail_if(!deadf || deadp);
fail_if(!none);
fail_if(!efl_future_then(f, _then, _cancel, _progress, &fo));
+ ecore_main_loop_iterate();
+
fail_if(deadp || !deadf);
fail_if(!fo.then || fo.cancel || fo.progress);
efl_promise_value_set(p, &value, NULL);
+ ecore_main_loop_iterate();
+
fail_if(fo.then || !fo.cancel || fo.progress);
fail_if(!none);
efl_promise_progress_set(p, &progress);
efl_promise_value_set(p, &value, NULL);
+ ecore_main_loop_iterate();
+
fail_if(!fo1.then || fo1.cancel || !fo1.progress);
fail_if(!fo2.then || fo2.cancel || !fo2.progress);
fail_if(!deadf1 || !deadf2 || deadp);
efl_promise_value_set(p, &value, NULL);
+ ecore_main_loop_iterate();
+
fail_if(fo1.then || !fo1.cancel || !fo1.progress);
fail_if(fo2.then || !fo2.cancel || !fo2.progress);
fail_if(!deadf1 || !deadf2 || deadp);
efl_promise_progress_set(p, &progress);
efl_promise_value_set(p, &value, NULL);
+ ecore_main_loop_iterate();
+
fail_if(!fo1.then || fo1.cancel || !fo1.progress);
fail_if(!fo2.then || fo2.cancel || !fo2.progress);
fail_if(!deadf || deadp);
efl_promise_value_set(p, &value, NULL);
+ ecore_main_loop_iterate();
+
fail_if(fo1.then || !fo1.cancel || !fo1.progress);
fail_if(fo2.then || !fo2.cancel || !fo2.progress);
fail_if(!deadf || deadp);
fail_if(!efl_future_then(f, _then, _cancel, _progress, &fo2));
efl_unref(f);
+ ecore_main_loop_iterate();
+
fail_if(deadp || !deadf);
fail_if(!fo1.then || fo1.cancel || fo1.progress);
fail_if(!fo2.then || fo2.cancel || fo2.progress);
efl_promise_value_set(p, &value, NULL);
+ ecore_main_loop_iterate();
+
fail_if(fo1.then || !fo1.cancel || fo1.progress);
fail_if(fo2.then || !fo2.cancel || fo2.progress);
fail_if(fo3.then || fo3.cancel || fo3.progress);
fail_if(!all);
efl_promise_value_set(p1, &value[0], NULL);
+
+ ecore_main_loop_iterate();
+
fail_if(!donep1.then || donep1.cancel || donep1.progress);
fail_if(donea.then || donea.cancel || donea.progress);
efl_promise_value_set(p2, &value[1], NULL);
efl_promise_value_set(p3, &value[2], NULL);
+ ecore_main_loop_iterate();
+
fail_if(!donea.then || donea.cancel || donea.progress);
fail_if(all);
fail_if(!efl_future_then(all, _then_all, _cancel, _progress, &donea));
+ ecore_main_loop_iterate();
+
fail_if(!donea.then || donea.cancel || donea.progress);
fail_if(all);
fail_if(!race);
efl_promise_value_set(p2, &value[0], NULL);
+
+ ecore_main_loop_iterate();
+
fail_if(donep1.then || !donep1.cancel || donep1.progress);
fail_if(!donea.then || donea.cancel || donea.progress);
START_TEST(efl_test_recursive_mess)
{
- Efl_Promise *p;
- Future_Ok done = { EINA_FALSE, EINA_FALSE, EINA_FALSE };
+ Efl_Promise *p;
+ Future_Ok done = { EINA_FALSE, EINA_FALSE, EINA_FALSE };
- ecore_init();
+ ecore_init();
- p = efl_add(EFL_PROMISE_CLASS, ecore_main_loop_get());
- efl_future_use(&recursive_future, efl_promise_future_get(p));
- efl_future_then(recursive_future, _then_cleanup, _cancel, NULL, &done);
+ p = efl_add(EFL_PROMISE_CLASS, ecore_main_loop_get());
+ efl_future_use(&recursive_future, efl_promise_future_get(p));
+ efl_future_then(recursive_future, _then_cleanup, _cancel, NULL, &done);
- efl_promise_value_set(p, &value[0], NULL);
+ efl_promise_value_set(p, &value[0], NULL);
- efl_del(p);
+ ecore_main_loop_iterate();
+
+ efl_del(p);
- ecore_shutdown();
+ ecore_shutdown();
}
END_TEST