summaryrefslogtreecommitdiff
path: root/src/tests/eio
diff options
context:
space:
mode:
authorLarry Jr <larry.olj@gmail.com>2016-05-03 18:19:26 -0300
committerLarry Jr <larry.olj@gmail.com>2016-05-03 18:48:01 -0300
commit5230309b02027be1cf7be01dfa59e47d42a8e468 (patch)
tree2af6a3bd6d3fd007d49d1c85d22bd66d419aef64 /src/tests/eio
parentba10fa6636fb304b6d3c567f6cb89e585022b340 (diff)
Eio: fixed eio_model_test_monitor_add
fix filename comparison in the test for deleted file
Diffstat (limited to 'src/tests/eio')
-rw-r--r--src/tests/eio/eio_model_test_monitor_add.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/tests/eio/eio_model_test_monitor_add.c b/src/tests/eio/eio_model_test_monitor_add.c
index 4df6539a44..f47655eba2 100644
--- a/src/tests/eio/eio_model_test_monitor_add.c
+++ b/src/tests/eio/eio_model_test_monitor_add.c
@@ -35,8 +35,8 @@ _children_removed_cb(void *data EINA_UNUSED, const Eo_Event* event)
35 Eina_Value const* value = eina_promise_value_get(promise); 35 Eina_Value const* value = eina_promise_value_get(promise);
36 char* filename = eina_value_to_string(value); 36 char* filename = eina_value_to_string(value);
37 37
38 if(temp_filename && !strcmp(filename, temp_filename) == 0) 38 if(temp_filename && strcmp(filename, temp_filename) == 0)
39 ecore_main_loop_quit(); 39 ecore_main_loop_quit();
40 free(filename); 40 free(filename);
41 } 41 }
42 return EINA_TRUE; 42 return EINA_TRUE;
@@ -53,13 +53,13 @@ _children_added_cb(void *data EINA_UNUSED, const Eo_Event* event)
53 Eina_Value const* value = eina_promise_value_get(promise); 53 Eina_Value const* value = eina_promise_value_get(promise);
54 char* filename = eina_value_to_string(value); 54 char* filename = eina_value_to_string(value);
55 55
56 if(temp_filename && !strcmp(temp_filename, filename)) 56 if(temp_filename && strcmp(temp_filename, filename) == 0)
57 { 57 {
58 children_deleted = EINA_TRUE; 58 children_deleted = EINA_TRUE;
59 efl_model_child_del(event->obj, evt->child); 59 efl_model_child_del(event->obj, evt->child);
60 } 60 }
61 free(filename); 61 free(filename);
62 62
63 return EINA_TRUE; 63 return EINA_TRUE;
64} 64}
65 65
@@ -74,6 +74,14 @@ _create_file(void *data EINA_UNUSED, void* value EINA_UNUSED)
74 } 74 }
75} 75}
76 76
77
78static void
79_create_file_error(void *data EINA_UNUSED, const Eina_Error* value EINA_UNUSED)
80{
81 ck_abort_msg(0, "Error Promise cb called in Create file");
82 ecore_main_loop_quit();
83}
84
77START_TEST(eio_model_test_test_monitor_add) 85START_TEST(eio_model_test_test_monitor_add)
78{ 86{
79 Eo *filemodel = NULL; 87 Eo *filemodel = NULL;
@@ -96,7 +104,7 @@ START_TEST(eio_model_test_test_monitor_add)
96 Eina_Promise* promise; 104 Eina_Promise* promise;
97 efl_model_children_slice_get(filemodel, 0, 0, &promise); 105 efl_model_children_slice_get(filemodel, 0, 0, &promise);
98 106
99 eina_promise_then(promise, &_create_file, NULL, NULL); 107 eina_promise_then(promise, &_create_file, &_create_file_error, NULL);
100 108
101 ecore_main_loop_begin(); 109 ecore_main_loop_begin();
102 110