summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_promise.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-02-27 14:10:12 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-03-03 13:40:33 +0900
commit1c74aaa7e9c9fa1732b467aca5ee1458e3721f0a (patch)
treeaa8cfdf82e579b61cec0ca3d08d2d9cfc4eab651 /src/tests/ecore/ecore_test_promise.c
parent6f092071ac54d10dde39889571518e4b9d17308f (diff)
Revert "cxx: Fix manual code after efl_app change."
This reverts commit 135154303bea691c6f7f9472a5dec32d9103c38d. Revert "efl: move signal events from efl.loop to efl.app" This reverts commit 3dbca39f98288580c62a43c179ac11621433ec88. Revert "efl: add test suite for efl_app" This reverts commit 3e94be5d73256a7f5c02d3a9474173226be7beff. Revert "efl: create Efl.App class, the parent of Efl.Loop" This reverts commit 28fe00b94e55575c15684959b89a614d5a579309. Go back to before efl.app because I think this should be done with superclassing here not a parent object. reasons? 1. multiple loops per single thread make no sense. so if multilpe loop objects they wont be contained in a single app object and then deleted like this. 2. the app object is not really sharable in this design so it cant be accessed from other threads 3. it makes it harder to get the main loop or app object (well 2 func calls one calling the other and more typing. it is longer to type and more work where it is not necessary, and again it can't work from other threads unless we go duplicating efl.app per thread and then what is the point of splittyign out the signal events from efl.loop then?) etc.
Diffstat (limited to 'src/tests/ecore/ecore_test_promise.c')
-rw-r--r--src/tests/ecore/ecore_test_promise.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/tests/ecore/ecore_test_promise.c b/src/tests/ecore/ecore_test_promise.c
index fc36792ea2..3a3aab6277 100644
--- a/src/tests/ecore/ecore_test_promise.c
+++ b/src/tests/ecore/ecore_test_promise.c
@@ -66,7 +66,7 @@ START_TEST(efl_test_promise_future_success)
66 66
67 ecore_init(); 67 ecore_init();
68 68
69 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 69 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
70 fail_if(!p); 70 fail_if(!p);
71 71
72 f = efl_promise_future_get(p); 72 f = efl_promise_future_get(p);
@@ -106,7 +106,7 @@ START_TEST(efl_test_promise_future_success_before_get)
106 106
107 ecore_init(); 107 ecore_init();
108 108
109 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 109 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
110 fail_if(!p); 110 fail_if(!p);
111 111
112 efl_promise_value_set(p, &value, NULL); 112 efl_promise_value_set(p, &value, NULL);
@@ -146,7 +146,7 @@ START_TEST(efl_test_promise_future_cancel)
146 146
147 ecore_init(); 147 ecore_init();
148 148
149 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 149 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
150 fail_if(!p); 150 fail_if(!p);
151 151
152 efl_future_use(&f, efl_promise_future_get(p)); 152 efl_future_use(&f, efl_promise_future_get(p));
@@ -191,7 +191,7 @@ START_TEST(efl_test_promise_before_future_success)
191 191
192 ecore_init(); 192 ecore_init();
193 193
194 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 194 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
195 fail_if(!p); 195 fail_if(!p);
196 196
197 f = efl_promise_future_get(p); 197 f = efl_promise_future_get(p);
@@ -229,7 +229,7 @@ START_TEST(efl_test_promise_before_future_cancel)
229 229
230 ecore_init(); 230 ecore_init();
231 231
232 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 232 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
233 fail_if(!p); 233 fail_if(!p);
234 234
235 efl_future_use(&f, efl_promise_future_get(p)); 235 efl_future_use(&f, efl_promise_future_get(p));
@@ -310,7 +310,7 @@ START_TEST(efl_test_promise_future_chain_success)
310 310
311 ecore_init(); 311 ecore_init();
312 312
313 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 313 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
314 fail_if(!p); 314 fail_if(!p);
315 315
316 f1 = efl_promise_future_get(p); 316 f1 = efl_promise_future_get(p);
@@ -357,7 +357,7 @@ START_TEST(efl_test_promise_future_chain_cancel)
357 357
358 ecore_init(); 358 ecore_init();
359 359
360 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 360 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
361 fail_if(!p); 361 fail_if(!p);
362 362
363 efl_future_use(&f1, efl_promise_future_get(p)); 363 efl_future_use(&f1, efl_promise_future_get(p));
@@ -409,7 +409,7 @@ START_TEST(efl_test_promise_future_multi_success)
409 409
410 ecore_init(); 410 ecore_init();
411 411
412 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 412 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
413 fail_if(!p); 413 fail_if(!p);
414 414
415 f = efl_promise_future_get(p); 415 f = efl_promise_future_get(p);
@@ -454,7 +454,7 @@ START_TEST(efl_test_promise_future_multi_success_noref)
454 454
455 ecore_init(); 455 ecore_init();
456 456
457 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 457 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
458 fail_if(!p); 458 fail_if(!p);
459 459
460 f = efl_promise_future_get(p); 460 f = efl_promise_future_get(p);
@@ -497,7 +497,7 @@ START_TEST(efl_test_promise_future_multi_cancel)
497 497
498 ecore_init(); 498 ecore_init();
499 499
500 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 500 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
501 fail_if(!p); 501 fail_if(!p);
502 502
503 efl_future_use(&f, efl_promise_future_get(p)); 503 efl_future_use(&f, efl_promise_future_get(p));
@@ -545,7 +545,7 @@ START_TEST(efl_test_promise_before_future_multi_success)
545 545
546 ecore_init(); 546 ecore_init();
547 547
548 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 548 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
549 fail_if(!p); 549 fail_if(!p);
550 550
551 f = efl_promise_future_get(p); 551 f = efl_promise_future_get(p);
@@ -588,7 +588,7 @@ START_TEST(efl_test_promise_before_future_multi_success_noref)
588 588
589 ecore_init(); 589 ecore_init();
590 590
591 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 591 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
592 fail_if(!p); 592 fail_if(!p);
593 593
594 f = efl_promise_future_get(p); 594 f = efl_promise_future_get(p);
@@ -630,7 +630,7 @@ START_TEST(efl_test_promise_before_future_multi_cancel)
630 630
631 ecore_init(); 631 ecore_init();
632 632
633 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 633 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
634 fail_if(!p); 634 fail_if(!p);
635 635
636 efl_future_use(&f, efl_promise_future_get(p)); 636 efl_future_use(&f, efl_promise_future_get(p));
@@ -682,7 +682,7 @@ START_TEST(efl_test_promise_before_future_multi_cancel_noref)
682 682
683 ecore_init(); 683 ecore_init();
684 684
685 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 685 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
686 fail_if(!p); 686 fail_if(!p);
687 687
688 efl_future_use(&f, efl_promise_future_get(p)); 688 efl_future_use(&f, efl_promise_future_get(p));
@@ -742,7 +742,7 @@ START_TEST(efl_test_promise_future_optional_success)
742 742
743 ecore_init(); 743 ecore_init();
744 744
745 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 745 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
746 fail_if(!p); 746 fail_if(!p);
747 747
748 f = efl_promise_future_get(p); 748 f = efl_promise_future_get(p);
@@ -782,7 +782,7 @@ START_TEST(efl_test_promise_future_optional_cancel)
782 782
783 ecore_init(); 783 ecore_init();
784 784
785 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 785 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
786 fail_if(!p); 786 fail_if(!p);
787 787
788 efl_future_use(&f, efl_promise_future_get(p)); 788 efl_future_use(&f, efl_promise_future_get(p));
@@ -843,9 +843,9 @@ START_TEST(efl_test_promise_all)
843 843
844 ecore_init(); 844 ecore_init();
845 845
846 p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 846 p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
847 p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 847 p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
848 p3 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 848 p3 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
849 fail_if(!p1 || !p2 || !p3); 849 fail_if(!p1 || !p2 || !p3);
850 850
851 f1 = efl_ref(efl_promise_future_get(p1)); 851 f1 = efl_ref(efl_promise_future_get(p1));
@@ -893,9 +893,9 @@ START_TEST(efl_test_promise_all_after_value_set)
893 893
894 ecore_init(); 894 ecore_init();
895 895
896 p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 896 p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
897 p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 897 p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
898 p3 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 898 p3 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
899 fail_if(!p1 || !p2 || !p3); 899 fail_if(!p1 || !p2 || !p3);
900 900
901 f1 = efl_promise_future_get(p1); 901 f1 = efl_promise_future_get(p1);
@@ -951,9 +951,9 @@ START_TEST(efl_test_promise_race)
951 951
952 ecore_init(); 952 ecore_init();
953 953
954 p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 954 p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
955 p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 955 p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
956 p3 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 956 p3 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
957 fail_if(!p1 || !p2 || !p3); 957 fail_if(!p1 || !p2 || !p3);
958 958
959 f1 = efl_ref(efl_promise_future_get(p1)); 959 f1 = efl_ref(efl_promise_future_get(p1));
@@ -989,9 +989,9 @@ START_TEST(efl_test_future_link)
989 989
990 ecore_init(); 990 ecore_init();
991 991
992 o = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_loop_get(efl_app_get()), 992 o = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(),
993 efl_loop_timer_interval_set(efl_added, 0.0)); 993 efl_loop_timer_interval_set(efl_added, 0.0));
994 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 994 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
995 efl_future_use(&f, efl_promise_future_get(p)); 995 efl_future_use(&f, efl_promise_future_get(p));
996 efl_future_link(o, f); 996 efl_future_link(o, f);
997 997
@@ -999,7 +999,7 @@ START_TEST(efl_test_future_link)
999 efl_del(o); 999 efl_del(o);
1000 fail_if(f); 1000 fail_if(f);
1001 1001
1002 o = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_loop_get(efl_app_get()), 1002 o = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(),
1003 efl_loop_timer_interval_set(efl_added, 0.0)); 1003 efl_loop_timer_interval_set(efl_added, 0.0));
1004 efl_future_use(&f, efl_promise_future_get(p)); 1004 efl_future_use(&f, efl_promise_future_get(p));
1005 efl_future_cancel(f); 1005 efl_future_cancel(f);
@@ -1026,7 +1026,7 @@ START_TEST(efl_test_recursive_mess)
1026 1026
1027 ecore_init(); 1027 ecore_init();
1028 1028
1029 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 1029 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
1030 efl_future_use(&recursive_future, efl_promise_future_get(p)); 1030 efl_future_use(&recursive_future, efl_promise_future_get(p));
1031 efl_future_then(recursive_future, _then_cleanup, _cancel, NULL, &done); 1031 efl_future_then(recursive_future, _then_cleanup, _cancel, NULL, &done);
1032 1032