summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_promise.c
diff options
context:
space:
mode:
authorCedric Bail <cedric@osg.samsung.com>2016-07-27 17:17:20 -0700
committerCedric BAIL <cedric@osg.samsung.com>2016-09-08 14:58:06 -0700
commitd8310b71802ab64e145092178c545119e6e80b23 (patch)
treed4a6b107925e76e2764a3e4b0e403e249579f6a3 /src/tests/ecore/ecore_test_promise.c
parentaaac15126b8fd4d691d46c52496d57269d3facdf (diff)
ecore: test efl_future_link.
Diffstat (limited to 'src/tests/ecore/ecore_test_promise.c')
-rw-r--r--src/tests/ecore/ecore_test_promise.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/tests/ecore/ecore_test_promise.c b/src/tests/ecore/ecore_test_promise.c
index 131e5af..0f35ac0 100644
--- a/src/tests/ecore/ecore_test_promise.c
+++ b/src/tests/ecore/ecore_test_promise.c
@@ -1097,6 +1097,34 @@ START_TEST(efl_test_promise_race)
1097} 1097}
1098END_TEST 1098END_TEST
1099 1099
1100START_TEST(efl_test_future_link)
1101{
1102 Efl_Promise *p;
1103 Efl_Future *f;
1104 Eo *o;
1105
1106 ecore_init();
1107
1108 o = efl_add(EFL_LOOP_TIMER_CLASS, ecore_main_loop_get());
1109 p = efl_add(EFL_PROMISE_CLASS, ecore_main_loop_get());
1110 efl_future_use(&f, efl_promise_future_get(p));
1111 efl_future_link(o, f);
1112
1113 fail_if(!o || !p || !f);
1114 efl_del(o);
1115 fail_if(f);
1116
1117 o = efl_add(EFL_LOOP_TIMER_CLASS, ecore_main_loop_get());
1118 efl_future_use(&f, efl_promise_future_get(p));
1119 efl_future_cancel(f);
1120
1121 efl_del(o);
1122 efl_del(p);
1123
1124 ecore_shutdown();
1125}
1126END_TEST
1127
1100void ecore_test_ecore_promise(TCase *tc) 1128void ecore_test_ecore_promise(TCase *tc)
1101{ 1129{
1102 tcase_add_test(tc, ecore_test_promise); 1130 tcase_add_test(tc, ecore_test_promise);
@@ -1126,4 +1154,5 @@ void ecore_test_ecore_promise(TCase *tc)
1126 tcase_add_test(tc, efl_test_promise_future_optional_cancel); 1154 tcase_add_test(tc, efl_test_promise_future_optional_cancel);
1127 tcase_add_test(tc, efl_test_promise_all); 1155 tcase_add_test(tc, efl_test_promise_all);
1128 tcase_add_test(tc, efl_test_promise_race); 1156 tcase_add_test(tc, efl_test_promise_race);
1157 tcase_add_test(tc, efl_test_future_link);
1129} 1158}