summaryrefslogtreecommitdiff
path: root/src/tests/eio
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-08-10 15:23:04 +0100
committerTom Hacohen <tom@stosb.com>2016-08-11 17:04:43 +0100
commitc662934be8bcbaba60d1688e77533acbea5d09b9 (patch)
tree8e12b5ffd083024f09b7ec7fa9f979113056fb9d /src/tests/eio
parente64e120a51972c44fb8cae88a78bb4aa34f502c7 (diff)
Change the EFL to follow the new Eo rename.
Diffstat (limited to 'src/tests/eio')
-rw-r--r--src/tests/eio/eio_model_test_monitor_add.c4
-rw-r--r--src/tests/eio/eio_test_manager.c14
-rw-r--r--src/tests/eio/eio_test_manager_xattr.c2
-rw-r--r--src/tests/eio/eio_test_sentry.c34
4 files changed, 27 insertions, 27 deletions
diff --git a/src/tests/eio/eio_model_test_monitor_add.c b/src/tests/eio/eio_model_test_monitor_add.c
index d6c54befef..126b1d7156 100644
--- a/src/tests/eio/eio_model_test_monitor_add.c
+++ b/src/tests/eio/eio_model_test_monitor_add.c
@@ -97,8 +97,8 @@ START_TEST(eio_model_test_test_monitor_add)
97 filemodel = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(eo_self, tmpdir)); 97 filemodel = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(eo_self, tmpdir));
98 fail_if(!filemodel, "ERROR: Cannot init model!\n"); 98 fail_if(!filemodel, "ERROR: Cannot init model!\n");
99 99
100 eo_event_callback_add(filemodel, EFL_MODEL_EVENT_CHILD_ADDED, &_children_added_cb, filemodel); 100 efl_event_callback_add(filemodel, EFL_MODEL_EVENT_CHILD_ADDED, &_children_added_cb, filemodel);
101 eo_event_callback_add(filemodel, EFL_MODEL_EVENT_CHILD_REMOVED, &_children_removed_cb, NULL); 101 efl_event_callback_add(filemodel, EFL_MODEL_EVENT_CHILD_REMOVED, &_children_removed_cb, NULL);
102 102
103 Eina_Promise* promise; 103 Eina_Promise* promise;
104 promise = efl_model_children_slice_get(filemodel, 0, 0); 104 promise = efl_model_children_slice_get(filemodel, 0, 0);
diff --git a/src/tests/eio/eio_test_manager.c b/src/tests/eio/eio_test_manager.c
index 7bd0015dab..795c0e23fd 100644
--- a/src/tests/eio/eio_test_manager.c
+++ b/src/tests/eio/eio_test_manager.c
@@ -105,8 +105,8 @@ typedef Eina_Promise* (*Efl_Io_Manager_Test_Stat_Ls_Func)(Eo *job, const char *p
105 105
106static void 106static void
107_do_ls_test(Efl_Io_Manager_Test_Stat_Ls_Func ls_func, 107_do_ls_test(Efl_Io_Manager_Test_Stat_Ls_Func ls_func,
108 const Eo_Event_Description *event, 108 const Efl_Event_Description *event,
109 Eo_Event_Cb filter_cb, 109 Efl_Event_Cb filter_cb,
110 Eina_Promise_Progress_Cb progress_cb, 110 Eina_Promise_Progress_Cb progress_cb,
111 int expected_test_count, 111 int expected_test_count,
112 const char* test_dirname) 112 const char* test_dirname)
@@ -116,7 +116,7 @@ _do_ls_test(Efl_Io_Manager_Test_Stat_Ls_Func ls_func,
116 Efl_Io_Manager *job = eo_add(EFL_IO_MANAGER_CLASS, NULL); 116 Efl_Io_Manager *job = eo_add(EFL_IO_MANAGER_CLASS, NULL);
117 Eina_Promise *promise = NULL; 117 Eina_Promise *promise = NULL;
118 118
119 eo_event_callback_add(job, event, filter_cb, NULL); 119 efl_event_callback_add(job, event, filter_cb, NULL);
120 promise = ls_func(job, test_dirname); 120 promise = ls_func(job, test_dirname);
121 test_count = expected_test_count; 121 test_count = expected_test_count;
122 eina_promise_progress_cb_add(promise, progress_cb, &main_files, NULL); 122 eina_promise_progress_cb_add(promise, progress_cb, &main_files, NULL);
@@ -136,7 +136,7 @@ _do_direct_ls_test(Efl_Io_Manager_Test_Stat_Ls_Func ls_func,
136{ 136{
137 _do_ls_test(ls_func, 137 _do_ls_test(ls_func,
138 EFL_IO_MANAGER_EVENT_FILTER_DIRECT, 138 EFL_IO_MANAGER_EVENT_FILTER_DIRECT,
139 (Eo_Event_Cb)&_filter_direct_cb, 139 (Efl_Event_Cb)&_filter_direct_cb,
140 (Eina_Promise_Progress_Cb)&_main_direct_cb, 140 (Eina_Promise_Progress_Cb)&_main_direct_cb,
141 expected_test_count, 141 expected_test_count,
142 test_dirname); 142 test_dirname);
@@ -209,7 +209,7 @@ START_TEST(efl_io_manager_test_ls_funcs)
209 209
210 _do_ls_test(&efl_io_manager_file_ls, 210 _do_ls_test(&efl_io_manager_file_ls,
211 EFL_IO_MANAGER_EVENT_FILTER_NAME, 211 EFL_IO_MANAGER_EVENT_FILTER_NAME,
212 (Eo_Event_Cb)&_filter_cb, 212 (Efl_Event_Cb)&_filter_cb,
213 (Eina_Promise_Progress_Cb)&_main_cb, 213 (Eina_Promise_Progress_Cb)&_main_cb,
214 5, 214 5,
215 test_dirname); 215 test_dirname);
@@ -283,11 +283,11 @@ START_TEST(efl_io_instantiated)
283 283
284 ecore_init(); 284 ecore_init();
285 285
286 fail_if(eo_provider_find(ecore_main_loop_get(), EFL_IO_MANAGER_CLASS) != NULL); 286 fail_if(efl_provider_find(ecore_main_loop_get(), EFL_IO_MANAGER_CLASS) != NULL);
287 287
288 eio_init(); 288 eio_init();
289 289
290 manager = eo_provider_find(ecore_main_loop_get(), EFL_IO_MANAGER_CLASS); 290 manager = efl_provider_find(ecore_main_loop_get(), EFL_IO_MANAGER_CLASS);
291 fail_if(manager == NULL); 291 fail_if(manager == NULL);
292 fail_if(!eo_isa(manager, EFL_IO_MANAGER_CLASS)); 292 fail_if(!eo_isa(manager, EFL_IO_MANAGER_CLASS));
293 293
diff --git a/src/tests/eio/eio_test_manager_xattr.c b/src/tests/eio/eio_test_manager_xattr.c
index 94f5b49425..77aa30c232 100644
--- a/src/tests/eio/eio_test_manager_xattr.c
+++ b/src/tests/eio/eio_test_manager_xattr.c
@@ -173,7 +173,7 @@ START_TEST(eio_test_job_xattr_set)
173 173
174 num_of_attr = 0; 174 num_of_attr = 0;
175 175
176 eo_event_callback_add(job, EFL_IO_MANAGER_EVENT_XATTR, _filter_cb, NULL); 176 efl_event_callback_add(job, EFL_IO_MANAGER_EVENT_XATTR, _filter_cb, NULL);
177 list_promise = efl_io_manager_file_xattr_list_get(job, test_file_path); 177 list_promise = efl_io_manager_file_xattr_list_get(job, test_file_path);
178 eina_promise_progress_cb_add(list_promise, _main_cb, &num_of_attr, NULL); 178 eina_promise_progress_cb_add(list_promise, _main_cb, &num_of_attr, NULL);
179 eina_promise_then(list_promise, _done_cb, _error_cb, &num_of_attr); 179 eina_promise_then(list_promise, _done_cb, _error_cb, &num_of_attr);
diff --git a/src/tests/eio/eio_test_sentry.c b/src/tests/eio/eio_test_sentry.c
index 5a7247a557..e00a7d8529 100644
--- a/src/tests/eio/eio_test_sentry.c
+++ b/src/tests/eio/eio_test_sentry.c
@@ -239,7 +239,7 @@ START_TEST(eio_test_sentry_directory_file_created_notify)
239 239
240 //monitor directory 240 //monitor directory
241 fail_if(!eio_sentry_add(sentry, dirname)); 241 fail_if(!eio_sentry_add(sentry, dirname));
242 eo_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_CREATED, (Eo_Event_Cb)_target_notified_cb, filename); 242 efl_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_CREATED, (Efl_Event_Cb)_target_notified_cb, filename);
243 243
244 ecore_timer_add(TEST_OPERATION_DELAY, _create_file, filename); 244 ecore_timer_add(TEST_OPERATION_DELAY, _create_file, filename);
245 245
@@ -266,7 +266,7 @@ START_TEST(eio_test_sentry_directory_file_deleted_notify)
266 266
267 //monitor directory 267 //monitor directory
268 fail_if(!eio_sentry_add(sentry, dirname)); 268 fail_if(!eio_sentry_add(sentry, dirname));
269 eo_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_DELETED, (Eo_Event_Cb)_target_notified_cb, filename); 269 efl_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_DELETED, (Efl_Event_Cb)_target_notified_cb, filename);
270 270
271 ecore_timer_add(TEST_OPERATION_DELAY, _delete_file, filename); 271 ecore_timer_add(TEST_OPERATION_DELAY, _delete_file, filename);
272 272
@@ -293,7 +293,7 @@ START_TEST(eio_test_sentry_directory_file_modified_notify)
293 293
294 //monitor directory 294 //monitor directory
295 fail_if(!eio_sentry_add(sentry, dirname)); 295 fail_if(!eio_sentry_add(sentry, dirname));
296 eo_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_MODIFIED, (Eo_Event_Cb)_target_notified_cb, filename); 296 efl_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_MODIFIED, (Efl_Event_Cb)_target_notified_cb, filename);
297 297
298 ecore_timer_add(TEST_OPERATION_DELAY, _modify_file, filename); 298 ecore_timer_add(TEST_OPERATION_DELAY, _modify_file, filename);
299 299
@@ -321,7 +321,7 @@ START_TEST(eio_test_sentry_directory_file_closed_notify)
321 321
322 //monitor directory 322 //monitor directory
323 fail_if(!eio_sentry_add(sentry, dirname)); 323 fail_if(!eio_sentry_add(sentry, dirname));
324 eo_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_CLOSED, (Eo_Event_Cb)_target_notified_cb, filename); 324 efl_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_CLOSED, (Efl_Event_Cb)_target_notified_cb, filename);
325 ecore_timer_add(TEST_OPERATION_DELAY, _modify_file, filename); 325 ecore_timer_add(TEST_OPERATION_DELAY, _modify_file, filename);
326 326
327 ecore_main_loop_begin(); 327 ecore_main_loop_begin();
@@ -346,7 +346,7 @@ START_TEST(eio_test_sentry_directory_directory_created_notify)
346 346
347 //monitor directory 347 //monitor directory
348 fail_if(!eio_sentry_add(sentry, dirname)); 348 fail_if(!eio_sentry_add(sentry, dirname));
349 eo_event_callback_add(sentry, EIO_SENTRY_EVENT_DIRECTORY_CREATED, (Eo_Event_Cb)_target_notified_cb, filename); 349 efl_event_callback_add(sentry, EIO_SENTRY_EVENT_DIRECTORY_CREATED, (Efl_Event_Cb)_target_notified_cb, filename);
350 350
351 ecore_timer_add(TEST_OPERATION_DELAY, _create_directory, filename); 351 ecore_timer_add(TEST_OPERATION_DELAY, _create_directory, filename);
352 352
@@ -373,7 +373,7 @@ START_TEST(eio_test_sentry_directory_directory_deleted_notify)
373 373
374 //monitor directory 374 //monitor directory
375 fail_if(!eio_sentry_add(sentry, dirname)); 375 fail_if(!eio_sentry_add(sentry, dirname));
376 eo_event_callback_add(sentry, EIO_SENTRY_EVENT_DIRECTORY_DELETED, (Eo_Event_Cb)_target_notified_cb, filename); 376 efl_event_callback_add(sentry, EIO_SENTRY_EVENT_DIRECTORY_DELETED, (Efl_Event_Cb)_target_notified_cb, filename);
377 377
378 ecore_timer_add(TEST_OPERATION_DELAY, _delete_directory, filename); 378 ecore_timer_add(TEST_OPERATION_DELAY, _delete_directory, filename);
379 379
@@ -400,7 +400,7 @@ START_TEST(eio_test_sentry_directory_directory_modified_notify)
400 400
401 //monitor directory 401 //monitor directory
402 fail_if(!eio_sentry_add(sentry, dirname)); 402 fail_if(!eio_sentry_add(sentry, dirname));
403 eo_event_callback_add(sentry, EIO_SENTRY_EVENT_DIRECTORY_MODIFIED, (Eo_Event_Cb)_target_notified_cb, filename); 403 efl_event_callback_add(sentry, EIO_SENTRY_EVENT_DIRECTORY_MODIFIED, (Efl_Event_Cb)_target_notified_cb, filename);
404 404
405 ecore_timer_add(TEST_OPERATION_DELAY, _modify_attrib_file, filename); 405 ecore_timer_add(TEST_OPERATION_DELAY, _modify_attrib_file, filename);
406 406
@@ -422,7 +422,7 @@ START_TEST(eio_test_sentry_directory_directory_self_deleted_notify)
422 422
423 //monitor directory 423 //monitor directory
424 fail_if(!eio_sentry_add(sentry, dirname)); 424 fail_if(!eio_sentry_add(sentry, dirname));
425 eo_event_callback_add(sentry, EIO_SENTRY_EVENT_SELF_DELETED, (Eo_Event_Cb)_target_notified_cb, dirname); 425 efl_event_callback_add(sentry, EIO_SENTRY_EVENT_SELF_DELETED, (Efl_Event_Cb)_target_notified_cb, dirname);
426 426
427 ecore_timer_add(TEST_OPERATION_DELAY, _delete_directory, dirname); 427 ecore_timer_add(TEST_OPERATION_DELAY, _delete_directory, dirname);
428 428
@@ -451,7 +451,7 @@ START_TEST(eio_test_sentry_file_file_modified_notify)
451 451
452 //monitor file 452 //monitor file
453 fail_if(!eio_sentry_add(sentry, filename)); 453 fail_if(!eio_sentry_add(sentry, filename));
454 eo_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_MODIFIED, (Eo_Event_Cb)_target_notified_cb, filename); 454 efl_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_MODIFIED, (Efl_Event_Cb)_target_notified_cb, filename);
455 455
456 ecore_timer_add(TEST_OPERATION_DELAY, _modify_file, filename); 456 ecore_timer_add(TEST_OPERATION_DELAY, _modify_file, filename);
457 457
@@ -479,7 +479,7 @@ START_TEST(eio_test_sentry_file_file_attrib_modified_notify)
479 479
480 //monitor file 480 //monitor file
481 fail_if(!eio_sentry_add(sentry, filename)); 481 fail_if(!eio_sentry_add(sentry, filename));
482 eo_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_MODIFIED, (Eo_Event_Cb)_target_notified_cb, filename); 482 efl_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_MODIFIED, (Efl_Event_Cb)_target_notified_cb, filename);
483 483
484 ecore_timer_add(TEST_OPERATION_DELAY, _modify_attrib_file, filename); 484 ecore_timer_add(TEST_OPERATION_DELAY, _modify_attrib_file, filename);
485 485
@@ -507,7 +507,7 @@ START_TEST(eio_test_sentry_file_file_closed_notify)
507 507
508 //monitor file 508 //monitor file
509 fail_if(!eio_sentry_add(sentry, dirname)); 509 fail_if(!eio_sentry_add(sentry, dirname));
510 eo_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_CLOSED, (Eo_Event_Cb)_target_notified_cb, filename); 510 efl_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_CLOSED, (Efl_Event_Cb)_target_notified_cb, filename);
511 ecore_timer_add(TEST_OPERATION_DELAY, _modify_file, filename); 511 ecore_timer_add(TEST_OPERATION_DELAY, _modify_file, filename);
512 512
513 ecore_main_loop_begin(); 513 ecore_main_loop_begin();
@@ -533,7 +533,7 @@ START_TEST(eio_test_sentry_file_file_self_deleted_notify)
533 533
534 //monitor file 534 //monitor file
535 fail_if(!eio_sentry_add(sentry, filename)); 535 fail_if(!eio_sentry_add(sentry, filename));
536 eo_event_callback_add(sentry, EIO_SENTRY_EVENT_SELF_DELETED, (Eo_Event_Cb)_target_notified_cb, filename); 536 efl_event_callback_add(sentry, EIO_SENTRY_EVENT_SELF_DELETED, (Efl_Event_Cb)_target_notified_cb, filename);
537 537
538 ecore_timer_add(TEST_OPERATION_DELAY, _delete_file, filename); 538 ecore_timer_add(TEST_OPERATION_DELAY, _delete_file, filename);
539 539
@@ -563,7 +563,7 @@ START_TEST(eio_test_sentry_two_monitors_one_event)
563 //monitor directory 563 //monitor directory
564 fail_if(!eio_sentry_add(sentry, dirname)); 564 fail_if(!eio_sentry_add(sentry, dirname));
565 fail_if(!eio_sentry_add(sentry, dirname2)); 565 fail_if(!eio_sentry_add(sentry, dirname2));
566 eo_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_CREATED, (Eo_Event_Cb)_target_notified_cb, filename); 566 efl_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_CREATED, (Efl_Event_Cb)_target_notified_cb, filename);
567 567
568 ecore_timer_add(TEST_OPERATION_DELAY, _create_file, filename); 568 ecore_timer_add(TEST_OPERATION_DELAY, _create_file, filename);
569 569
@@ -596,7 +596,7 @@ START_TEST(eio_test_sentry_two_monitors_one_removed_one_event)
596 fail_if(!eio_sentry_add(sentry, dirname2)); 596 fail_if(!eio_sentry_add(sentry, dirname2));
597 fail_if(!eio_sentry_add(sentry, dirname)); 597 fail_if(!eio_sentry_add(sentry, dirname));
598 eio_sentry_del(sentry, dirname2); 598 eio_sentry_del(sentry, dirname2);
599 eo_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_CREATED, (Eo_Event_Cb)_target_notified_cb, filename); 599 efl_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_CREATED, (Efl_Event_Cb)_target_notified_cb, filename);
600 600
601 ecore_timer_add(TEST_OPERATION_DELAY, _create_file, filename); 601 ecore_timer_add(TEST_OPERATION_DELAY, _create_file, filename);
602 602
@@ -633,7 +633,7 @@ START_TEST(eio_test_sentry_two_monitors_one_removed_no_event)
633 fail_if(!eio_sentry_add(sentry, dirname)); 633 fail_if(!eio_sentry_add(sentry, dirname));
634 fail_if(!eio_sentry_add(sentry, dirname2)); 634 fail_if(!eio_sentry_add(sentry, dirname2));
635 eio_sentry_del(sentry, dirname); 635 eio_sentry_del(sentry, dirname);
636 eo_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_CREATED, (Eo_Event_Cb)_unexpected_event_cb, filename); 636 efl_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_CREATED, (Efl_Event_Cb)_unexpected_event_cb, filename);
637 637
638 ecore_timer_add(TEST_OPERATION_DELAY, _create_file, filename); 638 ecore_timer_add(TEST_OPERATION_DELAY, _create_file, filename);
639 ecore_timer_add(TEST_TIMEOUT_SEC - 1, _test_timeout_expected, NULL); 639 ecore_timer_add(TEST_TIMEOUT_SEC - 1, _test_timeout_expected, NULL);
@@ -666,7 +666,7 @@ START_TEST(eio_test_sentry_two_files_in_same_directory)
666 //monitor file 666 //monitor file
667 fail_if(!eio_sentry_add(sentry,filename)); 667 fail_if(!eio_sentry_add(sentry,filename));
668 fail_if(!eio_sentry_add(sentry,filename2)); 668 fail_if(!eio_sentry_add(sentry,filename2));
669 eo_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_MODIFIED, (Eo_Event_Cb)_target_notified_cb, filename); 669 efl_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_MODIFIED, (Efl_Event_Cb)_target_notified_cb, filename);
670 670
671 ecore_timer_add(TEST_OPERATION_DELAY, _modify_file, filename); 671 ecore_timer_add(TEST_OPERATION_DELAY, _modify_file, filename);
672 672
@@ -701,7 +701,7 @@ START_TEST(eio_test_sentry_two_files_in_same_directory_one_removed)
701 fail_if(!eio_sentry_add(sentry,filename2)); 701 fail_if(!eio_sentry_add(sentry,filename2));
702 eio_sentry_del(sentry, filename); 702 eio_sentry_del(sentry, filename);
703 703
704 eo_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_MODIFIED, (Eo_Event_Cb)_unexpected_event_cb, filename); 704 efl_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_MODIFIED, (Efl_Event_Cb)_unexpected_event_cb, filename);
705 705
706 ecore_timer_add(TEST_OPERATION_DELAY, _modify_file, filename); 706 ecore_timer_add(TEST_OPERATION_DELAY, _modify_file, filename);
707 ecore_timer_add(TEST_TIMEOUT_SEC - 1, _test_timeout_expected, NULL); 707 ecore_timer_add(TEST_TIMEOUT_SEC - 1, _test_timeout_expected, NULL);