summaryrefslogtreecommitdiff
path: root/src/tests/eldbus
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/eldbus')
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model.c58
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model_connection.c30
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model_method.c31
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model_object.c30
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model_proxy.c24
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model_signal.c29
-rw-r--r--src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c35
7 files changed, 107 insertions, 130 deletions
diff --git a/src/tests/eldbus/eldbus_test_eldbus_model.c b/src/tests/eldbus/eldbus_test_eldbus_model.c
index adba9f5..5439217 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_model.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_model.c
@@ -24,9 +24,9 @@ _eo_event_quit_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
24void 24void
25efl_model_wait_for_event(Eo *obj, const Eo_Event_Description* event) 25efl_model_wait_for_event(Eo *obj, const Eo_Event_Description* event)
26{ 26{
27 eo_do(obj, eo_event_callback_add(event, _eo_event_quit_cb, NULL)); 27 eo_event_callback_add(obj, event, _eo_event_quit_cb, NULL);
28 ecore_main_loop_begin(); 28 ecore_main_loop_begin();
29 eo_do(obj, eo_event_callback_del(event, _eo_event_quit_cb, NULL)); 29 eo_event_callback_del(obj, event, _eo_event_quit_cb, NULL);
30} 30}
31 31
32static Eina_Bool 32static Eina_Bool
@@ -49,13 +49,13 @@ void
49efl_model_wait_for_load_status(Efl_Model_Base *efl_model, Efl_Model_Load_Status expected_status) 49efl_model_wait_for_load_status(Efl_Model_Base *efl_model, Efl_Model_Load_Status expected_status)
50{ 50{
51 Efl_Model_Load_Status actual_status; 51 Efl_Model_Load_Status actual_status;
52 eo_do(efl_model, actual_status = efl_model_load_status_get()); 52 actual_status = efl_model_load_status_get(efl_model);
53 if (expected_status == actual_status) 53 if (expected_status == actual_status)
54 return; 54 return;
55 55
56 eo_do(efl_model, eo_event_callback_add(EFL_MODEL_BASE_EVENT_LOAD_STATUS, _event_load_status_quit_cb, (void*)expected_status)); 56 eo_event_callback_add(efl_model, EFL_MODEL_BASE_EVENT_LOAD_STATUS, _event_load_status_quit_cb, (void*)expected_status);
57 ecore_main_loop_begin(); 57 ecore_main_loop_begin();
58 eo_do(efl_model, eo_event_callback_del(EFL_MODEL_BASE_EVENT_LOAD_STATUS, _event_load_status_quit_cb, (void*)expected_status)); 58 eo_event_callback_del(efl_model, EFL_MODEL_BASE_EVENT_LOAD_STATUS, _event_load_status_quit_cb, (void*)expected_status);
59} 59}
60 60
61Efl_Model_Base * 61Efl_Model_Base *
@@ -63,7 +63,7 @@ efl_model_nth_child_get(Efl_Model_Base *efl_model, unsigned int n)
63{ 63{
64 Eina_Accessor *accessor; 64 Eina_Accessor *accessor;
65 Efl_Model_Load_Status status; 65 Efl_Model_Load_Status status;
66 eo_do(efl_model, status = efl_model_children_slice_get(n, 1, &accessor)); 66 status = efl_model_children_slice_get(efl_model, n, 1, &accessor);
67 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 67 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
68 ck_assert_ptr_ne(NULL, accessor); 68 ck_assert_ptr_ne(NULL, accessor);
69 Eo *child = NULL; 69 Eo *child = NULL;
@@ -83,7 +83,7 @@ efl_model_first_child_get(Efl_Model_Base *efl_model)
83void 83void
84efl_model_load_and_wait_for_load_status(Eo *obj, Efl_Model_Load_Status expected_status) 84efl_model_load_and_wait_for_load_status(Eo *obj, Efl_Model_Load_Status expected_status)
85{ 85{
86 eo_do(obj, efl_model_load()); 86 efl_model_load(obj);
87 efl_model_wait_for_load_status(obj, expected_status); 87 efl_model_wait_for_load_status(obj, expected_status);
88} 88}
89 89
@@ -106,7 +106,7 @@ check_property(Eo *object, const char *property_name, const char *expected_value
106{ 106{
107 Eina_Value const* property_value; 107 Eina_Value const* property_value;
108 Efl_Model_Load_Status status; 108 Efl_Model_Load_Status status;
109 eo_do(object, status = efl_model_property_get(property_name, &property_value)); 109 status = efl_model_property_get(object, property_name, &property_value);
110 ck_assert_msg(EFL_MODEL_LOAD_STATUS_ERROR != status, "Nonexistent property: %s", property_name); 110 ck_assert_msg(EFL_MODEL_LOAD_STATUS_ERROR != status, "Nonexistent property: %s", property_name);
111 ck_assert_ptr_ne(NULL, property_value); 111 ck_assert_ptr_ne(NULL, property_value);
112 char *actual_value = eina_value_to_string(property_value); 112 char *actual_value = eina_value_to_string(property_value);
@@ -123,10 +123,7 @@ check_property(Eo *object, const char *property_name, const char *expected_value
123Eo * 123Eo *
124create_connection(void) 124create_connection(void)
125{ 125{
126 Eo *connection = eo_add_ref(ELDBUS_MODEL_CONNECTION_CLASS, NULL, 126 Eo *connection = eo_add_ref(ELDBUS_MODEL_CONNECTION_CLASS, NULL, eldbus_model_connection_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE));
127 eldbus_model_connection_constructor(ELDBUS_CONNECTION_TYPE_SESSION,
128 NULL,
129 EINA_FALSE));
130 ck_assert_ptr_ne(NULL, connection); 127 ck_assert_ptr_ne(NULL, connection);
131 return connection; 128 return connection;
132} 129}
@@ -142,12 +139,7 @@ create_and_load_connection(void)
142Eo * 139Eo *
143create_object(void) 140create_object(void)
144{ 141{
145 Eo *object = eo_add_ref(ELDBUS_MODEL_OBJECT_CLASS, NULL, 142 Eo *object = eo_add_ref(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, ELDBUS_FDO_BUS, ELDBUS_FDO_PATH));
146 eldbus_model_object_constructor(ELDBUS_CONNECTION_TYPE_SESSION,
147 NULL,
148 EINA_FALSE,
149 ELDBUS_FDO_BUS,
150 ELDBUS_FDO_PATH));
151 ck_assert_ptr_ne(NULL, object); 143 ck_assert_ptr_ne(NULL, object);
152 return object; 144 return object;
153} 145}
@@ -164,7 +156,7 @@ void
164check_efl_model_load_status_get(Efl_Model_Base *efl_model, Efl_Model_Load_Status expected_load_status) 156check_efl_model_load_status_get(Efl_Model_Base *efl_model, Efl_Model_Load_Status expected_load_status)
165{ 157{
166 Efl_Model_Load_Status actual_load_status; 158 Efl_Model_Load_Status actual_load_status;
167 eo_do(efl_model, actual_load_status = efl_model_load_status_get()); 159 actual_load_status = efl_model_load_status_get(efl_model);
168 ck_assert_int_eq(expected_load_status, actual_load_status); 160 ck_assert_int_eq(expected_load_status, actual_load_status);
169} 161}
170 162
@@ -172,7 +164,7 @@ void
172check_efl_model_children_count_eq(Efl_Model_Base *efl_model, unsigned int expected_children_count) 164check_efl_model_children_count_eq(Efl_Model_Base *efl_model, unsigned int expected_children_count)
173{ 165{
174 unsigned int actual_children_count = 0; 166 unsigned int actual_children_count = 0;
175 eo_do(efl_model, efl_model_children_count_get(&actual_children_count)); 167 efl_model_children_count_get(efl_model, &actual_children_count);
176 ck_assert_int_eq(expected_children_count, actual_children_count); 168 ck_assert_int_eq(expected_children_count, actual_children_count);
177} 169}
178 170
@@ -181,7 +173,7 @@ check_efl_model_children_count_ge(Efl_Model_Base *efl_model, unsigned int minimu
181{ 173{
182 unsigned int actual_children_count = 0; 174 unsigned int actual_children_count = 0;
183 Efl_Model_Load_Status status; 175 Efl_Model_Load_Status status;
184 eo_do(efl_model, status = efl_model_children_count_get(&actual_children_count)); 176 status = efl_model_children_count_get(efl_model, &actual_children_count);
185 // A minimum count only exists if model have EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN 177 // A minimum count only exists if model have EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN
186 ck_assert((EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN & status) == EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN); 178 ck_assert((EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN & status) == EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN);
187 179
@@ -193,13 +185,13 @@ check_efl_model_children_slice_get(Efl_Model_Base *efl_model)
193{ 185{
194 unsigned int count = 0; 186 unsigned int count = 0;
195 Efl_Model_Load_Status status; 187 Efl_Model_Load_Status status;
196 eo_do(efl_model, status = efl_model_children_count_get(&count)); 188 status = efl_model_children_count_get(efl_model, &count);
197 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 189 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
198 ck_assert_msg(count, "There must be at least 1 child to test"); 190 ck_assert_msg(count, "There must be at least 1 child to test");
199 191
200 // Test slice all 192 // Test slice all
201 Eina_Accessor *accessor; 193 Eina_Accessor *accessor;
202 eo_do(efl_model, status = efl_model_children_slice_get(0, 0, &accessor)); 194 status = efl_model_children_slice_get(efl_model, 0, 0, &accessor);
203 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 195 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
204 ck_assert_ptr_ne(NULL, accessor); 196 ck_assert_ptr_ne(NULL, accessor);
205 // Get first child 197 // Get first child
@@ -221,7 +213,7 @@ check_efl_model_children_slice_get(Efl_Model_Base *efl_model)
221 213
222 // Test slice first child 214 // Test slice first child
223 Eo *child = NULL; 215 Eo *child = NULL;
224 eo_do(efl_model, status = efl_model_children_slice_get(1, 1, &accessor)); 216 status = efl_model_children_slice_get(efl_model, 1, 1, &accessor);
225 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 217 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
226 ck_assert_ptr_ne(NULL, accessor); 218 ck_assert_ptr_ne(NULL, accessor);
227 ret = eina_accessor_data_get(accessor, 0, (void**)&child); 219 ret = eina_accessor_data_get(accessor, 0, (void**)&child);
@@ -233,7 +225,7 @@ check_efl_model_children_slice_get(Efl_Model_Base *efl_model)
233 eina_accessor_free(accessor); 225 eina_accessor_free(accessor);
234 226
235 // Test slice last child 227 // Test slice last child
236 eo_do(efl_model, status = efl_model_children_slice_get(count, 1, &accessor)); 228 status = efl_model_children_slice_get(efl_model, count, 1, &accessor);
237 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 229 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
238 ck_assert_ptr_ne(NULL, accessor); 230 ck_assert_ptr_ne(NULL, accessor);
239 ret = eina_accessor_data_get(accessor, 0, (void**)&child); 231 ret = eina_accessor_data_get(accessor, 0, (void**)&child);
@@ -245,7 +237,7 @@ check_efl_model_children_slice_get(Efl_Model_Base *efl_model)
245 eina_accessor_free(accessor); 237 eina_accessor_free(accessor);
246 238
247 // Test slice nonexistent element 239 // Test slice nonexistent element
248 eo_do(efl_model, status = efl_model_children_slice_get(count + 1, 1, &accessor)); 240 status = efl_model_children_slice_get(efl_model, count + 1, 1, &accessor);
249 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 241 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
250 ck_assert_ptr_eq(NULL, accessor); 242 ck_assert_ptr_eq(NULL, accessor);
251} 243}
@@ -284,7 +276,7 @@ START_TEST(proxy)
284 efl_model_load_and_wait_for_load_status(root, EFL_MODEL_LOAD_STATUS_LOADED); 276 efl_model_load_and_wait_for_load_status(root, EFL_MODEL_LOAD_STATUS_LOADED);
285 277
286 Eina_Accessor *accessor = NULL; 278 Eina_Accessor *accessor = NULL;
287 eo_do(root, efl_model_children_slice_get(0, 0, &accessor)); 279 efl_model_children_slice_get(root, 0, 0, &accessor);
288 ck_assert_ptr_ne(NULL, accessor); 280 ck_assert_ptr_ne(NULL, accessor);
289 281
290 unsigned int i; 282 unsigned int i;
@@ -314,7 +306,7 @@ eldbus_model_proxy_from_object_get(Eldbus_Model_Object *object, const char *inte
314{ 306{
315 Eina_Accessor *accessor; 307 Eina_Accessor *accessor;
316 Efl_Model_Load_Status status; 308 Efl_Model_Load_Status status;
317 eo_do(object, status = efl_model_children_slice_get(0, 0, &accessor)); 309 status = efl_model_children_slice_get(object, 0, 0, &accessor);
318 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 310 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
319 ck_assert_ptr_ne(NULL, accessor); 311 ck_assert_ptr_ne(NULL, accessor);
320 312
@@ -323,7 +315,7 @@ eldbus_model_proxy_from_object_get(Eldbus_Model_Object *object, const char *inte
323 EINA_ACCESSOR_FOREACH(accessor, i, proxy) 315 EINA_ACCESSOR_FOREACH(accessor, i, proxy)
324 { 316 {
325 const char *name; 317 const char *name;
326 eo_do(proxy, name = eldbus_model_proxy_name_get()); 318 name = eldbus_model_proxy_name_get(proxy);
327 ck_assert_ptr_ne(NULL, name); 319 ck_assert_ptr_ne(NULL, name);
328 if (strcmp(name, interface_name) == 0) 320 if (strcmp(name, interface_name) == 0)
329 goto end; 321 goto end;
@@ -340,7 +332,7 @@ _eldbus_model_arguments_from_proxy_get(Eldbus_Model_Proxy *proxy, const char *me
340{ 332{
341 Eina_Accessor *accessor; 333 Eina_Accessor *accessor;
342 Efl_Model_Load_Status status; 334 Efl_Model_Load_Status status;
343 eo_do(proxy, status = efl_model_children_slice_get(0, 0, &accessor)); 335 status = efl_model_children_slice_get(proxy, 0, 0, &accessor);
344 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 336 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
345 ck_assert_ptr_ne(NULL, accessor); 337 ck_assert_ptr_ne(NULL, accessor);
346 338
@@ -352,7 +344,7 @@ _eldbus_model_arguments_from_proxy_get(Eldbus_Model_Proxy *proxy, const char *me
352 continue; 344 continue;
353 345
354 const char *name; 346 const char *name;
355 eo_do(child, name = eldbus_model_arguments_name_get()); 347 name = eldbus_model_arguments_name_get(child);
356 ck_assert_ptr_ne(NULL, name); 348 ck_assert_ptr_ne(NULL, name);
357 if (strcmp(name, method_name) == 0) 349 if (strcmp(name, method_name) == 0)
358 goto end; 350 goto end;
@@ -381,7 +373,7 @@ check_efl_model_property_int_eq(Efl_Model_Base *efl_model, const char *property,
381{ 373{
382 Eina_Value const* property_value; 374 Eina_Value const* property_value;
383 Efl_Model_Load_Status status; 375 Efl_Model_Load_Status status;
384 eo_do(efl_model, status = efl_model_property_get(property, &property_value)); 376 status = efl_model_property_get(efl_model, property, &property_value);
385 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 377 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
386 ck_assert_ptr_ne(NULL, property_value); 378 ck_assert_ptr_ne(NULL, property_value);
387 379
@@ -400,7 +392,7 @@ check_efl_model_property_int_set(Efl_Model_Base *efl_model, const char *property
400 eina_value_setup(&eina_value, EINA_VALUE_TYPE_INT); 392 eina_value_setup(&eina_value, EINA_VALUE_TYPE_INT);
401 eina_value_set(&eina_value, value); 393 eina_value_set(&eina_value, value);
402 Efl_Model_Load_Status status; 394 Efl_Model_Load_Status status;
403 eo_do(efl_model, status = efl_model_property_set(property, &eina_value)); 395 status = efl_model_property_set(efl_model, property, &eina_value);
404 eina_value_flush(&eina_value); 396 eina_value_flush(&eina_value);
405 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 397 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
406} 398}
diff --git a/src/tests/eldbus/eldbus_test_eldbus_model_connection.c b/src/tests/eldbus/eldbus_test_eldbus_model_connection.c
index ffcc795..f3b1915 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_model_connection.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_model_connection.c
@@ -43,7 +43,7 @@ START_TEST(properties_get)
43{ 43{
44 Eina_Array *properties = NULL; 44 Eina_Array *properties = NULL;
45 Efl_Model_Load_Status status; 45 Efl_Model_Load_Status status;
46 eo_do(connection, status = efl_model_properties_get(&properties)); 46 status = efl_model_properties_get(connection, &properties);
47 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 47 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
48 ck_assert_ptr_ne(NULL, properties); 48 ck_assert_ptr_ne(NULL, properties);
49 49
@@ -52,7 +52,7 @@ START_TEST(properties_get)
52 ck_assert_int_eq(expected_properties_count, actual_properties_count); 52 ck_assert_int_eq(expected_properties_count, actual_properties_count);
53 53
54 // Unloaded connection populates its properties 54 // Unloaded connection populates its properties
55 eo_do(unloaded_connection, status = efl_model_properties_get(&properties)); 55 status = efl_model_properties_get(unloaded_connection, &properties);
56 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_UNLOADED, status); 56 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_UNLOADED, status);
57 ck_assert_ptr_ne(NULL, properties); 57 ck_assert_ptr_ne(NULL, properties);
58 58
@@ -65,12 +65,12 @@ START_TEST(property_get)
65{ 65{
66 Eina_Value const* property_value; 66 Eina_Value const* property_value;
67 Efl_Model_Load_Status status; 67 Efl_Model_Load_Status status;
68 eo_do(connection, status = efl_model_property_get(UNIQUE_NAME_PROPERTY, &property_value)); 68 status = efl_model_property_get(connection, UNIQUE_NAME_PROPERTY, &property_value);
69 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 69 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
70 ck_assert_ptr_ne(NULL, property_value); 70 ck_assert_ptr_ne(NULL, property_value);
71 71
72 // Nonexistent property must return EFL_MODEL_LOAD_STATUS_ERROR 72 // Nonexistent property must return EFL_MODEL_LOAD_STATUS_ERROR
73 eo_do(connection, status = efl_model_property_get("nonexistent", &property_value)); 73 status = efl_model_property_get(connection, "nonexistent", &property_value);
74 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 74 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
75} 75}
76END_TEST 76END_TEST
@@ -82,19 +82,19 @@ START_TEST(property_set)
82 eina_value_setup(&value, EINA_VALUE_TYPE_INT); 82 eina_value_setup(&value, EINA_VALUE_TYPE_INT);
83 eina_value_set(&value, 1); 83 eina_value_set(&value, 1);
84 Efl_Model_Load_Status status; 84 Efl_Model_Load_Status status;
85 eo_do(connection, status = efl_model_property_set("nonexistent", &value)); 85 status = efl_model_property_set(connection, "nonexistent", &value);
86 eina_value_flush(&value); 86 eina_value_flush(&value);
87 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 87 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
88 88
89 // UNIQUE_NAME_PROPERTY is read-only 89 // UNIQUE_NAME_PROPERTY is read-only
90 eo_do(connection, status = efl_model_property_set(UNIQUE_NAME_PROPERTY, &value)); 90 status = efl_model_property_set(connection, UNIQUE_NAME_PROPERTY, &value);
91 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 91 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
92 92
93 // The model must be loaded to be able to set its properties 93 // The model must be loaded to be able to set its properties
94 const char *expected_value = "unloaded"; 94 const char *expected_value = "unloaded";
95 eina_value_setup(&value, EINA_VALUE_TYPE_STRING); 95 eina_value_setup(&value, EINA_VALUE_TYPE_STRING);
96 eina_value_set(&value, expected_value); 96 eina_value_set(&value, expected_value);
97 eo_do(unloaded_connection, status = efl_model_property_set(UNIQUE_NAME_PROPERTY, &value)); 97 status = efl_model_property_set(unloaded_connection, UNIQUE_NAME_PROPERTY, &value);
98 eina_value_flush(&value); 98 eina_value_flush(&value);
99 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 99 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
100} 100}
@@ -120,7 +120,7 @@ START_TEST(children_slice_get)
120 // Unloaded connection must return EFL_MODEL_LOAD_STATUS_UNLOADED 120 // Unloaded connection must return EFL_MODEL_LOAD_STATUS_UNLOADED
121 Eina_Accessor *accessor; 121 Eina_Accessor *accessor;
122 Efl_Model_Load_Status status; 122 Efl_Model_Load_Status status;
123 eo_do(unloaded_connection, status = efl_model_children_slice_get(0, 0, &accessor)); 123 status = efl_model_children_slice_get(unloaded_connection, 0, 0, &accessor);
124 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_UNLOADED, status); 124 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_UNLOADED, status);
125 ck_assert_ptr_eq(NULL, accessor); 125 ck_assert_ptr_eq(NULL, accessor);
126} 126}
@@ -129,7 +129,7 @@ END_TEST
129START_TEST(unload) 129START_TEST(unload)
130{ 130{
131 check_efl_model_load_status_get(connection, EFL_MODEL_LOAD_STATUS_LOADED); 131 check_efl_model_load_status_get(connection, EFL_MODEL_LOAD_STATUS_LOADED);
132 eo_do(connection, efl_model_unload()); 132 efl_model_unload(connection);
133 check_efl_model_load_status_get(connection, EFL_MODEL_LOAD_STATUS_UNLOADED); 133 check_efl_model_load_status_get(connection, EFL_MODEL_LOAD_STATUS_UNLOADED);
134 134
135 check_efl_model_children_count_eq(connection, 0); 135 check_efl_model_children_count_eq(connection, 0);
@@ -138,14 +138,14 @@ END_TEST
138 138
139START_TEST(properties_load) 139START_TEST(properties_load)
140{ 140{
141 eo_do(unloaded_connection, efl_model_properties_load()); 141 efl_model_properties_load(unloaded_connection);
142 check_efl_model_load_status_get(unloaded_connection, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES); 142 check_efl_model_load_status_get(unloaded_connection, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES);
143} 143}
144END_TEST 144END_TEST
145 145
146START_TEST(children_load) 146START_TEST(children_load)
147{ 147{
148 eo_do(unloaded_connection, efl_model_children_load()); 148 efl_model_children_load(unloaded_connection);
149 149
150 check_efl_model_load_status_get(unloaded_connection, EFL_MODEL_LOAD_STATUS_LOADING_CHILDREN); 150 check_efl_model_load_status_get(unloaded_connection, EFL_MODEL_LOAD_STATUS_LOADING_CHILDREN);
151 151
@@ -160,7 +160,7 @@ END_TEST
160START_TEST(child_add) 160START_TEST(child_add)
161{ 161{
162 Eo *child; 162 Eo *child;
163 eo_do(connection, child = efl_model_child_add()); 163 child = efl_model_child_add(connection);
164 ck_assert_ptr_eq(NULL, child); 164 ck_assert_ptr_eq(NULL, child);
165} 165}
166END_TEST 166END_TEST
@@ -169,15 +169,15 @@ START_TEST(child_del)
169{ 169{
170 unsigned int expected_children_count = 0; 170 unsigned int expected_children_count = 0;
171 Efl_Model_Load_Status status; 171 Efl_Model_Load_Status status;
172 eo_do(connection, status = efl_model_children_count_get(&expected_children_count)); 172 status = efl_model_children_count_get(connection, &expected_children_count);
173 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 173 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
174 174
175 Eo *child = efl_model_first_child_get(connection); 175 Eo *child = efl_model_first_child_get(connection);
176 eo_do(connection, status = efl_model_child_del(child)); 176 status = efl_model_child_del(connection, child);
177 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 177 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
178 178
179 unsigned int actual_children_count = 0; 179 unsigned int actual_children_count = 0;
180 eo_do(connection, status = efl_model_children_count_get(&actual_children_count)); 180 status = efl_model_children_count_get(connection, &actual_children_count);
181 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 181 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
182 182
183 ck_assert_int_le(expected_children_count, actual_children_count); 183 ck_assert_int_le(expected_children_count, actual_children_count);
diff --git a/src/tests/eldbus/eldbus_test_eldbus_model_method.c b/src/tests/eldbus/eldbus_test_eldbus_model_method.c
index e4f7a81..51ed4af 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_model_method.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_model_method.c
@@ -29,12 +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 = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, 32 fake_server_object = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
33 eldbus_model_object_constructor(ELDBUS_CONNECTION_TYPE_SESSION,
34 NULL,
35 EINA_FALSE,
36 FAKE_SERVER_BUS,
37 FAKE_SERVER_PATH));
38 ck_assert_ptr_ne(NULL, fake_server_object); 33 ck_assert_ptr_ne(NULL, fake_server_object);
39 34
40 efl_model_load_and_wait_for_load_status(fake_server_object, EFL_MODEL_LOAD_STATUS_LOADED); 35 efl_model_load_and_wait_for_load_status(fake_server_object, EFL_MODEL_LOAD_STATUS_LOADED);
@@ -70,7 +65,7 @@ START_TEST(properties_get)
70{ 65{
71 Eina_Array *properties = NULL; 66 Eina_Array *properties = NULL;
72 Efl_Model_Load_Status status; 67 Efl_Model_Load_Status status;
73 eo_do(method, status = efl_model_properties_get(&properties)); 68 status = efl_model_properties_get(method, &properties);
74 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 69 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
75 ck_assert_ptr_ne(NULL, properties); 70 ck_assert_ptr_ne(NULL, properties);
76 71
@@ -85,14 +80,14 @@ START_TEST(property_get)
85 // Input only property returns error 80 // Input only property returns error
86 Eina_Value const* dummy; 81 Eina_Value const* dummy;
87 Efl_Model_Load_Status status; 82 Efl_Model_Load_Status status;
88 eo_do(method, status = efl_model_property_get(ARGUMENT_A, &dummy)); 83 status = efl_model_property_get(method, ARGUMENT_A, &dummy);
89 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 84 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
90 85
91 eo_do(method, status = efl_model_property_get(ARGUMENT_RESULT, &dummy)); 86 status = efl_model_property_get(method, ARGUMENT_RESULT, &dummy);
92 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 87 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
93 88
94 // Nonexistent property returns error 89 // Nonexistent property returns error
95 eo_do(method, status = efl_model_property_get("nonexistent", &dummy)); 90 status = efl_model_property_get(method, "nonexistent", &dummy);
96 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 91 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
97} 92}
98END_TEST 93END_TEST
@@ -102,7 +97,7 @@ START_TEST(property_set)
102 // Output argument returns error 97 // Output argument returns error
103 Eina_Value dummy = {0}; 98 Eina_Value dummy = {0};
104 Efl_Model_Load_Status status; 99 Efl_Model_Load_Status status;
105 eo_do(method, status = efl_model_property_set(ARGUMENT_RESULT, &dummy)); 100 status = efl_model_property_set(method, ARGUMENT_RESULT, &dummy);
106 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 101 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
107} 102}
108END_TEST 103END_TEST
@@ -123,7 +118,7 @@ START_TEST(children_slice_get)
123{ 118{
124 Eina_Accessor *accessor; 119 Eina_Accessor *accessor;
125 Efl_Model_Load_Status status; 120 Efl_Model_Load_Status status;
126 eo_do(method, status = efl_model_children_slice_get(1, 1, &accessor)); 121 status = efl_model_children_slice_get(method, 1, 1, &accessor);
127 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 122 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
128 ck_assert_ptr_eq(NULL, accessor); 123 ck_assert_ptr_eq(NULL, accessor);
129} 124}
@@ -133,7 +128,7 @@ static void
133_check_unload(void) 128_check_unload(void)
134{ 129{
135 check_efl_model_load_status_get(method, EFL_MODEL_LOAD_STATUS_LOADED); 130 check_efl_model_load_status_get(method, EFL_MODEL_LOAD_STATUS_LOADED);
136 eo_do(method, efl_model_unload()); 131 efl_model_unload(method);
137 check_efl_model_load_status_get(method, EFL_MODEL_LOAD_STATUS_UNLOADED); 132 check_efl_model_load_status_get(method, EFL_MODEL_LOAD_STATUS_UNLOADED);
138 133
139 check_efl_model_children_count_eq(method, 0); 134 check_efl_model_children_count_eq(method, 0);
@@ -149,7 +144,7 @@ START_TEST(properties_load)
149{ 144{
150 _check_unload(); 145 _check_unload();
151 146
152 eo_do(method, efl_model_properties_load()); 147 efl_model_properties_load(method);
153 efl_model_wait_for_load_status(method, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES); 148 efl_model_wait_for_load_status(method, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES);
154 149
155 check_efl_model_load_status_get(method, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES); 150 check_efl_model_load_status_get(method, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES);
@@ -160,7 +155,7 @@ START_TEST(children_load)
160{ 155{
161 _check_unload(); 156 _check_unload();
162 157
163 eo_do(method, efl_model_children_load()); 158 efl_model_children_load(method);
164 efl_model_wait_for_load_status(method, EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN); 159 efl_model_wait_for_load_status(method, EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN);
165 160
166 check_efl_model_load_status_get(method, EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN); 161 check_efl_model_load_status_get(method, EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN);
@@ -172,7 +167,7 @@ END_TEST
172START_TEST(child_add) 167START_TEST(child_add)
173{ 168{
174 Eo *child; 169 Eo *child;
175 eo_do(method, child = efl_model_child_add()); 170 child = efl_model_child_add(method);
176 ck_assert_ptr_eq(NULL, child); 171 ck_assert_ptr_eq(NULL, child);
177} 172}
178END_TEST 173END_TEST
@@ -182,7 +177,7 @@ START_TEST(child_del)
182 // efl_model_child_del always returns ERROR 177 // efl_model_child_del always returns ERROR
183 Eo *child = NULL; 178 Eo *child = NULL;
184 Efl_Model_Load_Status status; 179 Efl_Model_Load_Status status;
185 eo_do(method, status = efl_model_child_del(child)); 180 status = efl_model_child_del(method, child);
186 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 181 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
187} 182}
188END_TEST 183END_TEST
@@ -193,7 +188,7 @@ START_TEST(call)
193 check_efl_model_property_int_set(method, ARGUMENT_B, 87654321); 188 check_efl_model_property_int_set(method, ARGUMENT_B, 87654321);
194 189
195 Efl_Model_Load_Status status; 190 Efl_Model_Load_Status status;
196 eo_do(method, status = eldbus_model_method_call()); 191 status = eldbus_model_method_call(method);
197 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 192 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
198 193
199 efl_model_wait_for_event(method, ELDBUS_MODEL_METHOD_EVENT_SUCCESSFUL_CALL); 194 efl_model_wait_for_event(method, ELDBUS_MODEL_METHOD_EVENT_SUCCESSFUL_CALL);
diff --git a/src/tests/eldbus/eldbus_test_eldbus_model_object.c b/src/tests/eldbus/eldbus_test_eldbus_model_object.c
index c1f1248..faa64a7 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_model_object.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_model_object.c
@@ -43,7 +43,7 @@ START_TEST(properties_get)
43{ 43{
44 Eina_Array *properties = NULL; 44 Eina_Array *properties = NULL;
45 Efl_Model_Load_Status status; 45 Efl_Model_Load_Status status;
46 eo_do(object, status = efl_model_properties_get(&properties)); 46 status = efl_model_properties_get(object, &properties);
47 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 47 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
48 ck_assert_ptr_ne(NULL, properties); 48 ck_assert_ptr_ne(NULL, properties);
49 49
@@ -52,7 +52,7 @@ START_TEST(properties_get)
52 ck_assert_int_eq(expected_properties_count, actual_properties_count); 52 ck_assert_int_eq(expected_properties_count, actual_properties_count);
53 53
54 // Unloaded object populates its properties 54 // Unloaded object populates its properties
55 eo_do(unloaded_object, status = efl_model_properties_get(&properties)); 55 status = efl_model_properties_get(unloaded_object, &properties);
56 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_UNLOADED, status); 56 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_UNLOADED, status);
57 ck_assert_ptr_ne(NULL, properties); 57 ck_assert_ptr_ne(NULL, properties);
58 58
@@ -65,11 +65,11 @@ START_TEST(property_get)
65{ 65{
66 const Eina_Value* property_value; 66 const Eina_Value* property_value;
67 Efl_Model_Load_Status status; 67 Efl_Model_Load_Status status;
68 eo_do(object, status = efl_model_property_get(UNIQUE_NAME_PROPERTY, &property_value)); 68 status = efl_model_property_get(object, UNIQUE_NAME_PROPERTY, &property_value);
69 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 69 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
70 70
71 // Nonexistent property must return EFL_MODEL_LOAD_STATUS_ERROR 71 // Nonexistent property must return EFL_MODEL_LOAD_STATUS_ERROR
72 eo_do(object, status = efl_model_property_get("nonexistent", &property_value)); 72 status = efl_model_property_get(object, "nonexistent", &property_value);
73 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 73 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
74} 74}
75END_TEST 75END_TEST
@@ -81,19 +81,19 @@ START_TEST(property_set)
81 eina_value_setup(&value, EINA_VALUE_TYPE_INT); 81 eina_value_setup(&value, EINA_VALUE_TYPE_INT);
82 eina_value_set(&value, 1); 82 eina_value_set(&value, 1);
83 Efl_Model_Load_Status status; 83 Efl_Model_Load_Status status;
84 eo_do(object, status = efl_model_property_set("nonexistent", &value)); 84 status = efl_model_property_set(object, "nonexistent", &value);
85 eina_value_flush(&value); 85 eina_value_flush(&value);
86 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 86 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
87 87
88 // UNIQUE_NAME_PROPERTY is read-only 88 // UNIQUE_NAME_PROPERTY is read-only
89 eo_do(object, status = efl_model_property_set(UNIQUE_NAME_PROPERTY, &value)); 89 status = efl_model_property_set(object, UNIQUE_NAME_PROPERTY, &value);
90 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 90 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
91 91
92 // The model must be loaded to be able to set its properties 92 // The model must be loaded to be able to set its properties
93 const char *expected_value = "unloaded"; 93 const char *expected_value = "unloaded";
94 eina_value_setup(&value, EINA_VALUE_TYPE_STRING); 94 eina_value_setup(&value, EINA_VALUE_TYPE_STRING);
95 eina_value_set(&value, expected_value); 95 eina_value_set(&value, expected_value);
96 eo_do(unloaded_object, status = efl_model_property_set(UNIQUE_NAME_PROPERTY, &value)); 96 status = efl_model_property_set(unloaded_object, UNIQUE_NAME_PROPERTY, &value);
97 eina_value_flush(&value); 97 eina_value_flush(&value);
98 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 98 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
99} 99}
@@ -119,7 +119,7 @@ START_TEST(children_slice_get)
119 // Unloaded object must return EFL_MODEL_LOAD_STATUS_UNLOADED 119 // Unloaded object must return EFL_MODEL_LOAD_STATUS_UNLOADED
120 Eina_Accessor *accessor; 120 Eina_Accessor *accessor;
121 Efl_Model_Load_Status status; 121 Efl_Model_Load_Status status;
122 eo_do(unloaded_object, status = efl_model_children_slice_get(0, 0, &accessor)); 122 status = efl_model_children_slice_get(unloaded_object, 0, 0, &accessor);
123 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_UNLOADED, status); 123 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_UNLOADED, status);
124 ck_assert_ptr_eq(NULL, accessor); 124 ck_assert_ptr_eq(NULL, accessor);
125} 125}
@@ -128,7 +128,7 @@ END_TEST
128START_TEST(unload) 128START_TEST(unload)
129{ 129{
130 check_efl_model_load_status_get(object, EFL_MODEL_LOAD_STATUS_LOADED); 130 check_efl_model_load_status_get(object, EFL_MODEL_LOAD_STATUS_LOADED);
131 eo_do(object, efl_model_unload()); 131 efl_model_unload(object);
132 check_efl_model_load_status_get(object, EFL_MODEL_LOAD_STATUS_UNLOADED); 132 check_efl_model_load_status_get(object, EFL_MODEL_LOAD_STATUS_UNLOADED);
133 133
134 check_efl_model_children_count_eq(object, 0); 134 check_efl_model_children_count_eq(object, 0);
@@ -137,14 +137,14 @@ END_TEST
137 137
138START_TEST(properties_load) 138START_TEST(properties_load)
139{ 139{
140 eo_do(unloaded_object, efl_model_properties_load()); 140 efl_model_properties_load(unloaded_object);
141 check_efl_model_load_status_get(unloaded_object, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES); 141 check_efl_model_load_status_get(unloaded_object, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES);
142} 142}
143END_TEST 143END_TEST
144 144
145START_TEST(children_load) 145START_TEST(children_load)
146{ 146{
147 eo_do(unloaded_object, efl_model_children_load()); 147 efl_model_children_load(unloaded_object);
148 148
149 check_efl_model_load_status_get(unloaded_object, EFL_MODEL_LOAD_STATUS_LOADING_CHILDREN); 149 check_efl_model_load_status_get(unloaded_object, EFL_MODEL_LOAD_STATUS_LOADING_CHILDREN);
150 150
@@ -159,7 +159,7 @@ END_TEST
159START_TEST(child_add) 159START_TEST(child_add)
160{ 160{
161 Eo *child; 161 Eo *child;
162 eo_do(object, child = efl_model_child_add()); 162 child = efl_model_child_add(object);
163 ck_assert_ptr_eq(NULL, child); 163 ck_assert_ptr_eq(NULL, child);
164} 164}
165END_TEST 165END_TEST
@@ -168,15 +168,15 @@ START_TEST(child_del)
168{ 168{
169 unsigned int expected_children_count = 0; 169 unsigned int expected_children_count = 0;
170 Efl_Model_Load_Status status; 170 Efl_Model_Load_Status status;
171 eo_do(object, status = efl_model_children_count_get(&expected_children_count)); 171 status = efl_model_children_count_get(object, &expected_children_count);
172 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 172 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
173 173
174 Eo *child = efl_model_first_child_get(object); 174 Eo *child = efl_model_first_child_get(object);
175 eo_do(object, status = efl_model_child_del(child)); 175 status = efl_model_child_del(object, child);
176 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 176 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
177 177
178 unsigned int actual_children_count = 0; 178 unsigned int actual_children_count = 0;
179 eo_do(object, status = efl_model_children_count_get(&actual_children_count)); 179 status = efl_model_children_count_get(object, &actual_children_count);
180 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 180 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
181 181
182 ck_assert_int_le(expected_children_count, actual_children_count); 182 ck_assert_int_le(expected_children_count, actual_children_count);
diff --git a/src/tests/eldbus/eldbus_test_eldbus_model_proxy.c b/src/tests/eldbus/eldbus_test_eldbus_model_proxy.c
index 98ce124..741ee95b 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_model_proxy.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_model_proxy.c
@@ -51,13 +51,13 @@ START_TEST(properties_get)
51 // ELDBUS_FDO_INTERFACE have no properties 51 // ELDBUS_FDO_INTERFACE have no properties
52 Eina_Array *properties = NULL; 52 Eina_Array *properties = NULL;
53 Efl_Model_Load_Status status; 53 Efl_Model_Load_Status status;
54 eo_do(dbus_proxy, status = efl_model_properties_get(&properties)); 54 status = efl_model_properties_get(dbus_proxy, &properties);
55 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 55 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
56 ck_assert_ptr_ne(NULL, properties); 56 ck_assert_ptr_ne(NULL, properties);
57 ck_assert_int_eq(0, eina_array_count(properties)); 57 ck_assert_int_eq(0, eina_array_count(properties));
58 58
59 // Must be loaded to get the properties 59 // Must be loaded to get the properties
60 eo_do(unloaded_dbus_proxy, status = efl_model_properties_get(&properties)); 60 status = efl_model_properties_get(unloaded_dbus_proxy, &properties);
61 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 61 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
62} 62}
63END_TEST 63END_TEST
@@ -67,7 +67,7 @@ START_TEST(property_get)
67 // Nonexistent property must return EFL_MODEL_LOAD_STATUS_ERROR 67 // Nonexistent property must return EFL_MODEL_LOAD_STATUS_ERROR
68 const Eina_Value* property_value; 68 const Eina_Value* property_value;
69 Efl_Model_Load_Status status; 69 Efl_Model_Load_Status status;
70 eo_do(dbus_proxy, status = efl_model_property_get("nonexistent", &property_value)); 70 status = efl_model_property_get(dbus_proxy, "nonexistent", &property_value);
71 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 71 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
72} 72}
73END_TEST 73END_TEST
@@ -79,7 +79,7 @@ START_TEST(property_set)
79 eina_value_setup(&value, EINA_VALUE_TYPE_INT); 79 eina_value_setup(&value, EINA_VALUE_TYPE_INT);
80 eina_value_set(&value, 1); 80 eina_value_set(&value, 1);
81 Efl_Model_Load_Status status; 81 Efl_Model_Load_Status status;
82 eo_do(dbus_proxy, status = efl_model_property_set("nonexistent", &value)); 82 status = efl_model_property_set(dbus_proxy, "nonexistent", &value);
83 eina_value_flush(&value); 83 eina_value_flush(&value);
84 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 84 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
85} 85}
@@ -105,7 +105,7 @@ START_TEST(children_slice_get)
105 // Unloaded dbus_proxy must return EFL_MODEL_LOAD_STATUS_UNLOADED 105 // Unloaded dbus_proxy must return EFL_MODEL_LOAD_STATUS_UNLOADED
106 Eina_Accessor *accessor; 106 Eina_Accessor *accessor;
107 Efl_Model_Load_Status status; 107 Efl_Model_Load_Status status;
108 eo_do(unloaded_dbus_proxy, status = efl_model_children_slice_get(0, 0, &accessor)); 108 status = efl_model_children_slice_get(unloaded_dbus_proxy, 0, 0, &accessor);
109 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_UNLOADED, status); 109 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_UNLOADED, status);
110 ck_assert_ptr_eq(NULL, accessor); 110 ck_assert_ptr_eq(NULL, accessor);
111} 111}
@@ -114,7 +114,7 @@ END_TEST
114START_TEST(unload) 114START_TEST(unload)
115{ 115{
116 check_efl_model_load_status_get(dbus_proxy, EFL_MODEL_LOAD_STATUS_LOADED); 116 check_efl_model_load_status_get(dbus_proxy, EFL_MODEL_LOAD_STATUS_LOADED);
117 eo_do(dbus_proxy, efl_model_unload()); 117 efl_model_unload(dbus_proxy);
118 check_efl_model_load_status_get(dbus_proxy, EFL_MODEL_LOAD_STATUS_UNLOADED); 118 check_efl_model_load_status_get(dbus_proxy, EFL_MODEL_LOAD_STATUS_UNLOADED);
119 119
120 check_efl_model_children_count_eq(dbus_proxy, 0); 120 check_efl_model_children_count_eq(dbus_proxy, 0);
@@ -123,14 +123,14 @@ END_TEST
123 123
124START_TEST(properties_load) 124START_TEST(properties_load)
125{ 125{
126 eo_do(unloaded_dbus_proxy, efl_model_properties_load()); 126 efl_model_properties_load(unloaded_dbus_proxy);
127 check_efl_model_load_status_get(unloaded_dbus_proxy, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES); 127 check_efl_model_load_status_get(unloaded_dbus_proxy, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES);
128} 128}
129END_TEST 129END_TEST
130 130
131START_TEST(children_load) 131START_TEST(children_load)
132{ 132{
133 eo_do(unloaded_dbus_proxy, efl_model_children_load()); 133 efl_model_children_load(unloaded_dbus_proxy);
134 134
135 efl_model_wait_for_load_status(unloaded_dbus_proxy, EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN); 135 efl_model_wait_for_load_status(unloaded_dbus_proxy, EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN);
136 136
@@ -143,7 +143,7 @@ END_TEST
143START_TEST(child_add) 143START_TEST(child_add)
144{ 144{
145 Eo *child; 145 Eo *child;
146 eo_do(dbus_proxy, child = efl_model_child_add()); 146 child = efl_model_child_add(dbus_proxy);
147 ck_assert_ptr_eq(NULL, child); 147 ck_assert_ptr_eq(NULL, child);
148} 148}
149END_TEST 149END_TEST
@@ -152,15 +152,15 @@ START_TEST(child_del)
152{ 152{
153 unsigned int expected_children_count = 0; 153 unsigned int expected_children_count = 0;
154 Efl_Model_Load_Status status; 154 Efl_Model_Load_Status status;
155 eo_do(dbus_proxy, status = efl_model_children_count_get(&expected_children_count)); 155 status = efl_model_children_count_get(dbus_proxy, &expected_children_count);
156 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 156 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
157 157
158 Eo *child = efl_model_first_child_get(dbus_proxy); 158 Eo *child = efl_model_first_child_get(dbus_proxy);
159 eo_do(dbus_proxy, status = efl_model_child_del(child)); 159 status = efl_model_child_del(dbus_proxy, child);
160 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 160 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
161 161
162 unsigned int actual_children_count = 0; 162 unsigned int actual_children_count = 0;
163 eo_do(dbus_proxy, status = efl_model_children_count_get(&actual_children_count)); 163 status = efl_model_children_count_get(dbus_proxy, &actual_children_count);
164 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 164 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
165 165
166 ck_assert_int_le(expected_children_count, actual_children_count); 166 ck_assert_int_le(expected_children_count, actual_children_count);
diff --git a/src/tests/eldbus/eldbus_test_eldbus_model_signal.c b/src/tests/eldbus/eldbus_test_eldbus_model_signal.c
index 3185f2e..7c31874 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_model_signal.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_model_signal.c
@@ -27,12 +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 = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, 30 fake_server_object = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
31 eldbus_model_object_constructor(ELDBUS_CONNECTION_TYPE_SESSION,
32 NULL,
33 EINA_FALSE,
34 FAKE_SERVER_BUS,
35 FAKE_SERVER_PATH));
36 ck_assert_ptr_ne(NULL, fake_server_object); 31 ck_assert_ptr_ne(NULL, fake_server_object);
37 32
38 efl_model_load_and_wait_for_load_status(fake_server_object, EFL_MODEL_LOAD_STATUS_LOADED); 33 efl_model_load_and_wait_for_load_status(fake_server_object, EFL_MODEL_LOAD_STATUS_LOADED);
@@ -68,7 +63,7 @@ START_TEST(properties_get)
68{ 63{
69 Eina_Array *properties = NULL; 64 Eina_Array *properties = NULL;
70 Efl_Model_Load_Status status; 65 Efl_Model_Load_Status status;
71 eo_do(pong_signal, status = efl_model_properties_get(&properties)); 66 status = efl_model_properties_get(pong_signal, &properties);
72 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 67 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
73 ck_assert_ptr_ne(NULL, properties); 68 ck_assert_ptr_ne(NULL, properties);
74 69
@@ -83,12 +78,12 @@ START_TEST(property_get)
83 // Signal properties always have output direction 78 // Signal properties always have output direction
84 Eina_Value const* dummy; 79 Eina_Value const* dummy;
85 Efl_Model_Load_Status status; 80 Efl_Model_Load_Status status;
86 eo_do(pong_signal, status = efl_model_property_get(ARGUMENT_A, &dummy)); 81 status = efl_model_property_get(pong_signal, ARGUMENT_A, &dummy);
87 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 82 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
88 ck_assert_ptr_ne(NULL, dummy); 83 ck_assert_ptr_ne(NULL, dummy);
89 84
90 // Nonexistent property must return EFL_MODEL_LOAD_STATUS_ERROR 85 // Nonexistent property must return EFL_MODEL_LOAD_STATUS_ERROR
91 eo_do(pong_signal, status = efl_model_property_get("nonexistent", &dummy)); 86 status = efl_model_property_get(pong_signal, "nonexistent", &dummy);
92 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 87 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
93} 88}
94END_TEST 89END_TEST
@@ -98,7 +93,7 @@ START_TEST(property_set)
98 // Signals have output arguments only. All returns error 93 // Signals have output arguments only. All returns error
99 Eina_Value dummy = {0}; 94 Eina_Value dummy = {0};
100 Efl_Model_Load_Status status; 95 Efl_Model_Load_Status status;
101 eo_do(pong_signal, status = efl_model_property_set(ARGUMENT_A, &dummy)); 96 status = efl_model_property_set(pong_signal, ARGUMENT_A, &dummy);
102 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 97 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
103} 98}
104END_TEST 99END_TEST
@@ -119,7 +114,7 @@ START_TEST(children_slice_get)
119{ 114{
120 Eina_Accessor *accessor; 115 Eina_Accessor *accessor;
121 Efl_Model_Load_Status status; 116 Efl_Model_Load_Status status;
122 eo_do(pong_signal, status = efl_model_children_slice_get(1, 1, &accessor)); 117 status = efl_model_children_slice_get(pong_signal, 1, 1, &accessor);
123 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 118 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
124 ck_assert_ptr_eq(NULL, accessor); 119 ck_assert_ptr_eq(NULL, accessor);
125} 120}
@@ -129,7 +124,7 @@ static void
129_check_unload(void) 124_check_unload(void)
130{ 125{
131 check_efl_model_load_status_get(pong_signal, EFL_MODEL_LOAD_STATUS_LOADED); 126 check_efl_model_load_status_get(pong_signal, EFL_MODEL_LOAD_STATUS_LOADED);
132 eo_do(pong_signal, efl_model_unload()); 127 efl_model_unload(pong_signal);
133 check_efl_model_load_status_get(pong_signal, EFL_MODEL_LOAD_STATUS_UNLOADED); 128 check_efl_model_load_status_get(pong_signal, EFL_MODEL_LOAD_STATUS_UNLOADED);
134 129
135 check_efl_model_children_count_eq(pong_signal, 0); 130 check_efl_model_children_count_eq(pong_signal, 0);
@@ -145,7 +140,7 @@ START_TEST(properties_load)
145{ 140{
146 _check_unload(); 141 _check_unload();
147 142
148 eo_do(pong_signal, efl_model_properties_load()); 143 efl_model_properties_load(pong_signal);
149 efl_model_wait_for_load_status(pong_signal, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES); 144 efl_model_wait_for_load_status(pong_signal, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES);
150 145
151 check_efl_model_load_status_get(pong_signal, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES); 146 check_efl_model_load_status_get(pong_signal, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES);
@@ -156,7 +151,7 @@ START_TEST(children_load)
156{ 151{
157 _check_unload(); 152 _check_unload();
158 153
159 eo_do(pong_signal, efl_model_children_load()); 154 efl_model_children_load(pong_signal);
160 efl_model_wait_for_load_status(pong_signal, EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN); 155 efl_model_wait_for_load_status(pong_signal, EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN);
161 156
162 check_efl_model_load_status_get(pong_signal, EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN); 157 check_efl_model_load_status_get(pong_signal, EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN);
@@ -168,7 +163,7 @@ END_TEST
168START_TEST(child_add) 163START_TEST(child_add)
169{ 164{
170 Eo *child; 165 Eo *child;
171 eo_do(pong_signal, child = efl_model_child_add()); 166 child = efl_model_child_add(pong_signal);
172 ck_assert_ptr_eq(NULL, child); 167 ck_assert_ptr_eq(NULL, child);
173} 168}
174END_TEST 169END_TEST
@@ -178,7 +173,7 @@ START_TEST(child_del)
178 // efl_model_child_del always returns ERROR 173 // efl_model_child_del always returns ERROR
179 Eo *child = NULL; 174 Eo *child = NULL;
180 Efl_Model_Load_Status status; 175 Efl_Model_Load_Status status;
181 eo_do(pong_signal, status = efl_model_child_del(child)); 176 status = efl_model_child_del(pong_signal, child);
182 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 177 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
183} 178}
184END_TEST 179END_TEST
@@ -193,7 +188,7 @@ START_TEST(signals)
193 check_efl_model_property_int_set(ping_method, ARGUMENT_A, 99); 188 check_efl_model_property_int_set(ping_method, ARGUMENT_A, 99);
194 189
195 Efl_Model_Load_Status status; 190 Efl_Model_Load_Status status;
196 eo_do(ping_method, status = eldbus_model_method_call()); 191 status = eldbus_model_method_call(ping_method);
197 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 192 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
198 193
199 efl_model_wait_for_event(pong_signal, EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED); 194 efl_model_wait_for_event(pong_signal, EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED);
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 7a12d32..09ef4cc 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,12 +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 = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, 36 fake_server_object = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
37 eldbus_model_object_constructor(ELDBUS_CONNECTION_TYPE_SESSION,
38 NULL,
39 EINA_FALSE,
40 FAKE_SERVER_BUS,
41 FAKE_SERVER_PATH));
42 ck_assert_ptr_ne(NULL, fake_server_object); 37 ck_assert_ptr_ne(NULL, fake_server_object);
43 38
44 efl_model_load_and_wait_for_load_status(fake_server_object, EFL_MODEL_LOAD_STATUS_LOADED); 39 efl_model_load_and_wait_for_load_status(fake_server_object, EFL_MODEL_LOAD_STATUS_LOADED);
@@ -70,7 +65,7 @@ START_TEST(properties_get)
70{ 65{
71 Eina_Array *properties = NULL; 66 Eina_Array *properties = NULL;
72 Efl_Model_Load_Status status; 67 Efl_Model_Load_Status status;
73 eo_do(fake_server_proxy, status = efl_model_properties_get(&properties)); 68 status = efl_model_properties_get(fake_server_proxy, &properties);
74 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 69 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
75 ck_assert_ptr_ne(NULL, properties); 70 ck_assert_ptr_ne(NULL, properties);
76 71
@@ -90,7 +85,7 @@ START_TEST(property_get)
90 // Write-only property returns error 85 // Write-only property returns error
91 const Eina_Value *dummy; 86 const Eina_Value *dummy;
92 Efl_Model_Load_Status status; 87 Efl_Model_Load_Status status;
93 eo_do(fake_server_proxy, status = efl_model_property_get(FAKE_SERVER_WRITEONLY_PROPERTY, &dummy)); 88 status = efl_model_property_get(fake_server_proxy, FAKE_SERVER_WRITEONLY_PROPERTY, &dummy);
94 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 89 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
95 90
96 _teardown(); 91 _teardown();
@@ -104,7 +99,7 @@ _check_property_set(const char *property_name, int expected_property_value, int
104 eina_value_setup(&value, EINA_VALUE_TYPE_INT); 99 eina_value_setup(&value, EINA_VALUE_TYPE_INT);
105 eina_value_set(&value, expected_property_value); 100 eina_value_set(&value, expected_property_value);
106 Efl_Model_Load_Status status; 101 Efl_Model_Load_Status status;
107 eo_do(fake_server_proxy, status = efl_model_property_set(property_name, &value)); 102 status = efl_model_property_set(fake_server_proxy, property_name, &value);
108 eina_value_flush(&value); 103 eina_value_flush(&value);
109 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 104 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
110 105
@@ -121,7 +116,7 @@ START_TEST(property_set)
121 // Read-only property returns error 116 // Read-only property returns error
122 Eina_Value dummy = {0}; 117 Eina_Value dummy = {0};
123 Efl_Model_Load_Status status; 118 Efl_Model_Load_Status status;
124 eo_do(fake_server_proxy, status = efl_model_property_set(FAKE_SERVER_READONLY_PROPERTY, &dummy)); 119 status = efl_model_property_set(fake_server_proxy, FAKE_SERVER_READONLY_PROPERTY, &dummy);
125 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 120 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
126 121
127 _teardown(); 122 _teardown();
@@ -149,9 +144,9 @@ START_TEST(children_slice_get)
149 Eldbus_Model_Arguments *method2 = efl_model_nth_child_get(fake_server_proxy, 2); 144 Eldbus_Model_Arguments *method2 = efl_model_nth_child_get(fake_server_proxy, 2);
150 Eldbus_Model_Arguments *signal1 = efl_model_nth_child_get(fake_server_proxy, 3); 145 Eldbus_Model_Arguments *signal1 = efl_model_nth_child_get(fake_server_proxy, 3);
151 146
152 const char *actual_method1_name = eo_do_ret(method1, actual_method1_name, eldbus_model_arguments_name_get()); 147 const char *actual_method1_name = eldbus_model_arguments_name_get(method1);
153 const char *actual_method2_name = eo_do_ret(method2, actual_method2_name, eldbus_model_arguments_name_get()); 148 const char *actual_method2_name = eldbus_model_arguments_name_get(method2);
154 const char *actual_signal1_name = eo_do_ret(signal1, actual_signal1_name, eldbus_model_arguments_name_get()); 149 const char *actual_signal1_name = eldbus_model_arguments_name_get(signal1);
155 150
156 ck_assert_ptr_ne(NULL, actual_method1_name); 151 ck_assert_ptr_ne(NULL, actual_method1_name);
157 ck_assert_ptr_ne(NULL, actual_method2_name); 152 ck_assert_ptr_ne(NULL, actual_method2_name);
@@ -173,7 +168,7 @@ static void
173_check_unload(void) 168_check_unload(void)
174{ 169{
175 check_efl_model_load_status_get(fake_server_proxy, EFL_MODEL_LOAD_STATUS_LOADED); 170 check_efl_model_load_status_get(fake_server_proxy, EFL_MODEL_LOAD_STATUS_LOADED);
176 eo_do(fake_server_proxy, efl_model_unload()); 171 efl_model_unload(fake_server_proxy);
177 check_efl_model_load_status_get(fake_server_proxy, EFL_MODEL_LOAD_STATUS_UNLOADED); 172 check_efl_model_load_status_get(fake_server_proxy, EFL_MODEL_LOAD_STATUS_UNLOADED);
178 173
179 check_efl_model_children_count_eq(fake_server_proxy, 0); 174 check_efl_model_children_count_eq(fake_server_proxy, 0);
@@ -191,7 +186,7 @@ START_TEST(properties_load)
191{ 186{
192 _check_unload(); 187 _check_unload();
193 188
194 eo_do(fake_server_proxy, efl_model_properties_load()); 189 efl_model_properties_load(fake_server_proxy);
195 efl_model_wait_for_load_status(fake_server_proxy, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES); 190 efl_model_wait_for_load_status(fake_server_proxy, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES);
196 191
197 check_efl_model_load_status_get(fake_server_proxy, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES); 192 check_efl_model_load_status_get(fake_server_proxy, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES);
@@ -204,7 +199,7 @@ START_TEST(children_load)
204{ 199{
205 _check_unload(); 200 _check_unload();
206 201
207 eo_do(fake_server_proxy, efl_model_children_load()); 202 efl_model_children_load(fake_server_proxy);
208 efl_model_wait_for_load_status(fake_server_proxy, EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN); 203 efl_model_wait_for_load_status(fake_server_proxy, EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN);
209 204
210 check_efl_model_load_status_get(fake_server_proxy, EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN); 205 check_efl_model_load_status_get(fake_server_proxy, EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN);
@@ -217,7 +212,7 @@ END_TEST
217 212
218START_TEST(child_add) 213START_TEST(child_add)
219{ 214{
220 Eo *child = eo_do_ret(fake_server_proxy, child, efl_model_child_add()); 215 Eo *child = efl_model_child_add(fake_server_proxy);
221 ck_assert_ptr_eq(NULL, child); 216 ck_assert_ptr_eq(NULL, child);
222 217
223 _teardown(); 218 _teardown();
@@ -229,16 +224,16 @@ START_TEST(child_del)
229 // Tests that it is not possible to delete children 224 // Tests that it is not possible to delete children
230 unsigned int expected_children_count = 0; 225 unsigned int expected_children_count = 0;
231 Efl_Model_Load_Status status; 226 Efl_Model_Load_Status status;
232 eo_do(fake_server_proxy, status = efl_model_children_count_get(&expected_children_count)); 227 status = efl_model_children_count_get(fake_server_proxy, &expected_children_count);
233 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 228 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
234 229
235 // efl_model_child_del always returns ERROR 230 // efl_model_child_del always returns ERROR
236 Eo *child = efl_model_first_child_get(fake_server_proxy); 231 Eo *child = efl_model_first_child_get(fake_server_proxy);
237 eo_do(fake_server_proxy, status = efl_model_child_del(child)); 232 status = efl_model_child_del(fake_server_proxy, child);
238 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status); 233 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_ERROR, status);
239 234
240 unsigned int actual_children_count = 0; 235 unsigned int actual_children_count = 0;
241 eo_do(fake_server_proxy, status = efl_model_children_count_get(&actual_children_count)); 236 status = efl_model_children_count_get(fake_server_proxy, &actual_children_count);
242 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status); 237 ck_assert_int_eq(EFL_MODEL_LOAD_STATUS_LOADED, status);
243 238
244 ck_assert_int_le(expected_children_count, actual_children_count); 239 ck_assert_int_le(expected_children_count, actual_children_count);