summaryrefslogtreecommitdiff
path: root/src/tests/eio
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/eio
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/eio')
-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
4 files changed, 9 insertions, 9 deletions
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,