summaryrefslogtreecommitdiff
path: root/src/tests
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
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')
-rw-r--r--src/tests/ecore/ecore_test_args.c6
-rw-r--r--src/tests/ecore/ecore_test_ecore.c67
-rw-r--r--src/tests/ecore/ecore_test_promise.c58
-rw-r--r--src/tests/ecore/ecore_test_promise2.c8
-rw-r--r--src/tests/ecore/ecore_test_timer.c2
-rw-r--r--src/tests/ecore/efl_app_suite.c106
-rw-r--r--src/tests/ecore/efl_app_suite.h8
-rw-r--r--src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c2
-rw-r--r--src/tests/eio/eio_model_test_file.c2
-rw-r--r--src/tests/eio/eio_model_test_monitor_add.c2
-rw-r--r--src/tests/eio/eio_test_manager.c12
-rw-r--r--src/tests/eio/eio_test_manager_xattr.c2
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model.c4
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model_method.c2
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model_signal.c2
-rw-r--r--src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c2
-rw-r--r--src/tests/elementary/elm_test_config.c6
-rw-r--r--src/tests/eo_cxx/eo_cxx_test_promise.cc66
18 files changed, 153 insertions, 204 deletions
diff --git a/src/tests/ecore/ecore_test_args.c b/src/tests/ecore/ecore_test_args.c
index 94e5b3f0fa..36bb7d8858 100644
--- a/src/tests/ecore/ecore_test_args.c
+++ b/src/tests/ecore/ecore_test_args.c
@@ -27,7 +27,7 @@ _cb_args1(void *data EINA_UNUSED, const Efl_Event *event)
27START_TEST(ecore_test_args1) 27START_TEST(ecore_test_args1)
28{ 28{
29 ecore_init(); 29 ecore_init();
30 efl_event_callback_add(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_EVENT_ARGUMENTS, 30 efl_event_callback_add(efl_main_loop_get(), EFL_LOOP_EVENT_ARGUMENTS,
31 _cb_args1, NULL); 31 _cb_args1, NULL);
32 ecore_loop_arguments_send(8, args); 32 ecore_loop_arguments_send(8, args);
33 ecore_main_loop_begin(); 33 ecore_main_loop_begin();
@@ -52,7 +52,7 @@ START_TEST(ecore_test_args2)
52 }; 52 };
53 53
54 ecore_init(); 54 ecore_init();
55 efl_event_callback_add(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_EVENT_ARGUMENTS, 55 efl_event_callback_add(efl_main_loop_get(), EFL_LOOP_EVENT_ARGUMENTS,
56 _cb_args2, NULL); 56 _cb_args2, NULL);
57 ecore_loop_arguments_send(1, simple_args); 57 ecore_loop_arguments_send(1, simple_args);
58 ecore_main_loop_begin(); 58 ecore_main_loop_begin();
@@ -72,7 +72,7 @@ _cb_args3(void *data EINA_UNUSED, const Efl_Event *event)
72START_TEST(ecore_test_args3) 72START_TEST(ecore_test_args3)
73{ 73{
74 ecore_init(); 74 ecore_init();
75 efl_event_callback_add(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_EVENT_ARGUMENTS, 75 efl_event_callback_add(efl_main_loop_get(), EFL_LOOP_EVENT_ARGUMENTS,
76 _cb_args3, NULL); 76 _cb_args3, NULL);
77 ecore_loop_arguments_send(0, NULL); 77 ecore_loop_arguments_send(0, NULL);
78 ecore_main_loop_begin(); 78 ecore_main_loop_begin();
diff --git a/src/tests/ecore/ecore_test_ecore.c b/src/tests/ecore/ecore_test_ecore.c
index f94e9055b5..492c2aa033 100644
--- a/src/tests/ecore/ecore_test_ecore.c
+++ b/src/tests/ecore/ecore_test_ecore.c
@@ -317,7 +317,7 @@ START_TEST(ecore_test_efl_loop_fd)
317 ret = pipe(comm); 317 ret = pipe(comm);
318 fail_if(ret != 0); 318 fail_if(ret != 0);
319 319
320 fd = efl_add(EFL_LOOP_FD_CLASS, efl_app_main_loop_get(efl_app_get()), 320 fd = efl_add(EFL_LOOP_FD_CLASS, efl_main_loop_get(),
321 efl_loop_fd_set(efl_added, comm[0]), 321 efl_loop_fd_set(efl_added, comm[0]),
322 efl_event_callback_add(efl_added, EFL_LOOP_FD_EVENT_READ, _eo_read_cb, &did)); 322 efl_event_callback_add(efl_added, EFL_LOOP_FD_EVENT_READ, _eo_read_cb, &did));
323 fail_if(fd == NULL); 323 fail_if(fd == NULL);
@@ -360,7 +360,7 @@ START_TEST(ecore_test_efl_loop_fd_lifecycle)
360 ret = pipe(comm); 360 ret = pipe(comm);
361 fail_if(ret != 0); 361 fail_if(ret != 0);
362 362
363 fd = efl_add(EFL_LOOP_FD_CLASS, efl_app_main_loop_get(efl_app_get()), 363 fd = efl_add(EFL_LOOP_FD_CLASS, efl_main_loop_get(),
364 efl_loop_fd_set(efl_added, comm[0]), 364 efl_loop_fd_set(efl_added, comm[0]),
365 efl_event_callback_add(efl_added, EFL_LOOP_FD_EVENT_READ, _eo_read_cb, &did), 365 efl_event_callback_add(efl_added, EFL_LOOP_FD_EVENT_READ, _eo_read_cb, &did),
366 efl_event_callback_add(efl_added, EFL_EVENT_DEL, _efl_del_cb, &dead)); 366 efl_event_callback_add(efl_added, EFL_EVENT_DEL, _efl_del_cb, &dead));
@@ -857,6 +857,67 @@ START_TEST(ecore_test_ecore_main_loop_poller_add_del)
857} 857}
858END_TEST 858END_TEST
859 859
860START_TEST(ecore_test_efl_loop_register)
861{
862 Efl_Object *t, *n;
863
864 ecore_init();
865
866 t = efl_provider_find(efl_main_loop_get(), EFL_LOOP_CLASS);
867 fail_if(!efl_isa(t, EFL_LOOP_CLASS));
868
869 t = efl_provider_find(efl_main_loop_get(), EFL_LOOP_TIMER_CLASS);
870 fail_if(t != NULL);
871
872 n = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get());
873 fail_if(n != NULL);
874
875 n = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(),
876 efl_loop_timer_interval_set(efl_added, 1.0));
877 efl_loop_register(efl_main_loop_get(), EFL_LOOP_TIMER_CLASS, n);
878
879 t = efl_provider_find(efl_main_loop_get(), EFL_LOOP_TIMER_CLASS);
880 fail_if(!efl_isa(t, EFL_LOOP_TIMER_CLASS));
881 fail_if(t != n);
882
883 efl_loop_unregister(efl_main_loop_get(), EFL_LOOP_TIMER_CLASS, n);
884
885 t = efl_provider_find(efl_main_loop_get(), EFL_LOOP_TIMER_CLASS);
886 fail_if(t != NULL);
887
888 ecore_shutdown();
889}
890END_TEST
891
892START_TEST(ecore_test_efl_app_version)
893{
894 const Efl_Version *ver;
895 Eo *loop;
896
897 ecore_init();
898
899 loop = efl_loop_main_get(EFL_LOOP_CLASS);
900 fail_if(!efl_isa(loop, EFL_LOOP_CLASS));
901
902 efl_build_version_set(EFL_VERSION_MAJOR, EFL_VERSION_MINOR, 0, 0, NULL, EFL_BUILD_ID);
903 ver = efl_loop_app_efl_version_get(loop);
904 fail_if(!ver);
905 fail_if(ver->major != EFL_VERSION_MAJOR);
906 fail_if(ver->minor != EFL_VERSION_MINOR);
907 fail_if(ver->micro != 0);
908 fail_if(ver->revision != 0);
909 fail_if(ver->flavor);
910 fail_if(!eina_streq(ver->build_id, EFL_BUILD_ID));
911
912 ver = efl_loop_efl_version_get(loop);
913 fail_if(!ver);
914 fail_if(ver->major != EFL_VERSION_MAJOR);
915 fail_if(ver->minor != EFL_VERSION_MINOR);
916
917 ecore_shutdown();
918}
919END_TEST
920
860void ecore_test_ecore(TCase *tc) 921void ecore_test_ecore(TCase *tc)
861{ 922{
862 tcase_add_test(tc, ecore_test_ecore_init); 923 tcase_add_test(tc, ecore_test_ecore_init);
@@ -879,4 +940,6 @@ void ecore_test_ecore(TCase *tc)
879 tcase_add_test(tc, ecore_test_ecore_main_loop_poller_add_del); 940 tcase_add_test(tc, ecore_test_ecore_main_loop_poller_add_del);
880 tcase_add_test(tc, ecore_test_efl_loop_fd); 941 tcase_add_test(tc, ecore_test_efl_loop_fd);
881 tcase_add_test(tc, ecore_test_efl_loop_fd_lifecycle); 942 tcase_add_test(tc, ecore_test_efl_loop_fd_lifecycle);
943 tcase_add_test(tc, ecore_test_efl_loop_register);
944 tcase_add_test(tc, ecore_test_efl_app_version);
882} 945}
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
diff --git a/src/tests/ecore/ecore_test_promise2.c b/src/tests/ecore/ecore_test_promise2.c
index 0f70e17a1d..ff663f1685 100644
--- a/src/tests/ecore/ecore_test_promise2.c
+++ b/src/tests/ecore/ecore_test_promise2.c
@@ -156,7 +156,7 @@ _simple_timeout(void *data)
156static Eina_Future_Scheduler * 156static Eina_Future_Scheduler *
157_future_scheduler_get(void) 157_future_scheduler_get(void)
158{ 158{
159 return efl_loop_future_scheduler_get(efl_app_main_loop_get(efl_app_get())); 159 return efl_loop_future_scheduler_get(efl_main_loop_get());
160} 160}
161 161
162static PromiseCtx * 162static PromiseCtx *
@@ -490,7 +490,7 @@ START_TEST(efl_test_timeout)
490 Eina_Bool done = EINA_FALSE; 490 Eina_Bool done = EINA_FALSE;
491 491
492 fail_if(!ecore_init()); 492 fail_if(!ecore_init());
493 f = eina_future_then(efl_loop_timeout(efl_app_main_loop_get(efl_app_get()), 0.0001), 493 f = eina_future_then(efl_loop_timeout(efl_main_loop_get(), 0.0001),
494 _promise_empty_done, &done); 494 _promise_empty_done, &done);
495 fail_if(!f); 495 fail_if(!f);
496 ecore_main_loop_begin(); 496 ecore_main_loop_begin();
@@ -506,7 +506,7 @@ START_TEST(efl_test_job)
506 Eina_Bool done = EINA_FALSE; 506 Eina_Bool done = EINA_FALSE;
507 507
508 fail_if(!ecore_init()); 508 fail_if(!ecore_init());
509 f = eina_future_then(efl_loop_job(efl_app_main_loop_get(efl_app_get())), 509 f = eina_future_then(efl_loop_job(efl_main_loop_get()),
510 _promise_empty_done, &done); 510 _promise_empty_done, &done);
511 fail_if(!f); 511 fail_if(!f);
512 ecore_main_loop_begin(); 512 ecore_main_loop_begin();
@@ -522,7 +522,7 @@ START_TEST(efl_test_idle)
522 Eina_Bool done = EINA_FALSE; 522 Eina_Bool done = EINA_FALSE;
523 523
524 fail_if(!ecore_init()); 524 fail_if(!ecore_init());
525 f = eina_future_then(efl_loop_idle(efl_app_main_loop_get(efl_app_get())), 525 f = eina_future_then(efl_loop_idle(efl_main_loop_get()),
526 _promise_empty_done, &done); 526 _promise_empty_done, &done);
527 fail_if(!f); 527 fail_if(!f);
528 ecore_main_loop_begin(); 528 ecore_main_loop_begin();
diff --git a/src/tests/ecore/ecore_test_timer.c b/src/tests/ecore/ecore_test_timer.c
index ffbd1b5b1b..8895a36cf2 100644
--- a/src/tests/ecore/ecore_test_timer.c
+++ b/src/tests/ecore/ecore_test_timer.c
@@ -267,7 +267,7 @@ START_TEST(ecore_test_timer_lifecycle)
267 t = ecore_timer_add(1.0, _test_time_cb, &rl); 267 t = ecore_timer_add(1.0, _test_time_cb, &rl);
268 efl_event_callback_add((Eo*) t, EFL_EVENT_DEL, _test_death_cb, &dl); 268 efl_event_callback_add((Eo*) t, EFL_EVENT_DEL, _test_death_cb, &dl);
269 269
270 et = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_loop_get(efl_app_get()), 270 et = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(),
271 efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _test_run_cb, &re), 271 efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _test_run_cb, &re),
272 efl_event_callback_add(efl_added, EFL_EVENT_DEL, _test_death_cb, &de), 272 efl_event_callback_add(efl_added, EFL_EVENT_DEL, _test_death_cb, &de),
273 efl_loop_timer_interval_set(efl_added, 1.0)); 273 efl_loop_timer_interval_set(efl_added, 1.0));
diff --git a/src/tests/ecore/efl_app_suite.c b/src/tests/ecore/efl_app_suite.c
deleted file mode 100644
index 7bd52d58b0..0000000000
--- a/src/tests/ecore/efl_app_suite.c
+++ /dev/null
@@ -1,106 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <stdio.h>
6#include <unistd.h>
7#define EFL_NOLEGACY_API_SUPPORT
8#include <Efl_Core.h>
9#include <Efl_Net.h>
10#include "efl_app_suite.h"
11#include "../efl_check.h"
12
13START_TEST(efl_app_test_efl_loop_register)
14{
15 Efl_Object *t, *n, *parent;
16
17 ecore_init();
18
19 t = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_CLASS);
20 fail_if(!efl_isa(t, EFL_LOOP_CLASS));
21
22 parent = efl_parent_get(t);
23 fail_if(!efl_isa(parent, EFL_APP_CLASS));
24 fail_if(parent != efl_app_get());
25
26 t = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS);
27 fail_if(t != NULL);
28
29 n = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_loop_get(efl_app_get()));
30 fail_if(n != NULL);
31
32 n = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_loop_get(efl_app_get()),
33 efl_loop_timer_interval_set(efl_added, 1.0));
34 efl_loop_register(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS, n);
35
36 t = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS);
37 fail_if(!efl_isa(t, EFL_LOOP_TIMER_CLASS));
38 fail_if(t != n);
39
40 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS, n);
41
42 t = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS);
43 fail_if(t != NULL);
44
45 ecore_shutdown();
46}
47END_TEST
48
49START_TEST(efl_app_test_efl_build_version)
50{
51 const Efl_Version *ver;
52 Eo *app;
53
54 ecore_init();
55
56 app = efl_app_get();
57 fail_if(!efl_isa(app, EFL_APP_CLASS));
58
59 efl_build_version_set(EFL_VERSION_MAJOR, EFL_VERSION_MINOR, 0, 0, NULL, EFL_BUILD_ID);
60 ver = efl_app_build_efl_version_get(app);
61 fail_if(!ver);
62 fail_if(ver->major != EFL_VERSION_MAJOR);
63 fail_if(ver->minor != EFL_VERSION_MINOR);
64 fail_if(ver->micro != 0);
65 fail_if(ver->revision != 0);
66 fail_if(ver->flavor);
67 fail_if(!eina_streq(ver->build_id, EFL_BUILD_ID));
68
69 ver = efl_app_efl_version_get(app);
70 fail_if(!ver);
71 fail_if(ver->major != EFL_VERSION_MAJOR);
72 fail_if(ver->minor != EFL_VERSION_MINOR);
73
74 ecore_shutdown();
75}
76END_TEST
77
78void efl_test_efl_app(TCase *tc)
79{
80 tcase_add_test(tc, efl_app_test_efl_loop_register);
81 tcase_add_test(tc, efl_app_test_efl_build_version);
82}
83
84
85static const Efl_Test_Case etc[] = {
86 { "Efl_App", efl_test_efl_app },
87 { NULL, NULL }
88};
89
90int
91main(int argc, char **argv)
92{
93 int failed_count;
94
95 if (!_efl_test_option_disp(argc, argv, etc))
96 return 0;
97
98#ifdef NEED_RUN_IN_TREE
99 putenv("EFL_RUN_IN_TREE=1");
100#endif
101
102 failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
103 "Efl_App", etc);
104
105 return (failed_count == 0) ? 0 : 255;
106}
diff --git a/src/tests/ecore/efl_app_suite.h b/src/tests/ecore/efl_app_suite.h
deleted file mode 100644
index c04dcbe37f..0000000000
--- a/src/tests/ecore/efl_app_suite.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef _EFL_APP_SUITE_H
2#define _EFL_APP_SUITE_H
3
4#include <check.h>
5
6void efl_app_test_efl_app(TCase *tc);
7
8#endif /* _EFL_APP_SUITE_H */
diff --git a/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c b/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c
index a5ad6d191e..563af26c60 100644
--- a/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c
+++ b/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c
@@ -117,7 +117,7 @@ _timeout(void *data,
117 do \ 117 do \
118 { \ 118 { \
119 Eina_Bool _did_timeout = EINA_FALSE; \ 119 Eina_Bool _did_timeout = EINA_FALSE; \
120 Eina_Future *_timeout_future = efl_loop_timeout(efl_app_main_loop_get(efl_app_get()), t); \ 120 Eina_Future *_timeout_future = efl_loop_timeout(efl_main_loop_get(), t); \
121 eina_future_then(_timeout_future, _timeout, &_did_timeout); \ 121 eina_future_then(_timeout_future, _timeout, &_did_timeout); \
122 mark_point(); \ 122 mark_point(); \
123 ecore_main_loop_begin(); \ 123 ecore_main_loop_begin(); \
diff --git a/src/tests/eio/eio_model_test_file.c b/src/tests/eio/eio_model_test_file.c
index abbd7405de..81ab19d2c7 100644
--- a/src/tests/eio/eio_model_test_file.c
+++ b/src/tests/eio/eio_model_test_file.c
@@ -114,7 +114,7 @@ START_TEST(eio_model_test_test_file)
114 fail_if(!efl_object_init(), "ERROR: Cannot init EO!\n"); 114 fail_if(!efl_object_init(), "ERROR: Cannot init EO!\n");
115 fail_if(!eio_init(), "ERROR: Cannot init EIO!\n"); 115 fail_if(!eio_init(), "ERROR: Cannot init EIO!\n");
116 116
117 filemodel = efl_add(EIO_MODEL_CLASS, efl_app_main_loop_get(efl_app_get()), eio_model_path_set(efl_added, EFL_MODEL_TEST_FILENAME_PATH)); 117 filemodel = efl_add(EIO_MODEL_CLASS, efl_main_loop_get(), eio_model_path_set(efl_added, EFL_MODEL_TEST_FILENAME_PATH));
118 fail_if(!filemodel, "ERROR: Cannot init model!\n"); 118 fail_if(!filemodel, "ERROR: Cannot init model!\n");
119 119
120 handler = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_func, NULL); 120 handler = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_func, NULL);
diff --git a/src/tests/eio/eio_model_test_monitor_add.c b/src/tests/eio/eio_model_test_monitor_add.c
index b78b297157..e6b14d57b8 100644
--- a/src/tests/eio/eio_model_test_monitor_add.c
+++ b/src/tests/eio/eio_model_test_monitor_add.c
@@ -112,7 +112,7 @@ START_TEST(eio_model_test_test_monitor_add)
112 112
113 tmpdir = eina_environment_tmp_get(); 113 tmpdir = eina_environment_tmp_get();
114 114
115 filemodel = efl_add(EIO_MODEL_CLASS, efl_app_main_loop_get(efl_app_get()), eio_model_path_set(efl_added, tmpdir)); 115 filemodel = efl_add(EIO_MODEL_CLASS, efl_main_loop_get(), eio_model_path_set(efl_added, tmpdir));
116 fail_if(!filemodel, "ERROR: Cannot init model!\n"); 116 fail_if(!filemodel, "ERROR: Cannot init model!\n");
117 117
118 efl_event_callback_add(filemodel, EFL_MODEL_EVENT_CHILD_ADDED, &_children_added_cb, filemodel); 118 efl_event_callback_add(filemodel, EFL_MODEL_EVENT_CHILD_ADDED, &_children_added_cb, filemodel);
diff --git a/src/tests/eio/eio_test_manager.c b/src/tests/eio/eio_test_manager.c
index 198117dc22..2e396c1ad6 100644
--- a/src/tests/eio/eio_test_manager.c
+++ b/src/tests/eio/eio_test_manager.c
@@ -156,7 +156,7 @@ _test_ls(Efl_Future *(*func)(Eo *obj, const char *path, Eina_Bool recursive),
156 uint64_t expected_test_count, 156 uint64_t expected_test_count,
157 const char* test_dirname) 157 const char* test_dirname)
158{ 158{
159 Efl_Io_Manager *job = efl_add(EFL_IO_MANAGER_CLASS, efl_app_main_loop_get(efl_app_get())); 159 Efl_Io_Manager *job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get());
160 Efl_Future *f = NULL; 160 Efl_Future *f = NULL;
161 uint64_t main_files = 0; 161 uint64_t main_files = 0;
162 162
@@ -206,7 +206,7 @@ START_TEST(efl_io_manager_test_stat)
206 nested_dirname = create_test_dirs(test_dirname); 206 nested_dirname = create_test_dirs(test_dirname);
207 nested_filename = get_full_path(test_dirname, files[3]); 207 nested_filename = get_full_path(test_dirname, files[3]);
208 208
209 job = efl_add(EFL_IO_MANAGER_CLASS, efl_app_main_loop_get(efl_app_get())); 209 job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get());
210 fail_if(!job); 210 fail_if(!job);
211 211
212 // Start testing 212 // Start testing
@@ -257,7 +257,7 @@ START_TEST(efl_io_manager_test_ls)
257 nested_filename = get_full_path(test_dirname, files[3]); 257 nested_filename = get_full_path(test_dirname, files[3]);
258 258
259 // Start testing 259 // Start testing
260 job = efl_add(EFL_IO_MANAGER_CLASS, efl_app_main_loop_get(efl_app_get())); 260 job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get());
261 fail_if(!job); 261 fail_if(!job);
262 262
263 f = efl_io_manager_ls(job, test_dirname, &main_files, _access_cb, NULL); 263 f = efl_io_manager_ls(job, test_dirname, &main_files, _access_cb, NULL);
@@ -311,7 +311,7 @@ START_TEST(efl_io_manager_test_open)
311 nested_dirname = create_test_dirs(test_dirname); 311 nested_dirname = create_test_dirs(test_dirname);
312 nested_filename = get_full_path(test_dirname, files[3]); 312 nested_filename = get_full_path(test_dirname, files[3]);
313 313
314 job = efl_add(EFL_IO_MANAGER_CLASS, efl_app_main_loop_get(efl_app_get())); 314 job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get());
315 315
316 f = efl_io_manager_open(job, nested_filename, EINA_FALSE); 316 f = efl_io_manager_open(job, nested_filename, EINA_FALSE);
317 eina_future_then(f, _open_done_cb, &opened_file); 317 eina_future_then(f, _open_done_cb, &opened_file);
@@ -340,11 +340,11 @@ START_TEST(efl_io_instantiated)
340 340
341 ecore_init(); 341 ecore_init();
342 342
343 fail_if(efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_IO_MANAGER_CLASS) != NULL); 343 fail_if(efl_provider_find(efl_main_loop_get(), EFL_IO_MANAGER_CLASS) != NULL);
344 344
345 eio_init(); 345 eio_init();
346 346
347 manager = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_IO_MANAGER_CLASS); 347 manager = efl_provider_find(efl_main_loop_get(), EFL_IO_MANAGER_CLASS);
348 fail_if(manager == NULL); 348 fail_if(manager == NULL);
349 fail_if(!efl_isa(manager, EFL_IO_MANAGER_CLASS)); 349 fail_if(!efl_isa(manager, EFL_IO_MANAGER_CLASS));
350 350
diff --git a/src/tests/eio/eio_test_manager_xattr.c b/src/tests/eio/eio_test_manager_xattr.c
index 186d28939f..136ae4dc16 100644
--- a/src/tests/eio/eio_test_manager_xattr.c
+++ b/src/tests/eio/eio_test_manager_xattr.c
@@ -130,7 +130,7 @@ START_TEST(eio_test_job_xattr_set)
130 eina_init(); 130 eina_init();
131 eio_init(); 131 eio_init();
132 132
133 job = efl_add(EFL_IO_MANAGER_CLASS, efl_app_main_loop_get(efl_app_get())); 133 job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get());
134 134
135 test_file_path = get_full_path(XATTR_TEST_DIR, filename); 135 test_file_path = get_full_path(XATTR_TEST_DIR, filename);
136 fd = open(test_file_path, 136 fd = open(test_file_path,
diff --git a/src/tests/eldbus/eldbus_test_eldbus_model.c b/src/tests/eldbus/eldbus_test_eldbus_model.c
index df4d49ff4e..49814ec95a 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_model.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_model.c
@@ -172,7 +172,7 @@ check_property(Eo *object, const char *property_name, const char *expected_value
172Eo * 172Eo *
173create_connection(void) 173create_connection(void)
174{ 174{
175 Eo *connection = efl_add_ref(ELDBUS_MODEL_CONNECTION_CLASS, efl_app_main_loop_get(efl_app_get()), eldbus_model_connection_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE)); 175 Eo *connection = efl_add_ref(ELDBUS_MODEL_CONNECTION_CLASS, efl_main_loop_get(), eldbus_model_connection_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE));
176 ck_assert_ptr_ne(NULL, connection); 176 ck_assert_ptr_ne(NULL, connection);
177 return connection; 177 return connection;
178} 178}
@@ -180,7 +180,7 @@ create_connection(void)
180Eo * 180Eo *
181create_object(void) 181create_object(void)
182{ 182{
183 Eo *object = efl_add_ref(ELDBUS_MODEL_OBJECT_CLASS, efl_app_main_loop_get(efl_app_get()), eldbus_model_object_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, ELDBUS_FDO_BUS, ELDBUS_FDO_PATH)); 183 Eo *object = efl_add_ref(ELDBUS_MODEL_OBJECT_CLASS, efl_main_loop_get(), eldbus_model_object_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, ELDBUS_FDO_BUS, ELDBUS_FDO_PATH));
184 ck_assert_ptr_ne(NULL, object); 184 ck_assert_ptr_ne(NULL, object);
185 return object; 185 return object;
186} 186}
diff --git a/src/tests/eldbus/eldbus_test_eldbus_model_method.c b/src/tests/eldbus/eldbus_test_eldbus_model_method.c
index 4298f87e4a..df74b5c13f 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_model_method.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_model_method.c
@@ -29,7 +29,7 @@ _setup(void)
29 29
30 fake_server = fake_server_start(&fake_server_data); 30 fake_server = fake_server_start(&fake_server_data);
31 31
32 fake_server_object = efl_add(ELDBUS_MODEL_OBJECT_CLASS, efl_app_main_loop_get(efl_app_get()), eldbus_model_object_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH)); 32 fake_server_object = efl_add(ELDBUS_MODEL_OBJECT_CLASS, efl_main_loop_get(), eldbus_model_object_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
33 ck_assert_ptr_ne(NULL, fake_server_object); 33 ck_assert_ptr_ne(NULL, fake_server_object);
34 34
35 fake_server_proxy = eldbus_model_proxy_from_object_get(fake_server_object, FAKE_SERVER_INTERFACE); 35 fake_server_proxy = eldbus_model_proxy_from_object_get(fake_server_object, FAKE_SERVER_INTERFACE);
diff --git a/src/tests/eldbus/eldbus_test_eldbus_model_signal.c b/src/tests/eldbus/eldbus_test_eldbus_model_signal.c
index 52ce99593a..be90e9c033 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_model_signal.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_model_signal.c
@@ -27,7 +27,7 @@ _setup(void)
27 27
28 fake_server = fake_server_start(&fake_server_data); 28 fake_server = fake_server_start(&fake_server_data);
29 29
30 fake_server_object = efl_add(ELDBUS_MODEL_OBJECT_CLASS, efl_app_main_loop_get(efl_app_get()), eldbus_model_object_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH)); 30 fake_server_object = efl_add(ELDBUS_MODEL_OBJECT_CLASS, efl_main_loop_get(), eldbus_model_object_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
31 ck_assert_ptr_ne(NULL, fake_server_object); 31 ck_assert_ptr_ne(NULL, fake_server_object);
32 32
33 fake_server_proxy = eldbus_model_proxy_from_object_get(fake_server_object, FAKE_SERVER_INTERFACE); 33 fake_server_proxy = eldbus_model_proxy_from_object_get(fake_server_object, FAKE_SERVER_INTERFACE);
diff --git a/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c b/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c
index f701fa043d..ec8d3bd5b3 100644
--- a/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c
+++ b/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c
@@ -33,7 +33,7 @@ _setup(void)
33 }; 33 };
34 fake_server = fake_server_start(&fake_server_data); 34 fake_server = fake_server_start(&fake_server_data);
35 35
36 fake_server_object = efl_add(ELDBUS_MODEL_OBJECT_CLASS, efl_app_main_loop_get(efl_app_get()), eldbus_model_object_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH)); 36 fake_server_object = efl_add(ELDBUS_MODEL_OBJECT_CLASS, efl_main_loop_get(), eldbus_model_object_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
37 ck_assert_ptr_ne(NULL, fake_server_object); 37 ck_assert_ptr_ne(NULL, fake_server_object);
38 38
39 fake_server_proxy = eldbus_model_proxy_from_object_get(fake_server_object, FAKE_SERVER_INTERFACE); 39 fake_server_proxy = eldbus_model_proxy_from_object_get(fake_server_object, FAKE_SERVER_INTERFACE);
diff --git a/src/tests/elementary/elm_test_config.c b/src/tests/elementary/elm_test_config.c
index 77abc56696..15a799837e 100644
--- a/src/tests/elementary/elm_test_config.c
+++ b/src/tests/elementary/elm_test_config.c
@@ -13,7 +13,7 @@ START_TEST (elm_config_eoapi)
13{ 13{
14 elm_init(1, NULL); 14 elm_init(1, NULL);
15 15
16 Eo *cfg = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_INTERFACE); 16 Eo *cfg = efl_provider_find(efl_main_loop_get(), EFL_CONFIG_INTERFACE);
17 fail_if(!cfg); 17 fail_if(!cfg);
18 18
19#define CONFIG_CHK(opt, typ, val) do { \ 19#define CONFIG_CHK(opt, typ, val) do { \
@@ -150,7 +150,7 @@ START_TEST (elm_config_win)
150{ 150{
151 elm_init(1, NULL); 151 elm_init(1, NULL);
152 152
153 Eo *cfg = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_INTERFACE); 153 Eo *cfg = efl_provider_find(efl_main_loop_get(), EFL_CONFIG_INTERFACE);
154 fail_if(!cfg); 154 fail_if(!cfg);
155 155
156 Eo *win = efl_add(EFL_UI_WIN_CLASS, NULL); 156 Eo *win = efl_add(EFL_UI_WIN_CLASS, NULL);
@@ -185,7 +185,7 @@ START_TEST (elm_config_profiles)
185 // this only tests some of the profile APIs. we're not going to mess with 185 // this only tests some of the profile APIs. we're not going to mess with
186 // the global config during make check :) 186 // the global config during make check :)
187 187
188 Eo *cfg = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_INTERFACE); 188 Eo *cfg = efl_provider_find(efl_main_loop_get(), EFL_CONFIG_INTERFACE);
189 fail_if(!cfg); 189 fail_if(!cfg);
190 190
191 for (int hidden = 0; hidden <= 1; hidden++) 191 for (int hidden = 0; hidden <= 1; hidden++)
diff --git a/src/tests/eo_cxx/eo_cxx_test_promise.cc b/src/tests/eo_cxx/eo_cxx_test_promise.cc
index cba047e8d5..642c9c00c4 100644
--- a/src/tests/eo_cxx/eo_cxx_test_promise.cc
+++ b/src/tests/eo_cxx/eo_cxx_test_promise.cc
@@ -16,7 +16,7 @@ START_TEST(eo_cxx_future_construct_and_destroy)
16 ecore_init(); 16 ecore_init();
17 17
18 { 18 {
19 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 19 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
20 fail_if(!p); 20 fail_if(!p);
21 21
22 f = efl_promise_future_get(p); 22 f = efl_promise_future_get(p);
@@ -35,7 +35,7 @@ START_TEST(eo_cxx_future_wait)
35 35
36 ecore_init(); 36 ecore_init();
37 37
38 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 38 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
39 fail_if(!p); 39 fail_if(!p);
40 40
41 f = efl_promise_future_get(p); 41 f = efl_promise_future_get(p);
@@ -74,7 +74,7 @@ START_TEST(eo_cxx_future_get)
74 74
75 ecore_init(); 75 ecore_init();
76 76
77 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 77 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
78 fail_if(!p); 78 fail_if(!p);
79 79
80 f = efl_promise_future_get(p); 80 f = efl_promise_future_get(p);
@@ -114,7 +114,7 @@ START_TEST(eo_cxx_future_get_error)
114 114
115 ecore_init(); 115 ecore_init();
116 116
117 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 117 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
118 fail_if(!p); 118 fail_if(!p);
119 119
120 f = efl_promise_future_get(p); 120 f = efl_promise_future_get(p);
@@ -157,7 +157,7 @@ START_TEST(eo_cxx_future_then_value)
157 157
158 ecore_init(); 158 ecore_init();
159 159
160 promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 160 promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
161 fail_if(!promise); 161 fail_if(!promise);
162 162
163 f = efl_promise_future_get(promise); 163 f = efl_promise_future_get(promise);
@@ -208,13 +208,13 @@ START_TEST(eo_cxx_future_composite_construct_and_destroy)
208 ecore_init(); 208 ecore_init();
209 209
210 { 210 {
211 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 211 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
212 fail_if(!p1); 212 fail_if(!p1);
213 213
214 Efl_Future *f1 = efl_promise_future_get(p1); 214 Efl_Future *f1 = efl_promise_future_get(p1);
215 fail_if(!f1); 215 fail_if(!f1);
216 216
217 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 217 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
218 fail_if(!p1); 218 fail_if(!p1);
219 219
220 Efl_Future *f2 = efl_promise_future_get(p2); 220 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -236,13 +236,13 @@ START_TEST(eo_cxx_future_composite_wait)
236 ecore_init(); 236 ecore_init();
237 237
238 { 238 {
239 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 239 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
240 fail_if(!p1); 240 fail_if(!p1);
241 241
242 Efl_Future* f1 = efl_promise_future_get(p1); 242 Efl_Future* f1 = efl_promise_future_get(p1);
243 fail_if(!f1); 243 fail_if(!f1);
244 244
245 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 245 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
246 fail_if(!p2); 246 fail_if(!p2);
247 247
248 Efl_Future* f2 = efl_promise_future_get(p2); 248 Efl_Future* f2 = efl_promise_future_get(p2);
@@ -286,13 +286,13 @@ START_TEST(eo_cxx_future_composite_get)
286 ecore_init(); 286 ecore_init();
287 287
288 { 288 {
289 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 289 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
290 fail_if(!p1); 290 fail_if(!p1);
291 291
292 Efl_Future *f1 = efl_promise_future_get(p1); 292 Efl_Future *f1 = efl_promise_future_get(p1);
293 fail_if(!f1); 293 fail_if(!f1);
294 294
295 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 295 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
296 fail_if(!p2); 296 fail_if(!p2);
297 297
298 Efl_Future *f2 = efl_promise_future_get(p2); 298 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -339,13 +339,13 @@ START_TEST(eo_cxx_future_composite_then_value)
339 ecore_init(); 339 ecore_init();
340 340
341 { 341 {
342 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 342 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
343 fail_if(!p1); 343 fail_if(!p1);
344 344
345 Efl_Future *f1 = efl_promise_future_get(p1); 345 Efl_Future *f1 = efl_promise_future_get(p1);
346 fail_if(!f1); 346 fail_if(!f1);
347 347
348 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 348 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
349 fail_if(!p2); 349 fail_if(!p2);
350 350
351 Efl_Future *f2 = efl_promise_future_get(p2); 351 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -403,13 +403,13 @@ START_TEST(eo_cxx_future_all_construct_and_destroy)
403 ecore_init(); 403 ecore_init();
404 404
405 { 405 {
406 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 406 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
407 fail_if(!p1); 407 fail_if(!p1);
408 408
409 Efl_Future *f1 = efl_promise_future_get(p1); 409 Efl_Future *f1 = efl_promise_future_get(p1);
410 fail_if(!f1); 410 fail_if(!f1);
411 411
412 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 412 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
413 fail_if(!p1); 413 fail_if(!p1);
414 414
415 Efl_Future *f2 = efl_promise_future_get(p2); 415 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -431,13 +431,13 @@ START_TEST(eo_cxx_future_all_wait)
431 ecore_init(); 431 ecore_init();
432 432
433 { 433 {
434 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 434 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
435 fail_if(!p1); 435 fail_if(!p1);
436 436
437 Efl_Future* f1 = efl_promise_future_get(p1); 437 Efl_Future* f1 = efl_promise_future_get(p1);
438 fail_if(!f1); 438 fail_if(!f1);
439 439
440 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 440 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
441 fail_if(!p2); 441 fail_if(!p2);
442 442
443 Efl_Future* f2 = efl_promise_future_get(p2); 443 Efl_Future* f2 = efl_promise_future_get(p2);
@@ -478,13 +478,13 @@ START_TEST(eo_cxx_future_all_get)
478 ecore_init(); 478 ecore_init();
479 479
480 { 480 {
481 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 481 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
482 fail_if(!p1); 482 fail_if(!p1);
483 483
484 Efl_Future *f1 = efl_promise_future_get(p1); 484 Efl_Future *f1 = efl_promise_future_get(p1);
485 fail_if(!f1); 485 fail_if(!f1);
486 486
487 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 487 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
488 fail_if(!p2); 488 fail_if(!p2);
489 489
490 Efl_Future *f2 = efl_promise_future_get(p2); 490 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -528,13 +528,13 @@ START_TEST(eo_cxx_future_all_then_value)
528 ecore_init(); 528 ecore_init();
529 529
530 { 530 {
531 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 531 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
532 fail_if(!p1); 532 fail_if(!p1);
533 533
534 Efl_Future *f1 = efl_promise_future_get(p1); 534 Efl_Future *f1 = efl_promise_future_get(p1);
535 fail_if(!f1); 535 fail_if(!f1);
536 536
537 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 537 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
538 fail_if(!p2); 538 fail_if(!p2);
539 539
540 Efl_Future *f2 = efl_promise_future_get(p2); 540 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -591,13 +591,13 @@ START_TEST(eo_cxx_future_race_construct_and_destroy)
591 ecore_init(); 591 ecore_init();
592 592
593 { 593 {
594 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 594 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
595 fail_if(!p1); 595 fail_if(!p1);
596 596
597 Efl_Future *f1 = efl_promise_future_get(p1); 597 Efl_Future *f1 = efl_promise_future_get(p1);
598 fail_if(!f1); 598 fail_if(!f1);
599 599
600 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 600 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
601 fail_if(!p1); 601 fail_if(!p1);
602 602
603 Efl_Future *f2 = efl_promise_future_get(p2); 603 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -617,13 +617,13 @@ START_TEST(eo_cxx_future_race_wait)
617 ecore_init(); 617 ecore_init();
618 618
619 { 619 {
620 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 620 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
621 fail_if(!p1); 621 fail_if(!p1);
622 622
623 Efl_Future* f1 = efl_promise_future_get(p1); 623 Efl_Future* f1 = efl_promise_future_get(p1);
624 fail_if(!f1); 624 fail_if(!f1);
625 625
626 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 626 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
627 fail_if(!p2); 627 fail_if(!p2);
628 628
629 Efl_Future* f2 = efl_promise_future_get(p2); 629 Efl_Future* f2 = efl_promise_future_get(p2);
@@ -661,13 +661,13 @@ START_TEST(eo_cxx_future_race_get)
661 ecore_init(); 661 ecore_init();
662 662
663 { 663 {
664 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 664 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
665 fail_if(!p1); 665 fail_if(!p1);
666 666
667 Efl_Future *f1 = efl_promise_future_get(p1); 667 Efl_Future *f1 = efl_promise_future_get(p1);
668 fail_if(!f1); 668 fail_if(!f1);
669 669
670 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 670 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
671 fail_if(!p2); 671 fail_if(!p2);
672 672
673 Efl_Future *f2 = efl_promise_future_get(p2); 673 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -707,13 +707,13 @@ START_TEST(eo_cxx_future_race_then_value)
707 ecore_init(); 707 ecore_init();
708 708
709 { 709 {
710 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 710 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
711 fail_if(!p1); 711 fail_if(!p1);
712 712
713 Efl_Future *f1 = efl_promise_future_get(p1); 713 Efl_Future *f1 = efl_promise_future_get(p1);
714 fail_if(!f1); 714 fail_if(!f1);
715 715
716 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 716 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
717 fail_if(!p2); 717 fail_if(!p2);
718 718
719 Efl_Future *f2 = efl_promise_future_get(p2); 719 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -765,13 +765,13 @@ START_TEST(eo_cxx_future_race_variant_get)
765 ecore_init(); 765 ecore_init();
766 766
767 { 767 {
768 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 768 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
769 fail_if(!p1); 769 fail_if(!p1);
770 770
771 Efl_Future *f1 = efl_promise_future_get(p1); 771 Efl_Future *f1 = efl_promise_future_get(p1);
772 fail_if(!f1); 772 fail_if(!f1);
773 773
774 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 774 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
775 fail_if(!p2); 775 fail_if(!p2);
776 776
777 Efl_Future *f2 = efl_promise_future_get(p2); 777 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -812,13 +812,13 @@ START_TEST(eo_cxx_future_race_variant_then_value)
812 ecore_init(); 812 ecore_init();
813 813
814 { 814 {
815 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 815 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
816 fail_if(!p1); 816 fail_if(!p1);
817 817
818 Efl_Future *f1 = efl_promise_future_get(p1); 818 Efl_Future *f1 = efl_promise_future_get(p1);
819 fail_if(!f1); 819 fail_if(!f1);
820 820
821 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 821 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
822 fail_if(!p2); 822 fail_if(!p2);
823 823
824 Efl_Future *f2 = efl_promise_future_get(p2); 824 Efl_Future *f2 = efl_promise_future_get(p2);