summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2016-06-05 16:10:52 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-06-05 21:58:19 -0300
commitb28f6f2fce202cf90c7f9f01d19b28971eb6021d (patch)
tree9f24a9cc8ebe8d177434042d5b027caa30376784 /src/tests
parentc6733fbbed5dbf73d23cf32f1f15d557f13e8800 (diff)
eina: Fix promise tests and avoid early deletion
- Progress notify refcount fixes, avoiding early deletion - Avoid leaking memory on tests
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/eina/eina_test_promise.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tests/eina/eina_test_promise.c b/src/tests/eina/eina_test_promise.c
index 8df6e26d90..e2ef1f3651 100644
--- a/src/tests/eina/eina_test_promise.c
+++ b/src/tests/eina/eina_test_promise.c
@@ -231,6 +231,9 @@ START_TEST(eina_test_promise_progress)
231 231
232 ck_assert(progress_ran); 232 ck_assert(progress_ran);
233 233
234 eina_promise_unref(promise);
235 eina_promise_owner_value_set(owner, NULL, NULL);
236
234 eina_shutdown(); 237 eina_shutdown();
235} 238}
236END_TEST 239END_TEST
@@ -258,6 +261,9 @@ START_TEST(eina_test_promise_progress_notify1)
258 261
259 ck_assert(progress_notify_ran); 262 ck_assert(progress_notify_ran);
260 263
264 eina_promise_unref(promise);
265 eina_promise_owner_value_set(owner, NULL, NULL);
266
261 eina_shutdown(); 267 eina_shutdown();
262} 268}
263END_TEST 269END_TEST
@@ -279,6 +285,8 @@ START_TEST(eina_test_promise_progress_notify2)
279 285
280 ck_assert(progress_notify_ran); 286 ck_assert(progress_notify_ran);
281 287
288 eina_promise_owner_value_set(owner, NULL, NULL);
289
282 eina_shutdown(); 290 eina_shutdown();
283} 291}
284END_TEST 292END_TEST
@@ -315,6 +323,9 @@ START_TEST(eina_test_promise_progress_notify3)
315 323
316 ck_assert(progress_notify_ran); 324 ck_assert(progress_notify_ran);
317 325
326 eina_promise_unref(promise);
327 eina_promise_owner_value_set(owner, NULL, NULL);
328
318 eina_shutdown(); 329 eina_shutdown();
319} 330}
320END_TEST 331END_TEST
@@ -517,6 +528,9 @@ START_TEST(eina_test_pointer_promise_progress)
517 528
518 ck_assert(progress_ran); 529 ck_assert(progress_ran);
519 530
531 eina_promise_unref(promise);
532 eina_promise_owner_value_set(owner, NULL, NULL);
533
520 eina_shutdown(); 534 eina_shutdown();
521} 535}
522END_TEST 536END_TEST
@@ -538,6 +552,9 @@ START_TEST(eina_test_pointer_promise_progress_notify1)
538 552
539 ck_assert(progress_notify_ran); 553 ck_assert(progress_notify_ran);
540 554
555 eina_promise_unref(promise);
556 eina_promise_owner_value_set(owner, NULL, NULL);
557
541 eina_shutdown(); 558 eina_shutdown();
542} 559}
543END_TEST 560END_TEST
@@ -559,6 +576,8 @@ START_TEST(eina_test_pointer_promise_progress_notify2)
559 576
560 ck_assert(progress_notify_ran); 577 ck_assert(progress_notify_ran);
561 578
579 eina_promise_owner_value_set(owner, NULL, NULL);
580
562 eina_shutdown(); 581 eina_shutdown();
563} 582}
564END_TEST 583END_TEST
@@ -583,6 +602,9 @@ START_TEST(eina_test_pointer_promise_progress_notify3)
583 602
584 ck_assert(progress_notify_ran); 603 ck_assert(progress_notify_ran);
585 604
605 eina_promise_unref(promise);
606 eina_promise_owner_value_set(owner, NULL, NULL);
607
586 eina_shutdown(); 608 eina_shutdown();
587} 609}
588END_TEST 610END_TEST