summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_promise.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-03-27 13:51:13 -0400
committerStefan Schmidt <stefan@osg.samsung.com>2018-04-05 11:10:26 +0200
commit624925fe6e9c72c639d47135d5ea70d4110ac1fe (patch)
treeb57c12a611bf3b4b492327a7fcb5722cd39dad5b /src/tests/ecore/ecore_test_promise.c
parent730020c7d4a87daf60cbfbb3a0a912b4f75d8cb5 (diff)
tests: move to using checked fixtures for all test suites
individual tests should not need to explicitly call init/shutdown functions in most cases, and many did not properly do this anyway see followup commit which resolves some issues with eina tests ref T6813 ref T6811 Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Diffstat (limited to 'src/tests/ecore/ecore_test_promise.c')
-rw-r--r--src/tests/ecore/ecore_test_promise.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/src/tests/ecore/ecore_test_promise.c b/src/tests/ecore/ecore_test_promise.c
index 90b96f396c..83c34b632b 100644
--- a/src/tests/ecore/ecore_test_promise.c
+++ b/src/tests/ecore/ecore_test_promise.c
@@ -64,8 +64,6 @@ EFL_START_TEST(efl_test_promise_future_success)
64 int progress = 7; 64 int progress = 7;
65 int value = 42; 65 int value = 42;
66 66
67 ecore_init();
68
69 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 67 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
70 fail_if(!p); 68 fail_if(!p);
71 69
@@ -91,7 +89,6 @@ EFL_START_TEST(efl_test_promise_future_success)
91 89
92 fail_if(!deadp); 90 fail_if(!deadp);
93 91
94 ecore_shutdown();
95} 92}
96EFL_END_TEST 93EFL_END_TEST
97 94
@@ -104,8 +101,6 @@ EFL_START_TEST(efl_test_promise_future_success_before_get)
104 Eina_Bool deadf = EINA_FALSE, deadp = EINA_FALSE; 101 Eina_Bool deadf = EINA_FALSE, deadp = EINA_FALSE;
105 int value = 42; 102 int value = 42;
106 103
107 ecore_init();
108
109 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 104 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
110 fail_if(!p); 105 fail_if(!p);
111 106
@@ -131,7 +126,6 @@ EFL_START_TEST(efl_test_promise_future_success_before_get)
131 126
132 fail_if(!deadp); 127 fail_if(!deadp);
133 128
134 ecore_shutdown();
135} 129}
136EFL_END_TEST 130EFL_END_TEST
137 131
@@ -144,8 +138,6 @@ EFL_START_TEST(efl_test_promise_future_cancel)
144 int progress = 7; 138 int progress = 7;
145 int value = 42; 139 int value = 42;
146 140
147 ecore_init();
148
149 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 141 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
150 fail_if(!p); 142 fail_if(!p);
151 143
@@ -175,7 +167,6 @@ EFL_START_TEST(efl_test_promise_future_cancel)
175 167
176 fail_if(!deadp); 168 fail_if(!deadp);
177 169
178 ecore_shutdown();
179} 170}
180EFL_END_TEST 171EFL_END_TEST
181 172
@@ -189,8 +180,6 @@ EFL_START_TEST(efl_test_promise_before_future_success)
189 int progress = 7; 180 int progress = 7;
190 int value = 42; 181 int value = 42;
191 182
192 ecore_init();
193
194 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 183 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
195 fail_if(!p); 184 fail_if(!p);
196 185
@@ -214,7 +203,6 @@ EFL_START_TEST(efl_test_promise_before_future_success)
214 203
215 fail_if(!deadp); 204 fail_if(!deadp);
216 205
217 ecore_shutdown();
218} 206}
219EFL_END_TEST 207EFL_END_TEST
220 208
@@ -227,8 +215,6 @@ EFL_START_TEST(efl_test_promise_before_future_cancel)
227 int progress = 7; 215 int progress = 7;
228 int value = 42; 216 int value = 42;
229 217
230 ecore_init();
231
232 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 218 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
233 fail_if(!p); 219 fail_if(!p);
234 220
@@ -257,7 +243,6 @@ EFL_START_TEST(efl_test_promise_before_future_cancel)
257 243
258 fail_if(!deadp); 244 fail_if(!deadp);
259 245
260 ecore_shutdown();
261} 246}
262EFL_END_TEST 247EFL_END_TEST
263 248
@@ -308,8 +293,6 @@ EFL_START_TEST(efl_test_promise_future_chain_success)
308 int progress = 7; 293 int progress = 7;
309 int value = 42; 294 int value = 42;
310 295
311 ecore_init();
312
313 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 296 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
314 fail_if(!p); 297 fail_if(!p);
315 298
@@ -341,7 +324,6 @@ EFL_START_TEST(efl_test_promise_future_chain_success)
341 324
342 fail_if(!deadp); 325 fail_if(!deadp);
343 326
344 ecore_shutdown();
345} 327}
346EFL_END_TEST 328EFL_END_TEST
347 329
@@ -355,8 +337,6 @@ EFL_START_TEST(efl_test_promise_future_chain_cancel)
355 int progress = 7; 337 int progress = 7;
356 int value = 42; 338 int value = 42;
357 339
358 ecore_init();
359
360 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 340 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
361 fail_if(!p); 341 fail_if(!p);
362 342
@@ -392,7 +372,6 @@ EFL_START_TEST(efl_test_promise_future_chain_cancel)
392 372
393 fail_if(!deadp); 373 fail_if(!deadp);
394 374
395 ecore_shutdown();
396} 375}
397EFL_END_TEST 376EFL_END_TEST
398 377
@@ -407,8 +386,6 @@ EFL_START_TEST(efl_test_promise_future_multi_success)
407 int progress = 7; 386 int progress = 7;
408 int value = 42; 387 int value = 42;
409 388
410 ecore_init();
411
412 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 389 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
413 fail_if(!p); 390 fail_if(!p);
414 391
@@ -438,7 +415,6 @@ EFL_START_TEST(efl_test_promise_future_multi_success)
438 415
439 fail_if(!deadp); 416 fail_if(!deadp);
440 417
441 ecore_shutdown();
442} 418}
443EFL_END_TEST 419EFL_END_TEST
444 420
@@ -452,8 +428,6 @@ EFL_START_TEST(efl_test_promise_future_multi_success_noref)
452 int progress = 7; 428 int progress = 7;
453 int value = 42; 429 int value = 42;
454 430
455 ecore_init();
456
457 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 431 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
458 fail_if(!p); 432 fail_if(!p);
459 433
@@ -481,7 +455,6 @@ EFL_START_TEST(efl_test_promise_future_multi_success_noref)
481 455
482 fail_if(!deadp); 456 fail_if(!deadp);
483 457
484 ecore_shutdown();
485} 458}
486EFL_END_TEST 459EFL_END_TEST
487 460
@@ -495,8 +468,6 @@ EFL_START_TEST(efl_test_promise_future_multi_cancel)
495 int progress = 7; 468 int progress = 7;
496 int value = 42; 469 int value = 42;
497 470
498 ecore_init();
499
500 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 471 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
501 fail_if(!p); 472 fail_if(!p);
502 473
@@ -528,7 +499,6 @@ EFL_START_TEST(efl_test_promise_future_multi_cancel)
528 499
529 fail_if(!deadp); 500 fail_if(!deadp);
530 501
531 ecore_shutdown();
532} 502}
533EFL_END_TEST 503EFL_END_TEST
534 504
@@ -543,8 +513,6 @@ EFL_START_TEST(efl_test_promise_before_future_multi_success)
543 int progress = 7; 513 int progress = 7;
544 int value = 42; 514 int value = 42;
545 515
546 ecore_init();
547
548 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 516 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
549 fail_if(!p); 517 fail_if(!p);
550 518
@@ -572,7 +540,6 @@ EFL_START_TEST(efl_test_promise_before_future_multi_success)
572 540
573 fail_if(!deadp); 541 fail_if(!deadp);
574 542
575 ecore_shutdown();
576} 543}
577EFL_END_TEST 544EFL_END_TEST
578 545
@@ -586,8 +553,6 @@ EFL_START_TEST(efl_test_promise_before_future_multi_success_noref)
586 int progress = 7; 553 int progress = 7;
587 int value = 42; 554 int value = 42;
588 555
589 ecore_init();
590
591 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 556 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
592 fail_if(!p); 557 fail_if(!p);
593 558
@@ -613,7 +578,6 @@ EFL_START_TEST(efl_test_promise_before_future_multi_success_noref)
613 578
614 fail_if(!deadp); 579 fail_if(!deadp);
615 580
616 ecore_shutdown();
617} 581}
618EFL_END_TEST 582EFL_END_TEST
619 583
@@ -628,8 +592,6 @@ EFL_START_TEST(efl_test_promise_before_future_multi_cancel)
628 int progress = 7; 592 int progress = 7;
629 int value = 42; 593 int value = 42;
630 594
631 ecore_init();
632
633 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 595 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
634 fail_if(!p); 596 fail_if(!p);
635 597
@@ -665,7 +627,6 @@ EFL_START_TEST(efl_test_promise_before_future_multi_cancel)
665 627
666 fail_if(!deadp); 628 fail_if(!deadp);
667 629
668 ecore_shutdown();
669} 630}
670EFL_END_TEST 631EFL_END_TEST
671 632
@@ -680,8 +641,6 @@ EFL_START_TEST(efl_test_promise_before_future_multi_cancel_noref)
680 int progress = 7; 641 int progress = 7;
681 int value = 42; 642 int value = 42;
682 643
683 ecore_init();
684
685 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 644 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
686 fail_if(!p); 645 fail_if(!p);
687 646
@@ -717,7 +676,6 @@ EFL_START_TEST(efl_test_promise_before_future_multi_cancel_noref)
717 676
718 fail_if(!deadp); 677 fail_if(!deadp);
719 678
720 ecore_shutdown();
721} 679}
722EFL_END_TEST 680EFL_END_TEST
723 681
@@ -740,8 +698,6 @@ EFL_START_TEST(efl_test_promise_future_optional_success)
740 698
741 cleanup = EINA_FALSE; 699 cleanup = EINA_FALSE;
742 700
743 ecore_init();
744
745 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 701 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
746 fail_if(!p); 702 fail_if(!p);
747 703
@@ -766,7 +722,6 @@ EFL_START_TEST(efl_test_promise_future_optional_success)
766 722
767 fail_if(!deadp || !cleanup); 723 fail_if(!deadp || !cleanup);
768 724
769 ecore_shutdown();
770} 725}
771EFL_END_TEST 726EFL_END_TEST
772 727
@@ -780,8 +735,6 @@ EFL_START_TEST(efl_test_promise_future_optional_cancel)
780 735
781 cleanup = EINA_FALSE; 736 cleanup = EINA_FALSE;
782 737
783 ecore_init();
784
785 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 738 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
786 fail_if(!p); 739 fail_if(!p);
787 740
@@ -810,7 +763,6 @@ EFL_START_TEST(efl_test_promise_future_optional_cancel)
810 763
811 fail_if(!deadp); 764 fail_if(!deadp);
812 765
813 ecore_shutdown();
814} 766}
815EFL_END_TEST 767EFL_END_TEST
816 768
@@ -841,8 +793,6 @@ EFL_START_TEST(efl_test_promise_all)
841 Future_Ok donea = { EINA_FALSE, EINA_FALSE, EINA_FALSE }; 793 Future_Ok donea = { EINA_FALSE, EINA_FALSE, EINA_FALSE };
842 Future_Ok donep1 = { EINA_FALSE, EINA_FALSE, EINA_FALSE }; 794 Future_Ok donep1 = { EINA_FALSE, EINA_FALSE, EINA_FALSE };
843 795
844 ecore_init();
845
846 p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 796 p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
847 p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 797 p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
848 p3 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 798 p3 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
@@ -881,7 +831,6 @@ EFL_START_TEST(efl_test_promise_all)
881 efl_del(p2); 831 efl_del(p2);
882 efl_del(p3); 832 efl_del(p3);
883 833
884 ecore_shutdown();
885} 834}
886EFL_END_TEST 835EFL_END_TEST
887 836
@@ -891,8 +840,6 @@ EFL_START_TEST(efl_test_promise_all_after_value_set)
891 Efl_Future *all = NULL, *f1, *f2, *f3; 840 Efl_Future *all = NULL, *f1, *f2, *f3;
892 Future_Ok donea = { EINA_FALSE, EINA_FALSE, EINA_FALSE }; 841 Future_Ok donea = { EINA_FALSE, EINA_FALSE, EINA_FALSE };
893 842
894 ecore_init();
895
896 p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 843 p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
897 p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 844 p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
898 p3 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 845 p3 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
@@ -925,7 +872,6 @@ EFL_START_TEST(efl_test_promise_all_after_value_set)
925 efl_del(p2); 872 efl_del(p2);
926 efl_del(p3); 873 efl_del(p3);
927 874
928 ecore_shutdown();
929} 875}
930EFL_END_TEST 876EFL_END_TEST
931 877
@@ -949,8 +895,6 @@ EFL_START_TEST(efl_test_promise_race)
949 Future_Ok donea = { EINA_FALSE, EINA_FALSE, EINA_FALSE }; 895 Future_Ok donea = { EINA_FALSE, EINA_FALSE, EINA_FALSE };
950 Future_Ok donep1 = { EINA_FALSE, EINA_FALSE, EINA_FALSE }; 896 Future_Ok donep1 = { EINA_FALSE, EINA_FALSE, EINA_FALSE };
951 897
952 ecore_init();
953
954 p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 898 p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
955 p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 899 p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
956 p3 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 900 p3 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
@@ -977,7 +921,6 @@ EFL_START_TEST(efl_test_promise_race)
977 efl_del(p2); 921 efl_del(p2);
978 efl_del(p3); 922 efl_del(p3);
979 923
980 ecore_shutdown();
981} 924}
982EFL_END_TEST 925EFL_END_TEST
983 926
@@ -987,8 +930,6 @@ EFL_START_TEST(efl_test_future_link)
987 Efl_Future *f; 930 Efl_Future *f;
988 Eo *o; 931 Eo *o;
989 932
990 ecore_init();
991
992 o = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(), 933 o = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(),
993 efl_loop_timer_interval_set(efl_added, 0.0)); 934 efl_loop_timer_interval_set(efl_added, 0.0));
994 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 935 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
@@ -1007,7 +948,6 @@ EFL_START_TEST(efl_test_future_link)
1007 efl_del(o); 948 efl_del(o);
1008 efl_del(p); 949 efl_del(p);
1009 950
1010 ecore_shutdown();
1011} 951}
1012EFL_END_TEST 952EFL_END_TEST
1013 953
@@ -1024,8 +964,6 @@ EFL_START_TEST(efl_test_recursive_mess)
1024 Efl_Promise *p; 964 Efl_Promise *p;
1025 Future_Ok done = { EINA_FALSE, EINA_FALSE, EINA_FALSE }; 965 Future_Ok done = { EINA_FALSE, EINA_FALSE, EINA_FALSE };
1026 966
1027 ecore_init();
1028
1029 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 967 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
1030 efl_future_use(&recursive_future, efl_promise_future_get(p)); 968 efl_future_use(&recursive_future, efl_promise_future_get(p));
1031 efl_future_then(recursive_future, _then_cleanup, _cancel, NULL, &done); 969 efl_future_then(recursive_future, _then_cleanup, _cancel, NULL, &done);
@@ -1036,7 +974,6 @@ EFL_START_TEST(efl_test_recursive_mess)
1036 974
1037 efl_del(p); 975 efl_del(p);
1038 976
1039 ecore_shutdown();
1040} 977}
1041EFL_END_TEST 978EFL_END_TEST
1042 979