summaryrefslogtreecommitdiff
path: root/src/tests/eina/eina_test_promise.c
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-06-10 22:32:07 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-06-11 10:40:27 -0300
commit949af55947407de97165dab25814ea63045a28e7 (patch)
tree62edc5815dac8905911cad4cda097fe330b28641 /src/tests/eina/eina_test_promise.c
parentf6d20c839ef61e1a21961c18045ea0eb7ccdb835 (diff)
eina: Add support for eina_safepointer in promises
Diffstat (limited to '')
-rw-r--r--src/tests/eina/eina_test_promise.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tests/eina/eina_test_promise.c b/src/tests/eina/eina_test_promise.c
index 5c73dba0da..a236aad51f 100644
--- a/src/tests/eina/eina_test_promise.c
+++ b/src/tests/eina/eina_test_promise.c
@@ -269,6 +269,7 @@ START_TEST(eina_test_pointer_promise_manual_then)
269 eina_promise_owner_default_manual_then_set(promise_owner, EINA_TRUE); 269 eina_promise_owner_default_manual_then_set(promise_owner, EINA_TRUE);
270 270
271 promise = eina_promise_owner_promise_get(promise_owner); 271 promise = eina_promise_owner_promise_get(promise_owner);
272 eina_promise_ref(promise);
272 273
273 eina_promise_then(promise, &_eina_test_promise_cb, NULL, &ran); 274 eina_promise_then(promise, &_eina_test_promise_cb, NULL, &ran);
274 275
@@ -277,6 +278,7 @@ START_TEST(eina_test_pointer_promise_manual_then)
277 ck_assert(!ran); 278 ck_assert(!ran);
278 279
279 eina_promise_owner_default_call_then(promise_owner); 280 eina_promise_owner_default_call_then(promise_owner);
281 eina_promise_unref(promise);
280 282
281 ck_assert(ran); 283 ck_assert(ran);
282 284
@@ -685,7 +687,7 @@ END_TEST
685void 687void
686eina_test_promise(TCase *tc) 688eina_test_promise(TCase *tc)
687{ 689{
688 /* // pointer */ 690 // pointer
689 tcase_add_test(tc, eina_test_pointer_promise_normal_lifetime); 691 tcase_add_test(tc, eina_test_pointer_promise_normal_lifetime);
690 tcase_add_test(tc, eina_test_pointer_promise_normal_lifetime_all); 692 tcase_add_test(tc, eina_test_pointer_promise_normal_lifetime_all);
691 tcase_add_test(tc, eina_test_pointer_promise_error_set); 693 tcase_add_test(tc, eina_test_pointer_promise_error_set);