summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-03-15 12:50:20 -0400
committerCedric Bail <cedric@osg.samsung.com>2018-03-20 17:20:56 -0700
commit4c4177ac207f982de8139c47c7afedd26ff9e15a (patch)
tree1913e890dc525621f4dec3ce281b340d81608a72 /src/tests
parenta1bf513920e813037756e01cc2e01770befea77c (diff)
efl: use efl_add_ref to create objects which have no parent
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Diffstat (limited to '')
-rw-r--r--src/tests/ecore/ecore_test_ecore_audio.c60
-rw-r--r--src/tests/ecore/ecore_test_promise2.c4
-rw-r--r--src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c110
-rw-r--r--src/tests/efl/efl_test_model_composite.c8
-rw-r--r--src/tests/efl/efl_test_model_container.c2
-rw-r--r--src/tests/efl_mono/libefl_mono_native_test.c2
-rw-r--r--src/tests/eio/eio_test_sentry.c40
-rw-r--r--src/tests/elementary/elm_test_atspi.c14
-rw-r--r--src/tests/elementary/elm_test_config.c4
-rw-r--r--src/tests/elementary/elm_test_focus.c68
-rw-r--r--src/tests/elementary/elm_test_focus_common.c4
-rw-r--r--src/tests/elementary/elm_test_focus_sub.c38
-rw-r--r--src/tests/eo/access/access_main.c2
-rw-r--r--src/tests/eo/children/children_main.c2
-rw-r--r--src/tests/eo/composite_objects/composite_objects_main.c2
-rw-r--r--src/tests/eo/constructors/constructors_main.c20
-rw-r--r--src/tests/eo/function_overrides/function_overrides_main.c8
-rw-r--r--src/tests/eo/interface/interface_main.c2
-rw-r--r--src/tests/eo/mixin/mixin_main.c4
-rw-r--r--src/tests/eo/signals/signals_main.c2
-rw-r--r--src/tests/eo/suite/eo_test_class_singleton.c2
-rw-r--r--src/tests/eo/suite/eo_test_domain.c2
-rw-r--r--src/tests/eo/suite/eo_test_event.c6
-rw-r--r--src/tests/eo/suite/eo_test_general.c210
-rw-r--r--src/tests/eo/suite/eo_test_init.c2
-rw-r--r--src/tests/eo/suite/eo_test_threaded_calls.c2
-rw-r--r--src/tests/eo/suite/eo_test_value.c2
-rw-r--r--src/tests/eolian_js/eolian_js_test_constructor_method_impl.c4
28 files changed, 313 insertions, 313 deletions
diff --git a/src/tests/ecore/ecore_test_ecore_audio.c b/src/tests/ecore/ecore_test_ecore_audio.c
index 23f638a..c7e4006 100644
--- a/src/tests/ecore/ecore_test_ecore_audio.c
+++ b/src/tests/ecore/ecore_test_ecore_audio.c
@@ -57,14 +57,14 @@ START_TEST(ecore_test_ecore_audio_obj_pulse)
57 Eina_Bool ret = EINA_FALSE; 57 Eina_Bool ret = EINA_FALSE;
58 Eina_Bool pulse_context_failed = EINA_FALSE; 58 Eina_Bool pulse_context_failed = EINA_FALSE;
59 59
60 in = efl_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL); 60 in = efl_add_ref(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
61 fail_if(!in); 61 fail_if(!in);
62 62
63 efl_name_set(in, "sample.wav"); 63 efl_name_set(in, "sample.wav");
64 ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/sample.wav"); 64 ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/sample.wav");
65 fail_if(!ret); 65 fail_if(!ret);
66 66
67 out = efl_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL); 67 out = efl_add_ref(ECORE_AUDIO_OUT_PULSE_CLASS, NULL);
68 fail_if(!out); 68 fail_if(!out);
69 69
70 ecore_timer_add(1.8, _seek_vol, in); 70 ecore_timer_add(1.8, _seek_vol, in);
@@ -78,8 +78,8 @@ START_TEST(ecore_test_ecore_audio_obj_pulse)
78 ecore_main_loop_begin(); 78 ecore_main_loop_begin();
79 fail_if(pulse_context_failed); 79 fail_if(pulse_context_failed);
80 80
81 efl_del(out); 81 efl_unref(out);
82 efl_del(in); 82 efl_unref(in);
83} 83}
84END_TEST 84END_TEST
85#endif 85#endif
@@ -96,7 +96,7 @@ static Eina_Bool
96_idle_del(void *data) 96_idle_del(void *data)
97{ 97{
98 Eo *in = data; 98 Eo *in = data;
99 efl_del(in); 99 efl_unref(in);
100 ecore_idler_add(_quit, NULL); 100 ecore_idler_add(_quit, NULL);
101 101
102 return EINA_FALSE; 102 return EINA_FALSE;
@@ -108,12 +108,12 @@ START_TEST(ecore_test_ecore_audio_cleanup)
108 int freq = 1000; 108 int freq = 1000;
109 Eina_Bool ret = EINA_FALSE; 109 Eina_Bool ret = EINA_FALSE;
110 110
111 in = efl_add(ECORE_AUDIO_IN_TONE_CLASS, NULL); 111 in = efl_add_ref(ECORE_AUDIO_IN_TONE_CLASS, NULL);
112 fail_if(!in); 112 fail_if(!in);
113 efl_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &freq); 113 efl_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &freq);
114 ecore_audio_obj_in_length_set(in, 2); 114 ecore_audio_obj_in_length_set(in, 2);
115 115
116 out = efl_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL); 116 out = efl_add_ref(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
117 fail_if(!out); 117 fail_if(!out);
118 ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_OGG); 118 ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_OGG);
119 fail_if(!ret); 119 fail_if(!ret);
@@ -139,7 +139,7 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
139 Eina_Bool ret; 139 Eina_Bool ret;
140 char *tmp; 140 char *tmp;
141 141
142 in = efl_add(ECORE_AUDIO_IN_TONE_CLASS, NULL); 142 in = efl_add_ref(ECORE_AUDIO_IN_TONE_CLASS, NULL);
143 fail_if(!in); 143 fail_if(!in);
144 144
145 efl_name_set(in, "tone"); 145 efl_name_set(in, "tone");
@@ -197,7 +197,7 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
197 len = ecore_audio_obj_in_remaining_get(in); 197 len = ecore_audio_obj_in_remaining_get(in);
198 fail_if(len != 1.0); 198 fail_if(len != 1.0);
199 199
200 out = efl_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL); 200 out = efl_add_ref(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
201 fail_if(!out); 201 fail_if(!out);
202 202
203 efl_name_set(out, "tmp.wav"); 203 efl_name_set(out, "tmp.wav");
@@ -214,8 +214,8 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
214 214
215 ecore_main_loop_begin(); 215 ecore_main_loop_begin();
216 216
217 efl_del(in); 217 efl_unref(in);
218 efl_del(out); 218 efl_unref(out);
219 219
220 //TODO: Compare and fail 220 //TODO: Compare and fail
221 ecore_file_remove(TESTS_BUILD_DIR"/tmp.wav"); 221 ecore_file_remove(TESTS_BUILD_DIR"/tmp.wav");
@@ -231,7 +231,7 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
231 Ecore_Audio_Format fmt; 231 Ecore_Audio_Format fmt;
232 const char *src; 232 const char *src;
233 233
234 in = efl_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL); 234 in = efl_add_ref(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
235 fail_if(!in); 235 fail_if(!in);
236 236
237 fmt = ecore_audio_obj_format_get(in); 237 fmt = ecore_audio_obj_format_get(in);
@@ -277,7 +277,7 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
277 len = ecore_audio_obj_in_seek(in, -1.5, SEEK_END); 277 len = ecore_audio_obj_in_seek(in, -1.5, SEEK_END);
278 fail_if(fabs(rem - 1 - len) > 0.6); 278 fail_if(fabs(rem - 1 - len) > 0.6);
279 279
280 out = efl_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL); 280 out = efl_add_ref(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
281 fail_if(!out); 281 fail_if(!out);
282 282
283 efl_name_set(out, "tmp.wav"); 283 efl_name_set(out, "tmp.wav");
@@ -304,8 +304,8 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
304 304
305 ecore_main_loop_begin(); 305 ecore_main_loop_begin();
306 306
307 efl_del(in); 307 efl_unref(in);
308 efl_del(out); 308 efl_unref(out);
309 309
310 //TODO: Compare and fail 310 //TODO: Compare and fail
311 ecore_file_remove(TESTS_BUILD_DIR"/tmp.wav"); 311 ecore_file_remove(TESTS_BUILD_DIR"/tmp.wav");
@@ -318,9 +318,9 @@ START_TEST(ecore_test_ecore_audio_obj_in_out)
318 Eina_List *in3; 318 Eina_List *in3;
319 Eina_Bool attached; 319 Eina_Bool attached;
320 320
321 Eo *in = efl_add(ECORE_AUDIO_IN_CLASS, NULL); 321 Eo *in = efl_add_ref(ECORE_AUDIO_IN_CLASS, NULL);
322 Eo *in2 = efl_add(ECORE_AUDIO_IN_CLASS, NULL); 322 Eo *in2 = efl_add_ref(ECORE_AUDIO_IN_CLASS, NULL);
323 Eo *out = efl_add(ECORE_AUDIO_OUT_CLASS, NULL); 323 Eo *out = efl_add_ref(ECORE_AUDIO_OUT_CLASS, NULL);
324 324
325 fail_if(!in); 325 fail_if(!in);
326 fail_if(!in2); 326 fail_if(!in2);
@@ -357,20 +357,20 @@ START_TEST(ecore_test_ecore_audio_obj_in_out)
357 fail_if(eina_list_count(in3) != 2); 357 fail_if(eina_list_count(in3) != 2);
358 fail_if(eina_list_data_get(in3) != in); 358 fail_if(eina_list_data_get(in3) != in);
359 359
360 efl_del(in2); 360 efl_unref(in2);
361 361
362 in3 = ecore_audio_obj_out_inputs_get(out); 362 in3 = ecore_audio_obj_out_inputs_get(out);
363 363
364 fail_if(eina_list_count(in3) != 1); 364 fail_if(eina_list_count(in3) != 1);
365 fail_if(eina_list_data_get(in3) != in); 365 fail_if(eina_list_data_get(in3) != in);
366 366
367 efl_del(out); 367 efl_unref(out);
368 368
369 out2 = ecore_audio_obj_in_output_get(in); 369 out2 = ecore_audio_obj_in_output_get(in);
370 370
371 fail_if(out2); 371 fail_if(out2);
372 372
373 efl_del(in); 373 efl_unref(in);
374} 374}
375END_TEST 375END_TEST
376 376
@@ -416,10 +416,10 @@ START_TEST(ecore_test_ecore_audio_obj_vio)
416{ 416{
417 Eo *in, *out; 417 Eo *in, *out;
418 418
419 in = efl_add(ECORE_AUDIO_IN_CLASS, NULL); 419 in = efl_add_ref(ECORE_AUDIO_IN_CLASS, NULL);
420 fail_if(!in); 420 fail_if(!in);
421 421
422 out = efl_add(ECORE_AUDIO_OUT_CLASS, NULL); 422 out = efl_add_ref(ECORE_AUDIO_OUT_CLASS, NULL);
423 fail_if(!out); 423 fail_if(!out);
424 424
425 ecore_audio_obj_vio_set(in, &in_vio, NULL, NULL); 425 ecore_audio_obj_vio_set(in, &in_vio, NULL, NULL);
@@ -429,8 +429,8 @@ START_TEST(ecore_test_ecore_audio_obj_vio)
429 429
430 ecore_main_loop_begin(); 430 ecore_main_loop_begin();
431 431
432 efl_del(out); 432 efl_unref(out);
433 efl_del(in); 433 efl_unref(in);
434} 434}
435END_TEST 435END_TEST
436 436
@@ -454,7 +454,7 @@ START_TEST(ecore_test_ecore_audio_obj_in)
454 Ecore_Audio_Vio vio; 454 Ecore_Audio_Vio vio;
455 Eina_Bool freed = EINA_FALSE; 455 Eina_Bool freed = EINA_FALSE;
456 456
457 Eo *in = efl_add(ECORE_AUDIO_IN_CLASS, NULL); 457 Eo *in = efl_add_ref(ECORE_AUDIO_IN_CLASS, NULL);
458 458
459 fail_if(!in); 459 fail_if(!in);
460 460
@@ -529,7 +529,7 @@ START_TEST(ecore_test_ecore_audio_obj_in)
529 fail_if(buf[i] != 0x00); 529 fail_if(buf[i] != 0x00);
530 } 530 }
531 531
532 efl_del(in); 532 efl_unref(in);
533} 533}
534END_TEST 534END_TEST
535 535
@@ -541,10 +541,10 @@ START_TEST(ecore_test_ecore_audio_obj)
541 double volume; 541 double volume;
542 Eo *objs[2], *obj; 542 Eo *objs[2], *obj;
543 543
544 objs[0] = efl_add(ECORE_AUDIO_IN_CLASS, NULL); 544 objs[0] = efl_add_ref(ECORE_AUDIO_IN_CLASS, NULL);
545 fail_if(!objs[0]); 545 fail_if(!objs[0]);
546 546
547 objs[1] = efl_add(ECORE_AUDIO_OUT_CLASS, NULL); 547 objs[1] = efl_add_ref(ECORE_AUDIO_OUT_CLASS, NULL);
548 fail_if(!objs[1]); 548 fail_if(!objs[1]);
549 549
550 for (i=0; i<2; i++) { 550 for (i=0; i<2; i++) {
@@ -577,7 +577,7 @@ START_TEST(ecore_test_ecore_audio_obj)
577 volume = ecore_audio_obj_volume_get(obj); 577 volume = ecore_audio_obj_volume_get(obj);
578 fail_if(volume != 0.5); 578 fail_if(volume != 0.5);
579 579
580 efl_del(obj); 580 efl_unref(obj);
581 } 581 }
582 582
583} 583}
diff --git a/src/tests/ecore/ecore_test_promise2.c b/src/tests/ecore/ecore_test_promise2.c
index ff663f1..bd9eec8 100644
--- a/src/tests/ecore/ecore_test_promise2.c
+++ b/src/tests/ecore/ecore_test_promise2.c
@@ -871,7 +871,7 @@ START_TEST(efl_test_promise_eo)
871 fail_if(!ecore_init()); 871 fail_if(!ecore_init());
872 872
873 //Use a random object.. 873 //Use a random object..
874 obj = efl_add(EFL_IO_BUFFER_CLASS, NULL); 874 obj = efl_add_ref(EFL_IO_BUFFER_CLASS, NULL);
875 fail_if(!obj); 875 fail_if(!obj);
876 efl_key_data_set(obj, "free_called", &free_called); 876 efl_key_data_set(obj, "free_called", &free_called);
877 f = eina_future_chain(_int_future_get(), 877 f = eina_future_chain(_int_future_get(),
@@ -930,7 +930,7 @@ START_TEST(efl_test_promise_eo_link)
930 fail_if(!ecore_init()); 930 fail_if(!ecore_init());
931 931
932 //Use a random object.. 932 //Use a random object..
933 obj = efl_add(EFL_IO_BUFFER_CLASS, NULL); 933 obj = efl_add_ref(EFL_IO_BUFFER_CLASS, NULL);
934 fail_if(!obj); 934 fail_if(!obj);
935 935
936 efl_key_data_set(obj, "err_called", &err_called); 936 efl_key_data_set(obj, "err_called", &err_called);
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 563af26..dc9b7e8 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
@@ -307,29 +307,29 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_manual_ok)
307 307
308 addr.sin_port = htons(12345); 308 addr.sin_port = htons(12345);
309 addr.sin_addr.s_addr = htonl(0xabcdefafU); 309 addr.sin_addr.s_addr = htonl(0xabcdefafU);
310 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 310 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
311 efl_net_ip_address_family_set(efl_added, AF_INET), 311 efl_net_ip_address_family_set(efl_added, AF_INET),
312 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin_port)), 312 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin_port)),
313 efl_net_ip_address_set(efl_added, slice)); 313 efl_net_ip_address_set(efl_added, slice));
314 _ipv4_check(o, &addr); 314 _ipv4_check(o, &addr);
315 efl_del(o); 315 efl_unref(o);
316 316
317 addr.sin_port = htons(8081); 317 addr.sin_port = htons(8081);
318 addr.sin_addr.s_addr = htonl(0); 318 addr.sin_addr.s_addr = htonl(0);
319 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 319 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
320 efl_net_ip_address_family_set(efl_added, AF_INET), 320 efl_net_ip_address_family_set(efl_added, AF_INET),
321 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin_port)), 321 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin_port)),
322 efl_net_ip_address_set(efl_added, slice)); 322 efl_net_ip_address_set(efl_added, slice));
323 _ipv4_check(o, &addr); 323 _ipv4_check(o, &addr);
324 efl_del(o); 324 efl_unref(o);
325 325
326 addr.sin_port = htons(0); 326 addr.sin_port = htons(0);
327 addr.sin_addr.s_addr = htonl(0x12345678); 327 addr.sin_addr.s_addr = htonl(0x12345678);
328 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 328 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
329 efl_net_ip_address_family_set(efl_added, AF_INET), 329 efl_net_ip_address_family_set(efl_added, AF_INET),
330 efl_net_ip_address_set(efl_added, slice)); 330 efl_net_ip_address_set(efl_added, slice));
331 _ipv4_check(o, &addr); 331 _ipv4_check(o, &addr);
332 efl_del(o); 332 efl_unref(o);
333 333
334 ecore_con_shutdown(); 334 ecore_con_shutdown();
335} 335}
@@ -348,46 +348,46 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_manual_fail)
348 ecore_con_init(); 348 ecore_con_init();
349 349
350 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true"); 350 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true");
351 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL); 351 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL);
352 ck_assert_ptr_eq(o, NULL); 352 ck_assert_ptr_eq(o, NULL);
353 TRAP_ERRORS_FINISH(1); 353 TRAP_ERRORS_FINISH(1);
354 354
355 TRAP_ERRORS_BEGIN(eina_safety, ERR, NULL); 355 TRAP_ERRORS_BEGIN(eina_safety, ERR, NULL);
356 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 356 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
357 efl_net_ip_address_family_set(efl_added, 12345)); 357 efl_net_ip_address_family_set(efl_added, 12345));
358 ck_assert_ptr_eq(o, NULL); 358 ck_assert_ptr_eq(o, NULL);
359 TRAP_ERRORS_FINISH(2); 359 TRAP_ERRORS_FINISH(2);
360 360
361 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true"); 361 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true");
362 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 362 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
363 efl_net_ip_address_set(efl_added, wrong_slice)); 363 efl_net_ip_address_set(efl_added, wrong_slice));
364 ck_assert_ptr_eq(o, NULL); 364 ck_assert_ptr_eq(o, NULL);
365 TRAP_ERRORS_FINISH(2); 365 TRAP_ERRORS_FINISH(2);
366 366
367 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true"); 367 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true");
368 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 368 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
369 efl_net_ip_address_port_set(efl_added, 1234)); 369 efl_net_ip_address_port_set(efl_added, 1234));
370 ck_assert_ptr_eq(o, NULL); 370 ck_assert_ptr_eq(o, NULL);
371 TRAP_ERRORS_FINISH(2); 371 TRAP_ERRORS_FINISH(2);
372 372
373 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true"); 373 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true");
374 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 374 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
375 efl_net_ip_address_port_set(efl_added, 1234), 375 efl_net_ip_address_port_set(efl_added, 1234),
376 efl_net_ip_address_set(efl_added, wrong_slice)); 376 efl_net_ip_address_set(efl_added, wrong_slice));
377 ck_assert_ptr_eq(o, NULL); 377 ck_assert_ptr_eq(o, NULL);
378 TRAP_ERRORS_FINISH(3); 378 TRAP_ERRORS_FINISH(3);
379 379
380 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: rw_slice.len != address.len is true"); 380 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: rw_slice.len != address.len is true");
381 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 381 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
382 efl_net_ip_address_family_set(efl_added, AF_INET), 382 efl_net_ip_address_family_set(efl_added, AF_INET),
383 efl_net_ip_address_set(efl_added, wrong_slice)); 383 efl_net_ip_address_set(efl_added, wrong_slice));
384 _ipv4_check(o, &addr); 384 _ipv4_check(o, &addr);
385 efl_del(o); 385 efl_unref(o);
386 TRAP_ERRORS_FINISH(1); 386 TRAP_ERRORS_FINISH(1);
387 387
388 addr.sin_port = htons(12345); 388 addr.sin_port = htons(12345);
389 addr.sin_addr.s_addr = htonl(0xabcdefafU); 389 addr.sin_addr.s_addr = htonl(0xabcdefafU);
390 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 390 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
391 efl_net_ip_address_family_set(efl_added, AF_INET), 391 efl_net_ip_address_family_set(efl_added, AF_INET),
392 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin_port)), 392 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin_port)),
393 efl_net_ip_address_set(efl_added, slice)); 393 efl_net_ip_address_set(efl_added, slice));
@@ -417,7 +417,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_manual_fail)
417 efl_net_ip_address_set(o, slice); 417 efl_net_ip_address_set(o, slice);
418 TRAP_ERRORS_FINISH(1); 418 TRAP_ERRORS_FINISH(1);
419 419
420 efl_del(o); 420 efl_unref(o);
421 421
422 ecore_con_shutdown(); 422 ecore_con_shutdown();
423} 423}
@@ -439,7 +439,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_create_ok)
439 ntohs(addr.sin_port), 439 ntohs(addr.sin_port),
440 slice); 440 slice);
441 _ipv4_check(o, &addr); 441 _ipv4_check(o, &addr);
442 efl_del(o); 442 efl_unref(o);
443 443
444 addr.sin_port = htons(8081); 444 addr.sin_port = htons(8081);
445 addr.sin_addr.s_addr = htonl(0); 445 addr.sin_addr.s_addr = htonl(0);
@@ -447,7 +447,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_create_ok)
447 ntohs(addr.sin_port), 447 ntohs(addr.sin_port),
448 slice); 448 slice);
449 _ipv4_check(o, &addr); 449 _ipv4_check(o, &addr);
450 efl_del(o); 450 efl_unref(o);
451 451
452 addr.sin_port = htons(0); 452 addr.sin_port = htons(0);
453 addr.sin_addr.s_addr = htonl(0x12345678); 453 addr.sin_addr.s_addr = htonl(0x12345678);
@@ -455,7 +455,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_create_ok)
455 ntohs(addr.sin_port), 455 ntohs(addr.sin_port),
456 slice); 456 slice);
457 _ipv4_check(o, &addr); 457 _ipv4_check(o, &addr);
458 efl_del(o); 458 efl_unref(o);
459 459
460 ecore_con_shutdown(); 460 ecore_con_shutdown();
461} 461}
@@ -494,14 +494,14 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_create_sockaddr_ok)
494 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr); 494 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr);
495 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o)); 495 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o));
496 _ipv4_check(o, &addr); 496 _ipv4_check(o, &addr);
497 efl_del(o); 497 efl_unref(o);
498 498
499 addr.sin_port = htons(0); 499 addr.sin_port = htons(0);
500 addr.sin_addr.s_addr = htonl(0); 500 addr.sin_addr.s_addr = htonl(0);
501 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr); 501 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr);
502 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o)); 502 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o));
503 _ipv4_check(o, &addr); 503 _ipv4_check(o, &addr);
504 efl_del(o); 504 efl_unref(o);
505 505
506 ecore_con_shutdown(); 506 ecore_con_shutdown();
507} 507}
@@ -539,22 +539,22 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_parse_ok)
539 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1:12345"); 539 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1:12345");
540 ck_assert_ptr_ne(o, NULL); 540 ck_assert_ptr_ne(o, NULL);
541 ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1:12345"); 541 ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1:12345");
542 efl_del(o); 542 efl_unref(o);
543 543
544 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1:0"); 544 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1:0");
545 ck_assert_ptr_ne(o, NULL); 545 ck_assert_ptr_ne(o, NULL);
546 ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1"); 546 ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1");
547 efl_del(o); 547 efl_unref(o);
548 548
549 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1"); 549 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1");
550 ck_assert_ptr_ne(o, NULL); 550 ck_assert_ptr_ne(o, NULL);
551 ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1"); 551 ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1");
552 efl_del(o); 552 efl_unref(o);
553 553
554 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "192.168.0.123:80"); 554 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "192.168.0.123:80");
555 ck_assert_ptr_ne(o, NULL); 555 ck_assert_ptr_ne(o, NULL);
556 ck_assert_str_eq(efl_net_ip_address_string_get(o), "192.168.0.123:80"); 556 ck_assert_str_eq(efl_net_ip_address_string_get(o), "192.168.0.123:80");
557 efl_del(o); 557 efl_unref(o);
558 558
559 ecore_con_shutdown(); 559 ecore_con_shutdown();
560} 560}
@@ -716,7 +716,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_checks)
716 ck_assert_int_eq(efl_net_ip_address_ipv6_local_link_check(o), EINA_FALSE); 716 ck_assert_int_eq(efl_net_ip_address_ipv6_local_link_check(o), EINA_FALSE);
717 ck_assert_int_eq(efl_net_ip_address_ipv6_local_site_check(o), EINA_FALSE); 717 ck_assert_int_eq(efl_net_ip_address_ipv6_local_site_check(o), EINA_FALSE);
718 718
719 efl_del(o); 719 efl_unref(o);
720 } 720 }
721 721
722 ecore_con_shutdown(); 722 ecore_con_shutdown();
@@ -773,21 +773,21 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_manual_ok)
773 773
774 addr.sin6_port = htons(12345); 774 addr.sin6_port = htons(12345);
775 _ipv6_set(&addr, 1, 2, 3, 4, 5, 6, 7, 8); 775 _ipv6_set(&addr, 1, 2, 3, 4, 5, 6, 7, 8);
776 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 776 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
777 efl_net_ip_address_family_set(efl_added, AF_INET6), 777 efl_net_ip_address_family_set(efl_added, AF_INET6),
778 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin6_port)), 778 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin6_port)),
779 efl_net_ip_address_set(efl_added, slice)); 779 efl_net_ip_address_set(efl_added, slice));
780 _ipv6_check(o, &addr); 780 _ipv6_check(o, &addr);
781 efl_del(o); 781 efl_unref(o);
782 782
783 addr.sin6_port = htons(8081); 783 addr.sin6_port = htons(8081);
784 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0); 784 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0);
785 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 785 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
786 efl_net_ip_address_family_set(efl_added, AF_INET6), 786 efl_net_ip_address_family_set(efl_added, AF_INET6),
787 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin6_port)), 787 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin6_port)),
788 efl_net_ip_address_set(efl_added, slice)); 788 efl_net_ip_address_set(efl_added, slice));
789 _ipv6_check(o, &addr); 789 _ipv6_check(o, &addr);
790 efl_del(o); 790 efl_unref(o);
791 791
792 ecore_con_shutdown(); 792 ecore_con_shutdown();
793} 793}
@@ -808,16 +808,16 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_manual_fail)
808 /* generic errors checked at ecore_test_efl_net_ip_address_ipv4_manual_fail */ 808 /* generic errors checked at ecore_test_efl_net_ip_address_ipv4_manual_fail */
809 809
810 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: rw_slice.len != address.len is true"); 810 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: rw_slice.len != address.len is true");
811 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 811 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
812 efl_net_ip_address_family_set(efl_added, AF_INET6), 812 efl_net_ip_address_family_set(efl_added, AF_INET6),
813 efl_net_ip_address_set(efl_added, wrong_slice)); 813 efl_net_ip_address_set(efl_added, wrong_slice));
814 _ipv6_check(o, &addr); 814 _ipv6_check(o, &addr);
815 efl_del(o); 815 efl_unref(o);
816 TRAP_ERRORS_FINISH(1); 816 TRAP_ERRORS_FINISH(1);
817 817
818 addr.sin6_port = htons(12345); 818 addr.sin6_port = htons(12345);
819 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 1); 819 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 1);
820 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 820 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
821 efl_net_ip_address_family_set(efl_added, AF_INET6), 821 efl_net_ip_address_family_set(efl_added, AF_INET6),
822 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin6_port)), 822 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin6_port)),
823 efl_net_ip_address_set(efl_added, slice)); 823 efl_net_ip_address_set(efl_added, slice));
@@ -847,7 +847,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_manual_fail)
847 efl_net_ip_address_set(o, slice); 847 efl_net_ip_address_set(o, slice);
848 TRAP_ERRORS_FINISH(1); 848 TRAP_ERRORS_FINISH(1);
849 849
850 efl_del(o); 850 efl_unref(o);
851 851
852 ecore_con_shutdown(); 852 ecore_con_shutdown();
853} 853}
@@ -869,7 +869,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_create_ok)
869 ntohs(addr.sin6_port), 869 ntohs(addr.sin6_port),
870 slice); 870 slice);
871 _ipv6_check(o, &addr); 871 _ipv6_check(o, &addr);
872 efl_del(o); 872 efl_unref(o);
873 873
874 addr.sin6_port = htons(8081); 874 addr.sin6_port = htons(8081);
875 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0); 875 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0);
@@ -877,7 +877,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_create_ok)
877 ntohs(addr.sin6_port), 877 ntohs(addr.sin6_port),
878 slice); 878 slice);
879 _ipv6_check(o, &addr); 879 _ipv6_check(o, &addr);
880 efl_del(o); 880 efl_unref(o);
881 881
882 addr.sin6_port = htons(0); 882 addr.sin6_port = htons(0);
883 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 1); 883 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 1);
@@ -885,7 +885,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_create_ok)
885 ntohs(addr.sin6_port), 885 ntohs(addr.sin6_port),
886 slice); 886 slice);
887 _ipv6_check(o, &addr); 887 _ipv6_check(o, &addr);
888 efl_del(o); 888 efl_unref(o);
889 889
890 ecore_con_shutdown(); 890 ecore_con_shutdown();
891} 891}
@@ -905,14 +905,14 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_create_sockaddr_ok)
905 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr); 905 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr);
906 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o)); 906 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o));
907 _ipv6_check(o, &addr); 907 _ipv6_check(o, &addr);
908 efl_del(o); 908 efl_unref(o);
909 909
910 addr.sin6_port = htons(0); 910 addr.sin6_port = htons(0);
911 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0); 911 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0);
912 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr); 912 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr);
913 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o)); 913 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o));
914 _ipv6_check(o, &addr); 914 _ipv6_check(o, &addr);
915 efl_del(o); 915 efl_unref(o);
916 916
917 ecore_con_shutdown(); 917 ecore_con_shutdown();
918} 918}
@@ -927,86 +927,86 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_parse_ok)
927 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]:12345"); 927 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]:12345");
928 ck_assert_ptr_ne(o, NULL); 928 ck_assert_ptr_ne(o, NULL);
929 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]:12345"); 929 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]:12345");
930 efl_del(o); 930 efl_unref(o);
931 931
932 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]:0"); 932 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]:0");
933 ck_assert_ptr_ne(o, NULL); 933 ck_assert_ptr_ne(o, NULL);
934 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]"); 934 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]");
935 efl_del(o); 935 efl_unref(o);
936 936
937 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]"); 937 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]");
938 ck_assert_ptr_ne(o, NULL); 938 ck_assert_ptr_ne(o, NULL);
939 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]"); 939 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]");
940 efl_del(o); 940 efl_unref(o);
941 941
942 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "::1"); 942 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "::1");
943 ck_assert_ptr_ne(o, NULL); 943 ck_assert_ptr_ne(o, NULL);
944 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]"); 944 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]");
945 efl_del(o); 945 efl_unref(o);
946 946
947 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]:12345"); 947 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]:12345");
948 ck_assert_ptr_ne(o, NULL); 948 ck_assert_ptr_ne(o, NULL);
949 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]:12345"); 949 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]:12345");
950 efl_del(o); 950 efl_unref(o);
951 951
952 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]:0"); 952 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]:0");
953 ck_assert_ptr_ne(o, NULL); 953 ck_assert_ptr_ne(o, NULL);
954 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]"); 954 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]");
955 efl_del(o); 955 efl_unref(o);
956 956
957 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]"); 957 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]");
958 ck_assert_ptr_ne(o, NULL); 958 ck_assert_ptr_ne(o, NULL);
959 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]"); 959 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]");
960 efl_del(o); 960 efl_unref(o);
961 961
962 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "::"); 962 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "::");
963 ck_assert_ptr_ne(o, NULL); 963 ck_assert_ptr_ne(o, NULL);
964 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]"); 964 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]");
965 efl_del(o); 965 efl_unref(o);
966 966
967 /* IPv4 Mapped */ 967 /* IPv4 Mapped */
968 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::ffff:192.168.0.1]:12345"); 968 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::ffff:192.168.0.1]:12345");
969 ck_assert_ptr_ne(o, NULL); 969 ck_assert_ptr_ne(o, NULL);
970 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::ffff:192.168.0.1]:12345"); 970 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::ffff:192.168.0.1]:12345");
971 efl_del(o); 971 efl_unref(o);
972 972
973 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::ffff:192.168.0.1]"); 973 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::ffff:192.168.0.1]");
974 ck_assert_ptr_ne(o, NULL); 974 ck_assert_ptr_ne(o, NULL);
975 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::ffff:192.168.0.1]"); 975 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::ffff:192.168.0.1]");
976 efl_del(o); 976 efl_unref(o);
977 977
978 /* IPv4 Compatible */ 978 /* IPv4 Compatible */
979 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::192.168.0.1]:12345"); 979 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::192.168.0.1]:12345");
980 ck_assert_ptr_ne(o, NULL); 980 ck_assert_ptr_ne(o, NULL);
981 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::192.168.0.1]:12345"); 981 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::192.168.0.1]:12345");
982 efl_del(o); 982 efl_unref(o);
983 983
984 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::192.168.0.1]"); 984 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::192.168.0.1]");
985 ck_assert_ptr_ne(o, NULL); 985 ck_assert_ptr_ne(o, NULL);
986 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::192.168.0.1]"); 986 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::192.168.0.1]");
987 efl_del(o); 987 efl_unref(o);
988 988
989 /* Link Local */ 989 /* Link Local */
990 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fe80::1]:12345"); 990 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fe80::1]:12345");
991 ck_assert_ptr_ne(o, NULL); 991 ck_assert_ptr_ne(o, NULL);
992 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fe80::1]:12345"); 992 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fe80::1]:12345");
993 efl_del(o); 993 efl_unref(o);
994 994
995 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fe80::1]"); 995 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fe80::1]");
996 ck_assert_ptr_ne(o, NULL); 996 ck_assert_ptr_ne(o, NULL);
997 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fe80::1]"); 997 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fe80::1]");
998 efl_del(o); 998 efl_unref(o);
999 999
1000 /* Site Local */ 1000 /* Site Local */
1001 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fc00::1]:12345"); 1001 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fc00::1]:12345");
1002 ck_assert_ptr_ne(o, NULL); 1002 ck_assert_ptr_ne(o, NULL);
1003 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fc00::1]:12345"); 1003 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fc00::1]:12345");
1004 efl_del(o); 1004 efl_unref(o);
1005 1005
1006 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fc00::1]"); 1006 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fc00::1]");
1007 ck_assert_ptr_ne(o, NULL); 1007 ck_assert_ptr_ne(o, NULL);
1008 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fc00::1]"); 1008 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fc00::1]");
1009 efl_del(o); 1009 efl_unref(o);
1010 1010
1011 ecore_con_shutdown(); 1011 ecore_con_shutdown();
1012} 1012}
@@ -1253,7 +1253,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_checks)
1253 ck_assert_int_eq(efl_net_ip_address_ipv6_local_link_check(o), IN6_IS_ADDR_LINKLOCAL(ia)); 1253 ck_assert_int_eq(efl_net_ip_address_ipv6_local_link_check(o), IN6_IS_ADDR_LINKLOCAL(ia));
1254 ck_assert_int_eq(efl_net_ip_address_ipv6_local_site_check(o), IN6_IS_ADDR_SITELOCAL(ia)); 1254 ck_assert_int_eq(efl_net_ip_address_ipv6_local_site_check(o), IN6_IS_ADDR_SITELOCAL(ia));
1255 1255
1256 efl_del(o); 1256 efl_unref(o);
1257 } 1257 }
1258 1258
1259 ecore_con_shutdown(); 1259 ecore_con_shutdown();
diff --git a/src/tests/efl/efl_test_model_composite.c b/src/tests/efl/efl_test_model_composite.c
index 175adee..9f29468 100644
--- a/src/tests/efl/efl_test_model_composite.c
+++ b/src/tests/efl/efl_test_model_composite.c
@@ -183,7 +183,7 @@ START_TEST(efl_test_model_composite_boolean)
183 183
184 eina_value_setup(&v, EINA_VALUE_TYPE_INT); 184 eina_value_setup(&v, EINA_VALUE_TYPE_INT);
185 185
186 base_model = efl_add(EFL_MODEL_ITEM_CLASS, NULL); 186 base_model = efl_add_ref(EFL_MODEL_ITEM_CLASS, NULL);
187 ck_assert(!!base_model); 187 ck_assert(!!base_model);
188 188
189 for (i = 0; i < child_number; ++i) 189 for (i = 0; i < child_number; ++i)
@@ -194,7 +194,7 @@ START_TEST(efl_test_model_composite_boolean)
194 efl_model_property_set(child, "test_p_int", &v); 194 efl_model_property_set(child, "test_p_int", &v);
195 } 195 }
196 196
197 model = efl_add(EFL_MODEL_COMPOSITE_BOOLEAN_CLASS, NULL, 197 model = efl_add_ref(EFL_MODEL_COMPOSITE_BOOLEAN_CLASS, NULL,
198 efl_ui_view_model_set(efl_added, base_model), 198 efl_ui_view_model_set(efl_added, base_model),
199 efl_model_composite_boolean_property_add(efl_added, "test_p_true", EINA_TRUE), 199 efl_model_composite_boolean_property_add(efl_added, "test_p_true", EINA_TRUE),
200 efl_model_composite_boolean_property_add(efl_added, "test_p_false", EINA_FALSE)); 200 efl_model_composite_boolean_property_add(efl_added, "test_p_false", EINA_FALSE));
@@ -226,7 +226,7 @@ START_TEST(efl_test_model_composite_selection)
226 226
227 eina_value_setup(&v, EINA_VALUE_TYPE_INT); 227 eina_value_setup(&v, EINA_VALUE_TYPE_INT);
228 228
229 base_model = efl_add(EFL_MODEL_ITEM_CLASS, NULL); 229 base_model = efl_add_ref(EFL_MODEL_ITEM_CLASS, NULL);
230 ck_assert(!!base_model); 230 ck_assert(!!base_model);
231 231
232 for (i = 0; i < child_number; ++i) 232 for (i = 0; i < child_number; ++i)
@@ -237,7 +237,7 @@ START_TEST(efl_test_model_composite_selection)
237 efl_model_property_set(child, "test_p_int", &v); 237 efl_model_property_set(child, "test_p_int", &v);
238 } 238 }
239 239
240 model = efl_add(EFL_MODEL_COMPOSITE_SELECTION_CLASS, NULL, 240 model = efl_add_ref(EFL_MODEL_COMPOSITE_SELECTION_CLASS, NULL,
241 efl_ui_view_model_set(efl_added, base_model)); 241 efl_ui_view_model_set(efl_added, base_model));
242 ck_assert(!!model); 242 ck_assert(!!model);
243 efl_model_composite_selection_select(model, 2); 243 efl_model_composite_selection_select(model, 2);
diff --git a/src/tests/efl/efl_test_model_container.c b/src/tests/efl/efl_test_model_container.c
index bfd1984..127e250 100644
--- a/src/tests/efl/efl_test_model_container.c
+++ b/src/tests/efl/efl_test_model_container.c
@@ -130,7 +130,7 @@ START_TEST(efl_test_model_container_values)
130 cmp_str[i] = strdup(base_str[i]); 130 cmp_str[i] = strdup(base_str[i]);
131 } 131 }
132 132
133 model = efl_add(EFL_MODEL_CONTAINER_CLASS, NULL); 133 model = efl_add_ref(EFL_MODEL_CONTAINER_CLASS, NULL);
134 134
135 efl_model_container_child_property_add(model, "test_p_int", EINA_VALUE_TYPE_INT, 135 efl_model_container_child_property_add(model, "test_p_int", EINA_VALUE_TYPE_INT,
136 eina_carray_iterator_new((void**)cmp_int)); 136 eina_carray_iterator_new((void**)cmp_int));
diff --git a/src/tests/efl_mono/libefl_mono_native_test.c b/src/tests/efl_mono/libefl_mono_native_test.c
index 19fe984..8981a04 100644
--- a/src/tests/efl_mono/libefl_mono_native_test.c
+++ b/src/tests/efl_mono/libefl_mono_native_test.c
@@ -85,7 +85,7 @@ char **_new_str_ref(const char* str)
85static 85static
86Test_Numberwrapper *_new_obj(int n) 86Test_Numberwrapper *_new_obj(int n)
87{ 87{
88 return efl_add(TEST_NUMBERWRAPPER_CLASS, NULL, test_numberwrapper_number_set(efl_added, n)); 88 return efl_add_ref(TEST_NUMBERWRAPPER_CLASS, NULL, test_numberwrapper_number_set(efl_added, n));
89} 89}
90 90
91static 91static
diff --git a/src/tests/eio/eio_test_sentry.c b/src/tests/eio/eio_test_sentry.c
index 98e4863..0ae402a 100644
--- a/src/tests/eio/eio_test_sentry.c
+++ b/src/tests/eio/eio_test_sentry.c
@@ -146,7 +146,7 @@ START_TEST(eio_test_sentry_add_and_remove)
146 usleep(500000); 146 usleep(500000);
147 147
148 //monitor directory 148 //monitor directory
149 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 149 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
150 fail_if(!eio_sentry_add(sentry, filename)); 150 fail_if(!eio_sentry_add(sentry, filename));
151 151
152 usleep(500000); 152 usleep(500000);
@@ -172,7 +172,7 @@ START_TEST(eio_test_sentry_add_remove_add)
172 usleep(500000); 172 usleep(500000);
173 173
174 //monitor directory 174 //monitor directory
175 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 175 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
176 fail_if(!eio_sentry_add(sentry, filename)); 176 fail_if(!eio_sentry_add(sentry, filename));
177 eio_sentry_remove(sentry, filename); 177 eio_sentry_remove(sentry, filename);
178 178
@@ -202,7 +202,7 @@ START_TEST(eio_test_sentry_add_add_remove_remove)
202 //sleep to avoid catching event generated by above manipulations 202 //sleep to avoid catching event generated by above manipulations
203 usleep(500000); 203 usleep(500000);
204 204
205 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 205 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
206 206
207 //monitor directory 207 //monitor directory
208 fail_if(!eio_sentry_add(sentry, filename1)); 208 fail_if(!eio_sentry_add(sentry, filename1));
@@ -232,7 +232,7 @@ START_TEST(eio_test_sentry_directory_file_created_notify)
232 Eo* sentry; 232 Eo* sentry;
233 233
234 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_created_notify", dirname); 234 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_created_notify", dirname);
235 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 235 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
236 236
237 //sleep to avoid catching event generated by above manipulations 237 //sleep to avoid catching event generated by above manipulations
238 usleep(500000); 238 usleep(500000);
@@ -259,7 +259,7 @@ START_TEST(eio_test_sentry_directory_file_deleted_notify)
259 259
260 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_deleted_notify", dirname); 260 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_deleted_notify", dirname);
261 _create_file((void*)filename); 261 _create_file((void*)filename);
262 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 262 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
263 263
264 //sleep to avoid catching event generated by above manipulations 264 //sleep to avoid catching event generated by above manipulations
265 usleep(500000); 265 usleep(500000);
@@ -286,7 +286,7 @@ START_TEST(eio_test_sentry_directory_file_modified_notify)
286 286
287 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_modified_notify", dirname); 287 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_modified_notify", dirname);
288 _create_file((void*)filename); 288 _create_file((void*)filename);
289 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 289 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
290 290
291 //sleep to avoid catching event generated by above manipulations 291 //sleep to avoid catching event generated by above manipulations
292 usleep(500000); 292 usleep(500000);
@@ -314,7 +314,7 @@ START_TEST(eio_test_sentry_directory_file_closed_notify)
314 314
315 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_closed_notify", dirname); 315 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_closed_notify", dirname);
316 _create_file((void*)filename); 316 _create_file((void*)filename);
317 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 317 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
318 318
319 //sleep to avoid catching event generated by above manipulations 319 //sleep to avoid catching event generated by above manipulations
320 usleep(500000); 320 usleep(500000);
@@ -339,7 +339,7 @@ START_TEST(eio_test_sentry_directory_directory_created_notify)
339 Eo *sentry; 339 Eo *sentry;
340 340
341 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_directory_created_notify", dirname); 341 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_directory_created_notify", dirname);
342 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 342 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
343 343
344 //sleep to avoid catching event generated by above manipulations 344 //sleep to avoid catching event generated by above manipulations
345 usleep(500000); 345 usleep(500000);
@@ -366,7 +366,7 @@ START_TEST(eio_test_sentry_directory_directory_deleted_notify)
366 366
367 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_directory_deleted_notify", dirname); 367 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_directory_deleted_notify", dirname);
368 _create_directory((void*)filename); 368 _create_directory((void*)filename);
369 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 369 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
370 370
371 //sleep to avoid catching event generated by above manipulations 371 //sleep to avoid catching event generated by above manipulations
372 usleep(500000); 372 usleep(500000);
@@ -393,7 +393,7 @@ START_TEST(eio_test_sentry_directory_directory_modified_notify)
393 393
394 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_directory_modified_notify", dirname); 394 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_directory_modified_notify", dirname);
395 _create_directory((void*)filename); 395 _create_directory((void*)filename);
396 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 396 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
397 397
398 //sleep to avoid catching event generated by above manipulations 398 //sleep to avoid catching event generated by above manipulations
399 usleep(500000); 399 usleep(500000);
@@ -415,7 +415,7 @@ END_TEST
415START_TEST(eio_test_sentry_directory_directory_self_deleted_notify) 415START_TEST(eio_test_sentry_directory_directory_self_deleted_notify)
416{ 416{
417 Eina_Tmpstr *dirname = _common_init(); 417 Eina_Tmpstr *dirname = _common_init();
418 Eo *sentry = efl_add(EIO_SENTRY_CLASS, NULL); 418 Eo *sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
419 419
420 //sleep to avoid catching event generated by above manipulations 420 //sleep to avoid catching event generated by above manipulations
421 usleep(500000); 421 usleep(500000);
@@ -444,7 +444,7 @@ START_TEST(eio_test_sentry_file_file_modified_notify)
444 444
445 filename = eina_stringshare_printf("%s/filecreated", dirname); 445 filename = eina_stringshare_printf("%s/filecreated", dirname);
446 _create_file((void*)filename); 446 _create_file((void*)filename);
447 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 447 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
448 448
449 //sleep to avoid catching event generated by above manipulations 449 //sleep to avoid catching event generated by above manipulations
450 usleep(500000); 450 usleep(500000);
@@ -472,7 +472,7 @@ START_TEST(eio_test_sentry_file_file_attrib_modified_notify)
472 472
473 filename = eina_stringshare_printf("%s/eio_test_sentry_file_file_attrib_modified_notify", dirname); 473 filename = eina_stringshare_printf("%s/eio_test_sentry_file_file_attrib_modified_notify", dirname);
474 _create_file((void*)filename); 474 _create_file((void*)filename);
475 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 475 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
476 476
477 //sleep to avoid catching event generated by above manipulations 477 //sleep to avoid catching event generated by above manipulations
478 usleep(500000); 478 usleep(500000);
@@ -500,7 +500,7 @@ START_TEST(eio_test_sentry_file_file_closed_notify)
500 500
501 filename = eina_stringshare_printf("%s/eio_test_sentry_file_file_closed_notify", dirname); 501 filename = eina_stringshare_printf("%s/eio_test_sentry_file_file_closed_notify", dirname);
502 _create_file((void*)filename); 502 _create_file((void*)filename);
503 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 503 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
504 504
505 //sleep to avoid catching event generated by above manipulations 505 //sleep to avoid catching event generated by above manipulations
506 usleep(500000); 506 usleep(500000);
@@ -526,7 +526,7 @@ START_TEST(eio_test_sentry_file_file_self_deleted_notify)
526 526
527 filename = eina_stringshare_printf("%s/eio_test_sentry_file_file_self_deleted_notify", dirname); 527 filename = eina_stringshare_printf("%s/eio_test_sentry_file_file_self_deleted_notify", dirname);
528 _create_file((void*)filename); 528 _create_file((void*)filename);
529 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 529 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
530 530
531 //sleep to avoid catching event generated by above manipulations 531 //sleep to avoid catching event generated by above manipulations
532 usleep(500000); 532 usleep(500000);
@@ -555,7 +555,7 @@ START_TEST(eio_test_sentry_two_monitors_one_event)
555 555
556 eina_file_mkdtemp("checkFileCreationXXXXXX", &dirname2); 556 eina_file_mkdtemp("checkFileCreationXXXXXX", &dirname2);
557 filename = eina_stringshare_printf("%s/eio_test_sentry_two_monitors_one_event", dirname); 557 filename = eina_stringshare_printf("%s/eio_test_sentry_two_monitors_one_event", dirname);
558 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 558 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
559 559
560 //sleep to avoid catching event generated by above manipulations 560 //sleep to avoid catching event generated by above manipulations
561 usleep(500000); 561 usleep(500000);
@@ -587,7 +587,7 @@ START_TEST(eio_test_sentry_two_monitors_one_removed_one_event)
587 587
588 eina_file_mkdtemp("checkFileCreationXXXXXX", &dirname2); 588 eina_file_mkdtemp("checkFileCreationXXXXXX", &dirname2);
589 filename = eina_stringshare_printf("%s/eio_test_sentry_two_monitors_one_removed", dirname); 589 filename = eina_stringshare_printf("%s/eio_test_sentry_two_monitors_one_removed", dirname);
590 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 590 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
591 591
592 //sleep to avoid catching event generated by above manipulations 592 //sleep to avoid catching event generated by above manipulations
593 usleep(500000); 593 usleep(500000);
@@ -624,7 +624,7 @@ START_TEST(eio_test_sentry_two_monitors_one_removed_no_event)
624 624
625 eina_file_mkdtemp("checkFileCreationXXXXXX", &dirname2); 625 eina_file_mkdtemp("checkFileCreationXXXXXX", &dirname2);
626 filename = eina_stringshare_printf("%s/eio_test_sentry_two_monitors_one_removed", dirname); 626 filename = eina_stringshare_printf("%s/eio_test_sentry_two_monitors_one_removed", dirname);
627 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 627 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
628 628
629 //sleep to avoid catching event generated by above manipulations 629 //sleep to avoid catching event generated by above manipulations
630 usleep(500000); 630 usleep(500000);
@@ -658,7 +658,7 @@ START_TEST(eio_test_sentry_two_files_in_same_directory)
658 filename2 = eina_stringshare_printf("%s/eio_test_sentry_two_files_in_same_directory_2", dirname); 658 filename2 = eina_stringshare_printf("%s/eio_test_sentry_two_files_in_same_directory_2", dirname);
659 _create_file((void*)filename); 659 _create_file((void*)filename);
660 _create_file((void*)filename2); 660 _create_file((void*)filename2);
661 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 661 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
662 662
663 //sleep to avoid catching event generated by above manipulations 663 //sleep to avoid catching event generated by above manipulations
664 usleep(500000); 664 usleep(500000);
@@ -691,7 +691,7 @@ START_TEST(eio_test_sentry_two_files_in_same_directory_one_removed)
691 filename2 = eina_stringshare_printf("%s/eio_test_sentry_two_files_in_same_directory_one_removed_2", dirname); 691 filename2 = eina_stringshare_printf("%s/eio_test_sentry_two_files_in_same_directory_one_removed_2", dirname);
692 _create_file((void*)filename); 692 _create_file((void*)filename);
693 _create_file((void*)filename2); 693 _create_file((void*)filename2);
694 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 694 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
695 695
696 //sleep to avoid catching event generated by above manipulations 696 //sleep to avoid catching event generated by above manipulations
697 usleep(500000); 697 usleep(500000);
diff --git a/src/tests/elementary/elm_test_atspi.c b/src/tests/elementary/elm_test_atspi.c
index 61c9c4e..0afddf3 100644
--- a/src/tests/elementary/elm_test_atspi.c
+++ b/src/tests/elementary/elm_test_atspi.c
@@ -31,7 +31,7 @@ START_TEST (test_efl_access_app_obj_name_get)
31 char *args[] = { "exe" }; 31 char *args[] = { "exe" };
32 elm_init(1, args); 32 elm_init(1, args);
33 33
34 Eo* root = efl_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 34 Eo* root = efl_add_ref(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
35 35
36 ck_assert(root != NULL); 36 ck_assert(root != NULL);
37 37
@@ -106,7 +106,7 @@ START_TEST (test_efl_access_role_get)
106 char *args[] = { "exe" }; 106 char *args[] = { "exe" };
107 elm_init(1, args); 107 elm_init(1, args);
108 108
109 Eo* root = efl_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 109 Eo* root = efl_add_ref(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
110 110
111 Efl_Access_Role role; 111 Efl_Access_Role role;
112 112
@@ -147,7 +147,7 @@ START_TEST (test_efl_access_role_name_get)
147 char *args[] = { "exe" }; 147 char *args[] = { "exe" };
148 elm_init(1, args); 148 elm_init(1, args);
149 149
150 Eo* root = efl_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 150 Eo* root = efl_add_ref(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
151 151
152 const char *ret = NULL; 152 const char *ret = NULL;
153 153
@@ -165,7 +165,7 @@ START_TEST (test_efl_access_localized_role_name_get)
165 char *args[] = { "exe" }; 165 char *args[] = { "exe" };
166 elm_init(1, args); 166 elm_init(1, args);
167 167
168 Eo* root = efl_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 168 Eo* root = efl_add_ref(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
169 169
170 const char *ret = NULL; 170 const char *ret = NULL;
171 171
@@ -183,7 +183,7 @@ START_TEST (test_efl_access_description_set)
183 char *args[] = { "exe" }; 183 char *args[] = { "exe" };
184 elm_init(1, args); 184 elm_init(1, args);
185 185
186 Eo* root = efl_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 186 Eo* root = efl_add_ref(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
187 187
188 const char *ret = NULL; 188 const char *ret = NULL;
189 189
@@ -231,7 +231,7 @@ START_TEST (test_efl_access_children_and_parent)
231 elm_init(1, args); 231 elm_init(1, args);
232 232
233 generate_app(); 233 generate_app();
234 Eo* root = efl_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 234 Eo* root = efl_add_ref(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
235 235
236 Eina_List *child_list = NULL; 236 Eina_List *child_list = NULL;
237 237
@@ -259,7 +259,7 @@ START_TEST (test_efl_access_children_and_parent2)
259 elm_init(1, args); 259 elm_init(1, args);
260 260
261 generate_app(); 261 generate_app();
262 Eo* root = efl_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 262 Eo* root = efl_add_ref(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
263 263
264 Eo *win = NULL; 264 Eo *win = NULL;
265 265
diff --git a/src/tests/elementary/elm_test_config.c b/src/tests/elementary/elm_test_config.c
index 12813b0..c7593bd 100644
--- a/src/tests/elementary/elm_test_config.c
+++ b/src/tests/elementary/elm_test_config.c
@@ -155,14 +155,14 @@ START_TEST (elm_config_win)
155 Eo *cfg = efl_provider_find(efl_main_loop_get(), EFL_CONFIG_INTERFACE); 155 Eo *cfg = efl_provider_find(efl_main_loop_get(), EFL_CONFIG_INTERFACE);
156 fail_if(!cfg); 156 fail_if(!cfg);
157 157
158 Eo *win = efl_add(EFL_UI_WIN_CLASS, NULL); 158 Eo *win = efl_add_ref(EFL_UI_WIN_CLASS, NULL);
159 Eo *cfg2 = efl_provider_find(win, EFL_CONFIG_INTERFACE); 159 Eo *cfg2 = efl_provider_find(win, EFL_CONFIG_INTERFACE);
160 fail_if(cfg != cfg2); 160 fail_if(cfg != cfg2);
161 161
162 elm_config_cache_flush_interval_set(42); 162 elm_config_cache_flush_interval_set(42);
163 fail_if(efl_config_int_get(win, "cache_flush_interval") != 42); 163 fail_if(efl_config_int_get(win, "cache_flush_interval") != 42);
164 164
165 efl_del(win); 165 efl_unref(win);
166 elm_shutdown(); 166 elm_shutdown();
167} 167}
168END_TEST 168END_TEST
diff --git a/src/tests/elementary/elm_test_focus.c b/src/tests/elementary/elm_test_focus.c
index b2adc25..405b2fc 100644
--- a/src/tests/elementary/elm_test_focus.c
+++ b/src/tests/elementary/elm_test_focus.c
@@ -4,10 +4,10 @@ START_TEST(focus_unregister_twice)
4{ 4{
5 char *args[] = { "exe" }; 5 char *args[] = { "exe" };
6 elm_init(1, args); 6 elm_init(1, args);
7 Efl_Ui_Focus_Object *r1 = efl_add(FOCUS_TEST_CLASS, NULL); 7 Efl_Ui_Focus_Object *r1 = efl_add_ref(FOCUS_TEST_CLASS, NULL);
8 Efl_Ui_Focus_Object *r2 = efl_add(FOCUS_TEST_CLASS, NULL); 8 Efl_Ui_Focus_Object *r2 = efl_add_ref(FOCUS_TEST_CLASS, NULL);
9 9
10 Efl_Ui_Focus_Manager *m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 10 Efl_Ui_Focus_Manager *m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
11 efl_ui_focus_manager_root_set(efl_added, r1) 11 efl_ui_focus_manager_root_set(efl_added, r1)
12 ); 12 );
13 13
@@ -17,9 +17,9 @@ START_TEST(focus_unregister_twice)
17 efl_ui_focus_manager_calc_unregister(m, r1); 17 efl_ui_focus_manager_calc_unregister(m, r1);
18 efl_ui_focus_manager_calc_unregister(m, r1); 18 efl_ui_focus_manager_calc_unregister(m, r1);
19 19
20 efl_del(r2); 20 efl_unref(r2);
21 efl_del(r1); 21 efl_unref(r1);
22 efl_del(m); 22 efl_unref(m);
23 23
24 elm_shutdown(); 24 elm_shutdown();
25} 25}
@@ -33,15 +33,15 @@ START_TEST(focus_register_twice)
33 Efl_Ui_Focus_Object *r1 = elm_focus_test_object_new("r1", 0, 0, 10, 10); 33 Efl_Ui_Focus_Object *r1 = elm_focus_test_object_new("r1", 0, 0, 10, 10);
34 Efl_Ui_Focus_Object *r2 = elm_focus_test_object_new("r2", 0, 10, 10, 10); 34 Efl_Ui_Focus_Object *r2 = elm_focus_test_object_new("r2", 0, 10, 10, 10);
35 35
36 Efl_Ui_Focus_Manager *m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 36 Efl_Ui_Focus_Manager *m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
37 efl_ui_focus_manager_root_set(efl_added, r1) 37 efl_ui_focus_manager_root_set(efl_added, r1)
38 ); 38 );
39 39
40 fail_if(!efl_ui_focus_manager_calc_register(m, r2, r1, NULL)); 40 fail_if(!efl_ui_focus_manager_calc_register(m, r2, r1, NULL));
41 fail_if(efl_ui_focus_manager_calc_register(m, r2, r1, NULL)); 41 fail_if(efl_ui_focus_manager_calc_register(m, r2, r1, NULL));
42 42
43 efl_del(r1); 43 efl_unref(r1);
44 efl_del(m); 44 efl_unref(m);
45 45
46 elm_shutdown(); 46 elm_shutdown();
47} 47}
@@ -81,11 +81,11 @@ START_TEST(pos_check)
81 CHECK(north, east, west, NULL, middle) 81 CHECK(north, east, west, NULL, middle)
82 CHECK(south, east, west, middle, NULL) 82 CHECK(south, east, west, middle, NULL)
83 83
84 efl_del(middle); 84 efl_unref(middle);
85 efl_del(south); 85 efl_unref(south);
86 efl_del(north); 86 efl_unref(north);
87 efl_del(east); 87 efl_unref(east);
88 efl_del(west); 88 efl_unref(west);
89 89
90 elm_shutdown(); 90 elm_shutdown();
91} 91}
@@ -155,11 +155,11 @@ START_TEST(pos_check2)
155 155
156#undef ck_assert_set_eq 156#undef ck_assert_set_eq
157 157
158 efl_del(middle); 158 efl_unref(middle);
159 efl_del(north_east); 159 efl_unref(north_east);
160 efl_del(north_west); 160 efl_unref(north_west);
161 efl_del(south_east); 161 efl_unref(south_east);
162 efl_del(south_west); 162 efl_unref(south_west);
163 163
164 elm_shutdown(); 164 elm_shutdown();
165} 165}
@@ -174,11 +174,11 @@ START_TEST(redirect)
174 TEST_OBJ_NEW(one, 0, 0, 20, 20); 174 TEST_OBJ_NEW(one, 0, 0, 20, 20);
175 TEST_OBJ_NEW(two, 20, 0, 20, 20); 175 TEST_OBJ_NEW(two, 20, 0, 20, 20);
176 176
177 Efl_Ui_Focus_Manager *m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 177 Efl_Ui_Focus_Manager *m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
178 efl_ui_focus_manager_root_set(efl_added, root) 178 efl_ui_focus_manager_root_set(efl_added, root)
179 ); 179 );
180 180
181 Efl_Ui_Focus_Manager *m2 = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 181 Efl_Ui_Focus_Manager *m2 = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
182 efl_ui_focus_manager_root_set(efl_added, root2) 182 efl_ui_focus_manager_root_set(efl_added, root2)
183 ); 183 );
184 184
@@ -308,7 +308,7 @@ START_TEST(finalize_check)
308 char *args[] = { "exe" }; 308 char *args[] = { "exe" };
309 elm_init(1, args); 309 elm_init(1, args);
310 310
311 m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL); 311 m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL);
312 fail_if(m); 312 fail_if(m);
313 313
314 elm_shutdown(); 314 elm_shutdown();
@@ -326,11 +326,11 @@ START_TEST(redirect_param)
326 TEST_OBJ_NEW(root2, 0, 20, 20, 20); 326 TEST_OBJ_NEW(root2, 0, 20, 20, 20);
327 TEST_OBJ_NEW(child, 0, 20, 20, 20); 327 TEST_OBJ_NEW(child, 0, 20, 20, 20);
328 328
329 m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 329 m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
330 efl_ui_focus_manager_root_set(efl_added, root) 330 efl_ui_focus_manager_root_set(efl_added, root)
331 ); 331 );
332 332
333 m2 = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 333 m2 = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
334 efl_ui_focus_manager_root_set(efl_added, root2) 334 efl_ui_focus_manager_root_set(efl_added, root2)
335 ); 335 );
336 336
@@ -354,7 +354,7 @@ START_TEST(invalid_args_check)
354 TEST_OBJ_NEW(child, 0, 20, 20, 20); 354 TEST_OBJ_NEW(child, 0, 20, 20, 20);
355 TEST_OBJ_NEW(child2, 0, 20, 20, 20); 355 TEST_OBJ_NEW(child2, 0, 20, 20, 20);
356 356
357 m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 357 m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
358 efl_ui_focus_manager_root_set(efl_added, root) 358 efl_ui_focus_manager_root_set(efl_added, root)
359 ); 359 );
360 360
@@ -389,7 +389,7 @@ START_TEST(order_check)
389 TEST_OBJ_NEW(child2, 0, 20, 20, 20); 389 TEST_OBJ_NEW(child2, 0, 20, 20, 20);
390 TEST_OBJ_NEW(child3, 0, 20, 20, 20); 390 TEST_OBJ_NEW(child3, 0, 20, 20, 20);
391 391
392 m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 392 m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
393 efl_ui_focus_manager_root_set(efl_added, root) 393 efl_ui_focus_manager_root_set(efl_added, root)
394 ); 394 );
395 395
@@ -428,7 +428,7 @@ START_TEST(logical_shift)
428 TEST_OBJ_NEW(sub_sub, 0, 0, 10, 10); 428 TEST_OBJ_NEW(sub_sub, 0, 0, 10, 10);
429 TEST_OBJ_NEW(sub_child, 0, 0, 10, 10); 429 TEST_OBJ_NEW(sub_child, 0, 0, 10, 10);
430 430
431 m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 431 m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
432 efl_ui_focus_manager_root_set(efl_added, root) 432 efl_ui_focus_manager_root_set(efl_added, root)
433 ); 433 );
434 434
@@ -461,13 +461,13 @@ START_TEST(root_redirect_chain)
461 TEST_OBJ_NEW(root2, 0, 20, 20, 20); 461 TEST_OBJ_NEW(root2, 0, 20, 20, 20);
462 TEST_OBJ_NEW(child, 0, 20, 20, 20); 462 TEST_OBJ_NEW(child, 0, 20, 20, 20);
463 463
464 m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 464 m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
465 efl_ui_focus_manager_root_set(efl_added, root) 465 efl_ui_focus_manager_root_set(efl_added, root)
466 ); 466 );
467 467
468 focus_test_manager_set(root2, m); 468 focus_test_manager_set(root2, m);
469 469
470 m2 = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 470 m2 = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
471 efl_ui_focus_manager_root_set(efl_added, root2) 471 efl_ui_focus_manager_root_set(efl_added, root2)
472 ); 472 );
473 473
@@ -492,21 +492,21 @@ START_TEST(root_redirect_chain_unset)
492 TEST_OBJ_NEW(root2, 0, 20, 20, 20); 492 TEST_OBJ_NEW(root2, 0, 20, 20, 20);
493 TEST_OBJ_NEW(child, 0, 20, 20, 20); 493 TEST_OBJ_NEW(child, 0, 20, 20, 20);
494 494
495 m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 495 m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
496 efl_ui_focus_manager_root_set(efl_added, root) 496 efl_ui_focus_manager_root_set(efl_added, root)
497 ); 497 );
498 498
499 focus_test_manager_set(root2, m); 499 focus_test_manager_set(root2, m);
500 500
501 m2 = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 501 m2 = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
502 efl_ui_focus_manager_root_set(efl_added, root2) 502 efl_ui_focus_manager_root_set(efl_added, root2)
503 ); 503 );
504 504
505 m3 = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 505 m3 = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
506 efl_ui_focus_manager_root_set(efl_added, root2) 506 efl_ui_focus_manager_root_set(efl_added, root2)
507 ); 507 );
508 508
509 m4 = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 509 m4 = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
510 efl_ui_focus_manager_root_set(efl_added, root2) 510 efl_ui_focus_manager_root_set(efl_added, root2)
511 ); 511 );
512 512
@@ -536,7 +536,7 @@ _recursive_triangle_manager(int recusion_depth, Efl_Ui_Focus_Object **most_right
536 TEST_OBJ_NEW(root, 0, 20, 20, 20); 536 TEST_OBJ_NEW(root, 0, 20, 20, 20);
537 TEST_OBJ_NEW(child2, 0, 20, 20, 20); 537 TEST_OBJ_NEW(child2, 0, 20, 20, 20);
538 538
539 m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 539 m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
540 efl_ui_focus_manager_root_set(efl_added, root) 540 efl_ui_focus_manager_root_set(efl_added, root)
541 ); 541 );
542 542
diff --git a/src/tests/elementary/elm_test_focus_common.c b/src/tests/elementary/elm_test_focus_common.c
index 00a96b3..589c682 100644
--- a/src/tests/elementary/elm_test_focus_common.c
+++ b/src/tests/elementary/elm_test_focus_common.c
@@ -17,7 +17,7 @@ elm_focus_test_object_new(const char *name, int x, int y, int w, int h)
17{ 17{
18 Efl_Ui_Focus_Object *ret; 18 Efl_Ui_Focus_Object *ret;
19 19
20 ret = efl_add(FOCUS_TEST_CLASS, NULL, 20 ret = efl_add_ref(FOCUS_TEST_CLASS, NULL,
21 efl_name_set(efl_added, name) 21 efl_name_set(efl_added, name)
22 ); 22 );
23 Q(ret, x, y, w, h); 23 Q(ret, x, y, w, h);
@@ -48,7 +48,7 @@ elm_focus_test_manager_new(Efl_Ui_Focus_Object **middle)
48 Efl_Ui_Focus_Manager *m; 48 Efl_Ui_Focus_Manager *m;
49 49
50 root = elm_focus_test_object_new("middle", 40, 40, 20, 20); 50 root = elm_focus_test_object_new("middle", 40, 40, 20, 20);
51 m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 51 m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
52 efl_ui_focus_manager_root_set(efl_added, root) 52 efl_ui_focus_manager_root_set(efl_added, root)
53 ); 53 );
54 if (middle) 54 if (middle)
diff --git a/src/tests/elementary/elm_test_focus_sub.c b/src/tests/elementary/elm_test_focus_sub.c
index d091d2d..397dfcf 100644
--- a/src/tests/elementary/elm_test_focus_sub.c
+++ b/src/tests/elementary/elm_test_focus_sub.c
@@ -75,7 +75,7 @@ _setup(Efl_Ui_Focus_Manager **m, Efl_Ui_Focus_Manager_Sub **sub, Efl_Ui_Focus_Ob
75 EFL_OBJECT_OP_FUNC(efl_ui_focus_manager_calc_unregister, _unregister), 75 EFL_OBJECT_OP_FUNC(efl_ui_focus_manager_calc_unregister, _unregister),
76 ); 76 );
77 77
78 Efl_Ui_Focus_Manager *manager = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 78 Efl_Ui_Focus_Manager *manager = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
79 efl_ui_focus_manager_root_set(efl_added, root_manager) 79 efl_ui_focus_manager_root_set(efl_added, root_manager)
80 ); 80 );
81 //flush now all changes 81 //flush now all changes
@@ -85,7 +85,7 @@ _setup(Efl_Ui_Focus_Manager **m, Efl_Ui_Focus_Manager_Sub **sub, Efl_Ui_Focus_Ob
85 85
86 efl_object_override(manager, &manager_tracker); 86 efl_object_override(manager, &manager_tracker);
87 87
88 Focus_Test_Sub_Main *focus_main = efl_add(FOCUS_TEST_SUB_MAIN_CLASS, NULL); 88 Focus_Test_Sub_Main *focus_main = efl_add_ref(FOCUS_TEST_SUB_MAIN_CLASS, NULL);
89 89
90 efl_key_data_set(focus_main, "__user_manager", manager); 90 efl_key_data_set(focus_main, "__user_manager", manager);
91 efl_key_data_set(focus_main, "__user_parent", root_manager); 91 efl_key_data_set(focus_main, "__user_parent", root_manager);
@@ -137,11 +137,11 @@ START_TEST(correct_register)
137 efl_ui_focus_manager_calc_unregister(sub, child1); 137 efl_ui_focus_manager_calc_unregister(sub, child1);
138 efl_ui_focus_manager_calc_unregister(sub, child2); 138 efl_ui_focus_manager_calc_unregister(sub, child2);
139 efl_ui_focus_manager_calc_unregister(sub, child3); 139 efl_ui_focus_manager_calc_unregister(sub, child3);
140 efl_del(child1); 140 efl_unref(child1);
141 efl_del(child2); 141 efl_unref(child2);
142 efl_del(child3); 142 efl_unref(child3);
143 efl_del(sub); 143 efl_unref(sub);
144 efl_del(manager); 144 efl_unref(manager);
145 elm_shutdown(); 145 elm_shutdown();
146} 146}
147END_TEST 147END_TEST
@@ -180,12 +180,12 @@ START_TEST(correct_unregister)
180 eina_list_free(unregistered); 180 eina_list_free(unregistered);
181 unregistered = NULL; 181 unregistered = NULL;
182 182
183 efl_del(sub); 183 efl_unref(sub);
184 efl_del(manager); 184 efl_unref(manager);
185 efl_del(root); 185 efl_unref(root);
186 efl_del(child1); 186 efl_unref(child1);
187 efl_del(child2); 187 efl_unref(child2);
188 efl_del(child3); 188 efl_unref(child3);
189 elm_shutdown(); 189 elm_shutdown();
190} 190}
191END_TEST 191END_TEST
@@ -222,12 +222,12 @@ START_TEST(correct_un_register)
222 fail_if(!_set_equal(registered, set_add)); 222 fail_if(!_set_equal(registered, set_add));
223 fail_if(!_set_equal(unregistered, set_del)); 223 fail_if(!_set_equal(unregistered, set_del));
224 224
225 efl_del(sub); 225 efl_unref(sub);
226 efl_del(manager); 226 efl_unref(manager);
227 efl_del(root); 227 efl_unref(root);
228 efl_del(child1); 228 efl_unref(child1);
229 efl_del(child2); 229 efl_unref(child2);
230 efl_del(child3); 230 efl_unref(child3);
231 elm_shutdown(); 231 elm_shutdown();
232} 232}
233END_TEST 233END_TEST
diff --git a/src/tests/eo/access/access_main.c b/src/tests/eo/access/access_main.c
index 1188a60..4bc3db5 100644
--- a/src/tests/eo/access/access_main.c
+++ b/src/tests/eo/access/access_main.c
@@ -13,7 +13,7 @@ main(int argc, char *argv[])
13 (void) argv; 13 (void) argv;
14 efl_object_init(); 14 efl_object_init();
15 15
16 Eo *obj = efl_add(INHERIT_CLASS, NULL); 16 Eo *obj = efl_add_ref(INHERIT_CLASS, NULL);
17 17
18 simple_a_set(obj, 1); 18 simple_a_set(obj, 1);
19 inherit_prot_print(obj); 19 inherit_prot_print(obj);
diff --git a/src/tests/eo/children/children_main.c b/src/tests/eo/children/children_main.c
index e9292f2..1af58f5 100644
--- a/src/tests/eo/children/children_main.c
+++ b/src/tests/eo/children/children_main.c
@@ -22,7 +22,7 @@ main(int argc, char *argv[])
22 22
23 efl_object_init(); 23 efl_object_init();
24 24
25 Eo *parent = efl_add(SIMPLE_CLASS, NULL); 25 Eo *parent = efl_add_ref(SIMPLE_CLASS, NULL);
26 26
27 Eo *child1 = efl_add(SIMPLE_CLASS, parent); 27 Eo *child1 = efl_add(SIMPLE_CLASS, parent);
28 Eo *child2 = efl_add(SIMPLE_CLASS, parent); 28 Eo *child2 = efl_add(SIMPLE_CLASS, parent);
diff --git a/src/tests/eo/composite_objects/composite_objects_main.c b/src/tests/eo/composite_objects/composite_objects_main.c
index 438492e..4536af1 100644
--- a/src/tests/eo/composite_objects/composite_objects_main.c
+++ b/src/tests/eo/composite_objects/composite_objects_main.c
@@ -26,7 +26,7 @@ main(int argc, char *argv[])
26 (void) argv; 26 (void) argv;
27 efl_object_init(); 27 efl_object_init();
28 28
29 Eo *obj = efl_add(COMP_CLASS, NULL); 29 Eo *obj = efl_add_ref(COMP_CLASS, NULL);
30 efl_event_callback_add(obj, EV_A_CHANGED, _a_changed_cb, NULL); 30 efl_event_callback_add(obj, EV_A_CHANGED, _a_changed_cb, NULL);
31 31
32 fail_if(!efl_isa(obj, COMP_CLASS)); 32 fail_if(!efl_isa(obj, COMP_CLASS));
diff --git a/src/tests/eo/constructors/constructors_main.c b/src/tests/eo/constructors/constructors_main.c
index e3b0b93..e13e4fd 100644
--- a/src/tests/eo/constructors/constructors_main.c
+++ b/src/tests/eo/constructors/constructors_main.c
@@ -24,7 +24,7 @@ main(int argc, char *argv[])
24 (void) argv; 24 (void) argv;
25 efl_object_init(); 25 efl_object_init();
26 26
27 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 27 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
28 28
29 fail_if(my_init_count != 2); 29 fail_if(my_init_count != 2);
30 30
@@ -42,14 +42,14 @@ main(int argc, char *argv[])
42 42
43 fail_if(my_init_count != 0); 43 fail_if(my_init_count != 0);
44 44
45 obj = efl_add(SIMPLE2_CLASS, NULL); 45 obj = efl_add_ref(SIMPLE2_CLASS, NULL);
46 fail_if(obj); 46 fail_if(obj);
47 47
48 obj = efl_add(SIMPLE3_CLASS, NULL); 48 obj = efl_add_ref(SIMPLE3_CLASS, NULL);
49 fail_if(obj); 49 fail_if(obj);
50 50
51 my_init_count = 0; 51 my_init_count = 0;
52 obj = efl_add(SIMPLE4_CLASS, NULL); 52 obj = efl_add_ref(SIMPLE4_CLASS, NULL);
53 53
54 fail_if(my_init_count != 2); 54 fail_if(my_init_count != 2);
55 55
@@ -57,33 +57,33 @@ main(int argc, char *argv[])
57 57
58 fail_if(my_init_count != 0); 58 fail_if(my_init_count != 0);
59 59
60 obj = efl_add(SIMPLE5_CLASS, NULL); 60 obj = efl_add_ref(SIMPLE5_CLASS, NULL);
61 fail_if(!obj); 61 fail_if(!obj);
62 efl_unref(obj); 62 efl_unref(obj);
63 63
64 obj = efl_add(SIMPLE6_CLASS, NULL); 64 obj = efl_add_ref(SIMPLE6_CLASS, NULL);
65 fail_if(!obj); 65 fail_if(!obj);
66 efl_unref(obj); 66 efl_unref(obj);
67 67
68 obj = efl_add(SIMPLE7_CLASS, NULL); 68 obj = efl_add_ref(SIMPLE7_CLASS, NULL);
69 fail_if(obj); 69 fail_if(obj);
70 70
71 my_init_count = 0; 71 my_init_count = 0;
72 obj = efl_add(SIMPLE_CLASS, NULL); 72 obj = efl_add_ref(SIMPLE_CLASS, NULL);
73 fail_if(!obj); 73 fail_if(!obj);
74 fail_if(my_init_count != 2); 74 fail_if(my_init_count != 2);
75 a = simple_a_get(obj); 75 a = simple_a_get(obj);
76 fail_if(a != 0); 76 fail_if(a != 0);
77 77
78 my_init_count = 0; 78 my_init_count = 0;
79 obj = efl_add(SIMPLE_CLASS, NULL, simple_a_set(efl_added, 7)); 79 obj = efl_add_ref(SIMPLE_CLASS, NULL, simple_a_set(efl_added, 7));
80 fail_if(!obj); 80 fail_if(!obj);
81 fail_if(my_init_count != 2); 81 fail_if(my_init_count != 2);
82 a = simple_a_get(obj); 82 a = simple_a_get(obj);
83 fail_if(a != 7); 83 fail_if(a != 7);
84 84
85 my_init_count = 0; 85 my_init_count = 0;
86 obj = efl_add(SIMPLE_CLASS, NULL, simple_b_set(efl_added, 6), simple_a_set(efl_added, -1), b = simple_b_get(efl_added)); 86 obj = efl_add_ref(SIMPLE_CLASS, NULL, simple_b_set(efl_added, 6), simple_a_set(efl_added, -1), b = simple_b_get(efl_added));
87 fail_if(obj); 87 fail_if(obj);
88 fail_if(b != 6); 88 fail_if(b != 6);
89 fail_if(my_init_count != 0); 89 fail_if(my_init_count != 0);
diff --git a/src/tests/eo/function_overrides/function_overrides_main.c b/src/tests/eo/function_overrides/function_overrides_main.c
index 091af5e..5828b1a 100644
--- a/src/tests/eo/function_overrides/function_overrides_main.c
+++ b/src/tests/eo/function_overrides/function_overrides_main.c
@@ -18,7 +18,7 @@ main(int argc, char *argv[])
18 efl_object_init(); 18 efl_object_init();
19 19
20 Eina_Bool called = EINA_FALSE; 20 Eina_Bool called = EINA_FALSE;
21 Eo *obj = efl_add(INHERIT2_CLASS, NULL); 21 Eo *obj = efl_add_ref(INHERIT2_CLASS, NULL);
22 22
23 simple_a_set(obj, 1); 23 simple_a_set(obj, 1);
24 Simple_Public_Data *pd = efl_data_scope_get(obj, SIMPLE_CLASS); 24 Simple_Public_Data *pd = efl_data_scope_get(obj, SIMPLE_CLASS);
@@ -26,7 +26,7 @@ main(int argc, char *argv[])
26 26
27 efl_unref(obj); 27 efl_unref(obj);
28 28
29 obj = efl_add(INHERIT3_CLASS, NULL); 29 obj = efl_add_ref(INHERIT3_CLASS, NULL);
30 30
31 simple_a_set(obj, 1); 31 simple_a_set(obj, 1);
32 pd = efl_data_scope_get(obj, SIMPLE_CLASS); 32 pd = efl_data_scope_get(obj, SIMPLE_CLASS);
@@ -34,7 +34,7 @@ main(int argc, char *argv[])
34 34
35 efl_unref(obj); 35 efl_unref(obj);
36 36
37 obj = efl_add(INHERIT2_CLASS, NULL); 37 obj = efl_add_ref(INHERIT2_CLASS, NULL);
38 called = inherit2_print(obj); 38 called = inherit2_print(obj);
39 fail_if(!called); 39 fail_if(!called);
40 called = inherit2_print(obj); 40 called = inherit2_print(obj);
@@ -42,7 +42,7 @@ main(int argc, char *argv[])
42 fail_if(!called); 42 fail_if(!called);
43 efl_unref(obj); 43 efl_unref(obj);
44 44
45 obj = efl_add(SIMPLE_CLASS, NULL); 45 obj = efl_add_ref(SIMPLE_CLASS, NULL);
46 called = inherit2_print(obj); 46 called = inherit2_print(obj);
47 fail_if(called); 47 fail_if(called);
48 48
diff --git a/src/tests/eo/interface/interface_main.c b/src/tests/eo/interface/interface_main.c
index 8f07bb2..53142cf 100644
--- a/src/tests/eo/interface/interface_main.c
+++ b/src/tests/eo/interface/interface_main.c
@@ -16,7 +16,7 @@ main(int argc, char *argv[])
16 (void) argv; 16 (void) argv;
17 efl_object_init(); 17 efl_object_init();
18 18
19 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 19 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
20 20
21 simple_a_set(obj, 1); 21 simple_a_set(obj, 1);
22 simple_b_set(obj, 2); 22 simple_b_set(obj, 2);
diff --git a/src/tests/eo/mixin/mixin_main.c b/src/tests/eo/mixin/mixin_main.c
index f3534cc..2ef7b36 100644
--- a/src/tests/eo/mixin/mixin_main.c
+++ b/src/tests/eo/mixin/mixin_main.c
@@ -18,7 +18,7 @@ main(int argc, char *argv[])
18 (void) argv; 18 (void) argv;
19 efl_object_init(); 19 efl_object_init();
20 20
21 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 21 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
22 22
23 simple_a_set(obj, 1); 23 simple_a_set(obj, 1);
24 simple_b_set(obj, 2); 24 simple_b_set(obj, 2);
@@ -40,7 +40,7 @@ main(int argc, char *argv[])
40 40
41 efl_unref(obj); 41 efl_unref(obj);
42 42
43 obj = efl_add(INHERIT_CLASS, NULL); 43 obj = efl_add_ref(INHERIT_CLASS, NULL);
44 simple_a_set(obj, 5); 44 simple_a_set(obj, 5);
45 a = simple_a_get(obj); 45 a = simple_a_get(obj);
46 printf("%d\n", a); 46 printf("%d\n", a);
diff --git a/src/tests/eo/signals/signals_main.c b/src/tests/eo/signals/signals_main.c
index 51fca1f..3639ff1 100644
--- a/src/tests/eo/signals/signals_main.c
+++ b/src/tests/eo/signals/signals_main.c
@@ -65,7 +65,7 @@ main(int argc, char *argv[])
65 (void) argv; 65 (void) argv;
66 efl_object_init(); 66 efl_object_init();
67 67
68 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 68 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
69 Simple_Public_Data *pd = efl_data_scope_get(obj, SIMPLE_CLASS); 69 Simple_Public_Data *pd = efl_data_scope_get(obj, SIMPLE_CLASS);
70 70
71 /* The order of these two is undetermined. */ 71 /* The order of these two is undetermined. */
diff --git a/src/tests/eo/suite/eo_test_class_singleton.c b/src/tests/eo/suite/eo_test_class_singleton.c
index e5db1ff..a38a52b 100644
--- a/src/tests/eo/suite/eo_test_class_singleton.c
+++ b/src/tests/eo/suite/eo_test_class_singleton.c
@@ -15,7 +15,7 @@ _singleton_efl_constructor(Eo *eo_obj EINA_UNUSED, void *_pd EINA_UNUSED)
15{ 15{
16 if (!singleton_obj) 16 if (!singleton_obj)
17 { 17 {
18 singleton_obj = efl_add(SIMPLE_CLASS, NULL); 18 singleton_obj = efl_add_ref(SIMPLE_CLASS, NULL);
19 } 19 }
20 else 20 else
21 { 21 {
diff --git a/src/tests/eo/suite/eo_test_domain.c b/src/tests/eo/suite/eo_test_domain.c
index 45a1fe3..e864631 100644
--- a/src/tests/eo/suite/eo_test_domain.c
+++ b/src/tests/eo/suite/eo_test_domain.c
@@ -32,7 +32,7 @@ _a_get(Eo *obj EINA_UNUSED, void *class_data)
32 return pd->a; 32 return pd->a;
33} 33}
34 34
35//return obj = efl_add(DOMAIN_CLASS, NULL); 35//return obj = efl_add_ref(DOMAIN_CLASS, NULL);
36 36
37EFL_VOID_FUNC_BODYV(domain_recursive, EFL_FUNC_CALL(n), int n); 37EFL_VOID_FUNC_BODYV(domain_recursive, EFL_FUNC_CALL(n), int n);
38 38
diff --git a/src/tests/eo/suite/eo_test_event.c b/src/tests/eo/suite/eo_test_event.c
index 66902db..43420e3 100644
--- a/src/tests/eo/suite/eo_test_event.c
+++ b/src/tests/eo/suite/eo_test_event.c
@@ -63,7 +63,7 @@ START_TEST(eo_event)
63 efl_object_init(); 63 efl_object_init();
64 Eo *obj; 64 Eo *obj;
65 65
66 obj = efl_add(efl_test_event_class_get(), NULL); 66 obj = efl_add_ref(efl_test_event_class_get(), NULL);
67 efl_event_callback_priority_add(obj, EFL_TEST_EVENT_EVENT_TESTER, EFL_CALLBACK_PRIORITY_BEFORE, _cb2, &data); 67 efl_event_callback_priority_add(obj, EFL_TEST_EVENT_EVENT_TESTER, EFL_CALLBACK_PRIORITY_BEFORE, _cb2, &data);
68 efl_event_callback_priority_add(obj, EFL_TEST_EVENT_EVENT_TESTER, EFL_CALLBACK_PRIORITY_BEFORE, _cb1, &data); 68 efl_event_callback_priority_add(obj, EFL_TEST_EVENT_EVENT_TESTER, EFL_CALLBACK_PRIORITY_BEFORE, _cb1, &data);
69 69
@@ -123,7 +123,7 @@ START_TEST(eo_event_call_in_call)
123 efl_object_init(); 123 efl_object_init();
124 Eo *obj; 124 Eo *obj;
125 125
126 obj = efl_add(efl_test_event_class_get(), NULL); 126 obj = efl_add_ref(efl_test_event_class_get(), NULL);
127 efl_event_callback_priority_add(obj, EFL_TEST_EVENT_EVENT_TESTER, EFL_CALLBACK_PRIORITY_BEFORE, _cb_rec_1, &data); 127 efl_event_callback_priority_add(obj, EFL_TEST_EVENT_EVENT_TESTER, EFL_CALLBACK_PRIORITY_BEFORE, _cb_rec_1, &data);
128 128
129 memset(&data, 0, sizeof(Test_Data)); 129 memset(&data, 0, sizeof(Test_Data));
@@ -179,7 +179,7 @@ START_TEST(eo_event_generation_bug)
179 179
180 Eo *obj; 180 Eo *obj;
181 181
182 obj = efl_add(efl_test_event_class_get(), NULL); 182 obj = efl_add_ref(efl_test_event_class_get(), NULL);
183 emitted = 0; 183 emitted = 0;
184 efl_event_callback_priority_add(obj, EFL_TEST_EVENT_EVENT_TESTER, EFL_CALLBACK_PRIORITY_BEFORE, _generation_clamp_step1, NULL); 184 efl_event_callback_priority_add(obj, EFL_TEST_EVENT_EVENT_TESTER, EFL_CALLBACK_PRIORITY_BEFORE, _generation_clamp_step1, NULL);
185 efl_event_callback_priority_add(obj, EFL_TEST_EVENT_EVENT_TESTER_SUBSCRIBE, EFL_CALLBACK_PRIORITY_BEFORE, _generation_clamp_subscribe, NULL); 185 efl_event_callback_priority_add(obj, EFL_TEST_EVENT_EVENT_TESTER_SUBSCRIBE, EFL_CALLBACK_PRIORITY_BEFORE, _generation_clamp_subscribe, NULL);
diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c
index c6bf035..169db5b 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -22,10 +22,10 @@
22START_TEST(eo_simple) 22START_TEST(eo_simple)
23{ 23{
24 efl_object_init(); 24 efl_object_init();
25 Eo *obj = efl_add(EO_CLASS, NULL); 25 Eo *obj = efl_add_ref(EO_CLASS, NULL);
26 fail_if(obj); 26 fail_if(obj);
27 27
28 obj = efl_add(SIMPLE_CLASS, NULL); 28 obj = efl_add_ref(SIMPLE_CLASS, NULL);
29 fail_if(!obj); 29 fail_if(!obj);
30 efl_constructor(obj); 30 efl_constructor(obj);
31 efl_destructor(obj); 31 efl_destructor(obj);
@@ -39,10 +39,10 @@ START_TEST(eo_singleton)
39{ 39{
40 efl_object_init(); 40 efl_object_init();
41 41
42 Eo *obj = efl_add(SINGLETON_CLASS, NULL); 42 Eo *obj = efl_add_ref(SINGLETON_CLASS, NULL);
43 fail_if(!obj); 43 fail_if(!obj);
44 44
45 Eo *obj2 = efl_add(SINGLETON_CLASS, NULL); 45 Eo *obj2 = efl_add_ref(SINGLETON_CLASS, NULL);
46 fail_if(!obj2); 46 fail_if(!obj2);
47 47
48 ck_assert_ptr_eq(obj, obj2); 48 ck_assert_ptr_eq(obj, obj2);
@@ -72,7 +72,7 @@ START_TEST(efl_object_override_tests)
72{ 72{
73 efl_object_init(); 73 efl_object_init();
74 74
75 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 75 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
76 fail_if(!obj); 76 fail_if(!obj);
77 77
78 /* First get the value before the override to make sure it works and to 78 /* First get the value before the override to make sure it works and to
@@ -201,7 +201,7 @@ START_TEST(eo_signals)
201{ 201{
202 efl_object_init(); 202 efl_object_init();
203 203
204 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 204 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
205 Eina_Bool r; 205 Eina_Bool r;
206 206
207 efl_event_callback_add(obj, EFL_EVENT_CALLBACK_ADD, _eo_signals_cb_added_deled, &_eo_signals_callbacks); 207 efl_event_callback_add(obj, EFL_EVENT_CALLBACK_ADD, _eo_signals_cb_added_deled, &_eo_signals_callbacks);
@@ -231,7 +231,7 @@ START_TEST(eo_signals)
231 231
232 efl_unref(obj); 232 efl_unref(obj);
233 233
234 obj = efl_add(SIMPLE_CLASS, NULL); 234 obj = efl_add_ref(SIMPLE_CLASS, NULL);
235 /* Legacy support signals. */ 235 /* Legacy support signals. */
236 { 236 {
237 const Efl_Event_Description *a_desc = efl_object_legacy_only_event_description_get("a,changed"); 237 const Efl_Event_Description *a_desc = efl_object_legacy_only_event_description_get("a,changed");
@@ -302,7 +302,7 @@ START_TEST(efl_data_fetch)
302 const Efl_Class *klass = efl_class_new(&class_desc, EO_CLASS, NULL); 302 const Efl_Class *klass = efl_class_new(&class_desc, EO_CLASS, NULL);
303 fail_if(!klass); 303 fail_if(!klass);
304 304
305 Eo *obj = efl_add(klass, NULL); 305 Eo *obj = efl_add_ref(klass, NULL);
306 fail_if(!obj); 306 fail_if(!obj);
307#ifdef EO_DEBUG 307#ifdef EO_DEBUG
308 fail_if(efl_data_scope_get(obj, SIMPLE_CLASS)); 308 fail_if(efl_data_scope_get(obj, SIMPLE_CLASS));
@@ -313,7 +313,7 @@ START_TEST(efl_data_fetch)
313 klass = efl_class_new(&class_desc, EO_CLASS, NULL); 313 klass = efl_class_new(&class_desc, EO_CLASS, NULL);
314 fail_if(!klass); 314 fail_if(!klass);
315 315
316 obj = efl_add(klass, NULL); 316 obj = efl_add_ref(klass, NULL);
317 fail_if(!obj); 317 fail_if(!obj);
318 fail_if(efl_data_scope_get(obj, klass)); 318 fail_if(efl_data_scope_get(obj, klass));
319 fail_if(!efl_data_scope_get(obj, EFL_OBJECT_CLASS)); 319 fail_if(!efl_data_scope_get(obj, EFL_OBJECT_CLASS));
@@ -327,11 +327,11 @@ START_TEST(efl_data_safe_fetch)
327{ 327{
328 efl_object_init(); 328 efl_object_init();
329 329
330 Eo *obj = efl_add(SIMPLE2_CLASS, NULL); 330 Eo *obj = efl_add_ref(SIMPLE2_CLASS, NULL);
331 fail_if(!obj || !efl_data_scope_safe_get(obj, SIMPLE2_CLASS)); 331 fail_if(!obj || !efl_data_scope_safe_get(obj, SIMPLE2_CLASS));
332 efl_unref(obj); 332 efl_unref(obj);
333 333
334 obj = efl_add(SIMPLE3_CLASS, NULL); 334 obj = efl_add_ref(SIMPLE3_CLASS, NULL);
335 fail_if(!obj); 335 fail_if(!obj);
336 fail_if(!efl_isa(obj, SIMPLE_CLASS)); 336 fail_if(!efl_isa(obj, SIMPLE_CLASS));
337 fail_if(!efl_isa(obj, SIMPLE2_CLASS)); 337 fail_if(!efl_isa(obj, SIMPLE2_CLASS));
@@ -401,7 +401,7 @@ START_TEST(efl_isa_tests)
401 fail_if(!klass); 401 fail_if(!klass);
402 } 402 }
403 403
404 Eo *obj = efl_add(klass, NULL); 404 Eo *obj = efl_add_ref(klass, NULL);
405 fail_if(!obj); 405 fail_if(!obj);
406 fail_if(efl_isa(obj, SIMPLE_CLASS)); 406 fail_if(efl_isa(obj, SIMPLE_CLASS));
407 fail_if(!efl_isa(obj, iface)); 407 fail_if(!efl_isa(obj, iface));
@@ -410,7 +410,7 @@ START_TEST(efl_isa_tests)
410 fail_if(!efl_isa(obj, EO_CLASS)); 410 fail_if(!efl_isa(obj, EO_CLASS));
411 efl_unref(obj); 411 efl_unref(obj);
412 412
413 obj = efl_add(SIMPLE_CLASS, NULL); 413 obj = efl_add_ref(SIMPLE_CLASS, NULL);
414 fail_if(!obj); 414 fail_if(!obj);
415 fail_if(efl_isa(obj, klass)); 415 fail_if(efl_isa(obj, klass));
416 fail_if(efl_isa(obj, iface)); 416 fail_if(efl_isa(obj, iface));
@@ -428,11 +428,11 @@ START_TEST(efl_composite_tests)
428{ 428{
429 efl_object_init(); 429 efl_object_init();
430 430
431 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 431 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
432 fail_if(!obj); 432 fail_if(!obj);
433 Eo *obj2 = efl_add(SIMPLE_CLASS, NULL); 433 Eo *obj2 = efl_add_ref(SIMPLE_CLASS, NULL);
434 fail_if(!obj2); 434 fail_if(!obj2);
435 Eo *obj3 = efl_add(SIMPLE_CLASS, NULL); 435 Eo *obj3 = efl_add_ref(SIMPLE_CLASS, NULL);
436 fail_if(!obj3); 436 fail_if(!obj3);
437 437
438 efl_composite_attach(obj, obj2); 438 efl_composite_attach(obj, obj2);
@@ -443,11 +443,11 @@ START_TEST(efl_composite_tests)
443 fail_if(!efl_composite_part_is(obj2)); 443 fail_if(!efl_composite_part_is(obj2));
444 444
445 /* Check that a deletion of a child detaches from the parent. */ 445 /* Check that a deletion of a child detaches from the parent. */
446 efl_del(obj2); 446 efl_unref(obj2);
447 fail_if(!efl_composite_attach(obj3, obj)); 447 fail_if(!efl_composite_attach(obj3, obj));
448 448
449 /* Check that a deletion of the parent detaches the child. */ 449 /* Check that a deletion of the parent detaches the child. */
450 efl_del(obj3); 450 efl_unref(obj3);
451 fail_if(efl_composite_part_is(obj)); 451 fail_if(efl_composite_part_is(obj));
452 452
453 efl_unref(obj); 453 efl_unref(obj);
@@ -506,11 +506,11 @@ START_TEST(eo_man_free)
506 fail_if(!klass); 506 fail_if(!klass);
507 cur_klass = klass; 507 cur_klass = klass;
508 508
509 Eo *obj = efl_add(klass, NULL); 509 Eo *obj = efl_add_ref(klass, NULL);
510 fail_if(!obj); 510 fail_if(!obj);
511 efl_unref(obj); 511 efl_unref(obj);
512 512
513 obj = efl_add(klass, NULL); 513 obj = efl_add_ref(klass, NULL);
514 fail_if(!obj); 514 fail_if(!obj);
515 fail_if(efl_manual_free(obj)); 515 fail_if(efl_manual_free(obj));
516 efl_unref(obj); 516 efl_unref(obj);
@@ -520,7 +520,7 @@ START_TEST(eo_man_free)
520 cur_klass = klass; 520 cur_klass = klass;
521 fail_if(!klass); 521 fail_if(!klass);
522 522
523 obj = efl_add(klass, NULL); 523 obj = efl_add_ref(klass, NULL);
524 fail_if(!obj); 524 fail_if(!obj);
525 fail_if(efl_manual_free(obj)); 525 fail_if(efl_manual_free(obj));
526 fail_if(efl_destructed_is(obj)); 526 fail_if(efl_destructed_is(obj));
@@ -528,7 +528,7 @@ START_TEST(eo_man_free)
528 fail_if(!efl_destructed_is(obj)); 528 fail_if(!efl_destructed_is(obj));
529 fail_if(!efl_manual_free(obj)); 529 fail_if(!efl_manual_free(obj));
530 530
531 obj = efl_add(klass, NULL); 531 obj = efl_add_ref(klass, NULL);
532 fail_if(!obj); 532 fail_if(!obj);
533 efl_unref(obj); 533 efl_unref(obj);
534 fail_if(!efl_destructed_is(obj)); 534 fail_if(!efl_destructed_is(obj));
@@ -539,12 +539,12 @@ START_TEST(eo_man_free)
539 cur_klass = klass; 539 cur_klass = klass;
540 fail_if(!klass); 540 fail_if(!klass);
541 541
542 obj = efl_add(klass, NULL); 542 obj = efl_add_ref(klass, NULL);
543 fail_if(!obj); 543 fail_if(!obj);
544 fail_if(efl_manual_free(obj)); 544 fail_if(efl_manual_free(obj));
545 efl_unref(obj); 545 efl_unref(obj);
546 546
547 obj = efl_add(klass, NULL); 547 obj = efl_add_ref(klass, NULL);
548 fail_if(!obj); 548 fail_if(!obj);
549 efl_manual_free_set(obj, EINA_TRUE); 549 efl_manual_free_set(obj, EINA_TRUE);
550 efl_unref(obj); 550 efl_unref(obj);
@@ -553,7 +553,7 @@ START_TEST(eo_man_free)
553 efl_unref(obj); 553 efl_unref(obj);
554 fail_if(!efl_manual_free(obj)); 554 fail_if(!efl_manual_free(obj));
555 555
556 obj = efl_add(klass, NULL); 556 obj = efl_add_ref(klass, NULL);
557 fail_if(!obj); 557 fail_if(!obj);
558 efl_manual_free_set(obj, EINA_TRUE); 558 efl_manual_free_set(obj, EINA_TRUE);
559 efl_unref(obj); 559 efl_unref(obj);
@@ -571,9 +571,9 @@ END_TEST
571START_TEST(efl_refs) 571START_TEST(efl_refs)
572{ 572{
573 efl_object_init(); 573 efl_object_init();
574 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 574 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
575 Eo *obj2 = efl_add(SIMPLE_CLASS, NULL); 575 Eo *obj2 = efl_add_ref(SIMPLE_CLASS, NULL);
576 Eo *obj3 = efl_add(SIMPLE_CLASS, NULL); 576 Eo *obj3 = efl_add_ref(SIMPLE_CLASS, NULL);
577 577
578 efl_xref(obj, obj2); 578 efl_xref(obj, obj2);
579 fail_if(efl_ref_count(obj) != 2); 579 fail_if(efl_ref_count(obj) != 2);
@@ -608,7 +608,7 @@ START_TEST(efl_refs)
608 efl_unref(obj3); 608 efl_unref(obj3);
609 609
610 /* Check hierarchy */ 610 /* Check hierarchy */
611 obj = efl_add(SIMPLE_CLASS, NULL); 611 obj = efl_add_ref(SIMPLE_CLASS, NULL);
612 obj2 = efl_ref(efl_add(SIMPLE_CLASS, obj)); 612 obj2 = efl_ref(efl_add(SIMPLE_CLASS, obj));
613 613
614 Eo *wref = NULL; 614 Eo *wref = NULL;
@@ -624,7 +624,7 @@ START_TEST(efl_refs)
624 fail_if(wref); 624 fail_if(wref);
625 625
626 /* efl_add_ref and normal efl_add */ 626 /* efl_add_ref and normal efl_add */
627 obj = efl_add(SIMPLE_CLASS, NULL); 627 obj = efl_add_ref(SIMPLE_CLASS, NULL);
628 obj2 = efl_add(SIMPLE_CLASS, obj); 628 obj2 = efl_add(SIMPLE_CLASS, obj);
629 obj3 = efl_add_ref(SIMPLE_CLASS, obj); 629 obj3 = efl_add_ref(SIMPLE_CLASS, obj);
630 630
@@ -632,15 +632,15 @@ START_TEST(efl_refs)
632 ck_assert_int_eq(efl_ref_count(obj2), 1); 632 ck_assert_int_eq(efl_ref_count(obj2), 1);
633 ck_assert_int_eq(efl_ref_count(obj3), 2); 633 ck_assert_int_eq(efl_ref_count(obj3), 2);
634 634
635 efl_del(obj); 635 efl_unref(obj);
636 efl_del(obj2); 636 efl_del(obj2);
637 efl_unref(obj3); 637 efl_unref(obj3);
638 efl_del(obj3); 638 efl_del(obj3);
639 639
640 /* Setting and removing parents. */ 640 /* Setting and removing parents. */
641 obj = efl_add(SIMPLE_CLASS, NULL); 641 obj = efl_add_ref(SIMPLE_CLASS, NULL);
642 obj2 = efl_ref(efl_add(SIMPLE_CLASS, obj)); 642 obj2 = efl_ref(efl_add(SIMPLE_CLASS, obj));
643 obj3 = efl_ref(efl_add(SIMPLE_CLASS, NULL)); 643 obj3 = efl_add_ref(SIMPLE_CLASS, NULL);
644 644
645 efl_parent_set(obj2, obj3); 645 efl_parent_set(obj2, obj3);
646 efl_parent_set(obj3, obj); 646 efl_parent_set(obj3, obj);
@@ -655,12 +655,12 @@ START_TEST(efl_refs)
655 fail_if(!efl_invalidated_get(obj2)); 655 fail_if(!efl_invalidated_get(obj2));
656 fail_if(!efl_invalidated_get(obj3)); 656 fail_if(!efl_invalidated_get(obj3));
657 657
658 efl_del(obj); 658 efl_unref(obj);
659 efl_del(obj2); 659 efl_del(obj2);
660 efl_del(obj3); 660 efl_unref(obj3);
661 661
662 /* Setting and removing parents for add_ref */ 662 /* Setting and removing parents for add_ref */
663 obj = efl_add(SIMPLE_CLASS, NULL); 663 obj = efl_add_ref(SIMPLE_CLASS, NULL);
664 obj2 = efl_add_ref(SIMPLE_CLASS, obj); 664 obj2 = efl_add_ref(SIMPLE_CLASS, obj);
665 obj3 = efl_add_ref(SIMPLE_CLASS, NULL); 665 obj3 = efl_add_ref(SIMPLE_CLASS, NULL);
666 666
@@ -680,17 +680,17 @@ START_TEST(efl_refs)
680 fail_if(!efl_invalidated_get(obj2)); 680 fail_if(!efl_invalidated_get(obj2));
681 fail_if(!efl_invalidated_get(obj3)); 681 fail_if(!efl_invalidated_get(obj3));
682 682
683 efl_del(obj); 683 efl_unref(obj);
684 efl_del(obj2); 684 efl_del(obj2);
685 efl_del(obj3); 685 efl_unref(obj3);
686 686
687 /* Just check it doesn't seg atm. */ 687 /* Just check it doesn't seg atm. */
688 obj = efl_add(SIMPLE_CLASS, NULL); 688 obj = efl_add_ref(SIMPLE_CLASS, NULL);
689 efl_ref(obj); 689 efl_ref(obj);
690 efl_unref(obj); 690 efl_unref(obj);
691 efl_unref(obj); 691 efl_unref(obj);
692 692
693 obj = efl_add(SIMPLE_CLASS, NULL); 693 obj = efl_add_ref(SIMPLE_CLASS, NULL);
694 obj2 = efl_add(SIMPLE_CLASS, obj); 694 obj2 = efl_add(SIMPLE_CLASS, obj);
695 efl_unref(obj2); 695 efl_unref(obj2);
696 efl_ref(obj2); 696 efl_ref(obj2);
@@ -705,8 +705,8 @@ START_TEST(efl_weak_reference)
705{ 705{
706 efl_object_init(); 706 efl_object_init();
707 707
708 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 708 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
709 Eo *obj2 = efl_add(SIMPLE_CLASS, NULL); 709 Eo *obj2 = efl_add_ref(SIMPLE_CLASS, NULL);
710 Eo *wref = NULL, *wref2 = NULL, *wref3 = NULL; 710 Eo *wref = NULL, *wref2 = NULL, *wref3 = NULL;
711 efl_wref_add(obj, &wref); 711 efl_wref_add(obj, &wref);
712 fail_if(!wref); 712 fail_if(!wref);
@@ -714,7 +714,7 @@ START_TEST(efl_weak_reference)
714 efl_unref(obj); 714 efl_unref(obj);
715 fail_if(wref); 715 fail_if(wref);
716 716
717 obj = efl_add(SIMPLE_CLASS, NULL); 717 obj = efl_add_ref(SIMPLE_CLASS, NULL);
718 efl_wref_add(obj, &wref); 718 efl_wref_add(obj, &wref);
719 719
720 efl_ref(obj); 720 efl_ref(obj);
@@ -726,7 +726,7 @@ START_TEST(efl_weak_reference)
726 efl_unref(obj); 726 efl_unref(obj);
727 fail_if(wref); 727 fail_if(wref);
728 728
729 obj = efl_add(SIMPLE_CLASS, NULL); 729 obj = efl_add_ref(SIMPLE_CLASS, NULL);
730 730
731 efl_wref_add(obj, &wref); 731 efl_wref_add(obj, &wref);
732 efl_wref_del(obj, &wref); 732 efl_wref_del(obj, &wref);
@@ -775,9 +775,9 @@ END_TEST
775START_TEST(eo_generic_data) 775START_TEST(eo_generic_data)
776{ 776{
777 efl_object_init(); 777 efl_object_init();
778 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 778 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
779 Eo *obj2 = efl_add(SIMPLE_CLASS, NULL); 779 Eo *obj2 = efl_add_ref(SIMPLE_CLASS, NULL);
780 Eo *obj3 = efl_add(SIMPLE_CLASS, NULL); 780 Eo *obj3 = efl_add_ref(SIMPLE_CLASS, NULL);
781 Eo *objtmp; 781 Eo *objtmp;
782 void *data = NULL; 782 void *data = NULL;
783 Eina_Value *value; 783 Eina_Value *value;
@@ -857,10 +857,10 @@ START_TEST(eo_generic_data)
857 857
858 efl_key_ref_set(obj, "test1", obj2); 858 efl_key_ref_set(obj, "test1", obj2);
859 efl_key_ref_set(obj, "test2", obj3); 859 efl_key_ref_set(obj, "test2", obj3);
860 efl_del(obj2); 860 efl_unref(obj2);
861 efl_del(obj2); 861 efl_unref(obj2);
862 efl_del(obj3); 862 efl_unref(obj3);
863 efl_del(obj3); 863 efl_unref(obj3);
864 objtmp = efl_key_ref_get(obj, "test1"); 864 objtmp = efl_key_ref_get(obj, "test1");
865 fail_if(objtmp); 865 fail_if(objtmp);
866 866
@@ -869,8 +869,8 @@ START_TEST(eo_generic_data)
869 869
870 870
871 871
872 obj2 = efl_add(SIMPLE_CLASS, NULL); 872 obj2 = efl_add_ref(SIMPLE_CLASS, NULL);
873 obj3 = efl_add(SIMPLE_CLASS, NULL); 873 obj3 = efl_add_ref(SIMPLE_CLASS, NULL);
874 874
875 efl_key_wref_set(obj, "test1", obj2); 875 efl_key_wref_set(obj, "test1", obj2);
876 objtmp = efl_key_wref_get(obj, "test1"); 876 objtmp = efl_key_wref_get(obj, "test1");
@@ -912,8 +912,8 @@ START_TEST(eo_generic_data)
912 912
913 efl_key_wref_set(obj, "test1", obj2); 913 efl_key_wref_set(obj, "test1", obj2);
914 efl_key_wref_set(obj, "test2", obj3); 914 efl_key_wref_set(obj, "test2", obj3);
915 efl_del(obj2); 915 efl_unref(obj2);
916 efl_del(obj3); 916 efl_unref(obj3);
917 objtmp = efl_key_wref_get(obj, "test1"); 917 objtmp = efl_key_wref_get(obj, "test1");
918 fail_if(objtmp); 918 fail_if(objtmp);
919 919
@@ -967,7 +967,7 @@ START_TEST(eo_magic_checks)
967 obj = efl_add((Efl_Class *) buf, NULL); 967 obj = efl_add((Efl_Class *) buf, NULL);
968 fail_if(obj); 968 fail_if(obj);
969 969
970 obj = efl_add(SIMPLE_CLASS, NULL); 970 obj = efl_add_ref(SIMPLE_CLASS, NULL);
971 fail_if(!obj); 971 fail_if(!obj);
972 972
973 simple_a_set((Eo *) buf, ++i); 973 simple_a_set((Eo *) buf, ++i);
@@ -1077,12 +1077,12 @@ START_TEST(efl_func_resolve)
1077 const Efl_Class *klass = efl_class_new(&class_desc, SIMPLE_CLASS, NULL); 1077 const Efl_Class *klass = efl_class_new(&class_desc, SIMPLE_CLASS, NULL);
1078 fail_if(!klass); 1078 fail_if(!klass);
1079 1079
1080 Eo *obj = efl_add(klass, NULL); 1080 Eo *obj = efl_add_ref(klass, NULL);
1081 fail_if(!resolve_a_print(obj)); 1081 fail_if(!resolve_a_print(obj));
1082 efl_unref(obj); 1082 efl_unref(obj);
1083 1083
1084 1084
1085 obj = efl_add(SIMPLE_CLASS, NULL); 1085 obj = efl_add_ref(SIMPLE_CLASS, NULL);
1086 fail_if(!obj); 1086 fail_if(!obj);
1087 efl_manual_free_set(obj, EINA_TRUE); 1087 efl_manual_free_set(obj, EINA_TRUE);
1088 1088
@@ -1103,24 +1103,24 @@ START_TEST(efl_add_do_and_custom)
1103 Eo *obj = NULL; 1103 Eo *obj = NULL;
1104 efl_object_init(); 1104 efl_object_init();
1105 1105
1106 obj = efl_add(SIMPLE_CLASS, NULL, efl_constructor(efl_added)); 1106 obj = efl_add_ref(SIMPLE_CLASS, NULL, efl_constructor(efl_added));
1107 fail_if(!obj); 1107 fail_if(!obj);
1108 efl_unref(obj); 1108 efl_unref(obj);
1109 1109
1110 obj = efl_add(SIMPLE_CLASS, NULL, simple_a_set(efl_added, 7)); 1110 obj = efl_add_ref(SIMPLE_CLASS, NULL, simple_a_set(efl_added, 7));
1111 fail_if(!obj); 1111 fail_if(!obj);
1112 pd = efl_data_scope_get(obj, SIMPLE_CLASS); 1112 pd = efl_data_scope_get(obj, SIMPLE_CLASS);
1113 fail_if(pd->a != 7); 1113 fail_if(pd->a != 7);
1114 efl_unref(obj); 1114 efl_unref(obj);
1115 1115
1116 obj = efl_add(SIMPLE_CLASS, NULL, efl_constructor(efl_added), simple_a_set(efl_added, 7)); 1116 obj = efl_add_ref(SIMPLE_CLASS, NULL, efl_constructor(efl_added), simple_a_set(efl_added, 7));
1117 fail_if(!obj); 1117 fail_if(!obj);
1118 pd = efl_data_scope_get(obj, SIMPLE_CLASS); 1118 pd = efl_data_scope_get(obj, SIMPLE_CLASS);
1119 fail_if(pd->a != 7); 1119 fail_if(pd->a != 7);
1120 efl_unref(obj); 1120 efl_unref(obj);
1121 1121
1122 Eina_Bool finalized; 1122 Eina_Bool finalized;
1123 obj = efl_add(SIMPLE_CLASS, NULL, finalized = efl_finalized_get(efl_added)); 1123 obj = efl_add_ref(SIMPLE_CLASS, NULL, finalized = efl_finalized_get(efl_added));
1124 fail_if(finalized); 1124 fail_if(finalized);
1125 1125
1126 finalized = efl_finalized_get(obj); 1126 finalized = efl_finalized_get(obj);
@@ -1150,7 +1150,7 @@ START_TEST(eo_pointers_indirection)
1150 fail_if(!klass); 1150 fail_if(!klass);
1151 1151
1152 /* Check simple id validity */ 1152 /* Check simple id validity */
1153 Eo *obj = efl_add(klass, NULL); 1153 Eo *obj = efl_add_ref(klass, NULL);
1154 fail_if(!obj); 1154 fail_if(!obj);
1155 fail_if(!efl_isa(obj, klass)); 1155 fail_if(!efl_isa(obj, klass));
1156 obj = (Eo *)((char *)(obj) + 1); 1156 obj = (Eo *)((char *)(obj) + 1);
@@ -1161,17 +1161,17 @@ START_TEST(eo_pointers_indirection)
1161 fail_if(efl_isa(obj, klass)); 1161 fail_if(efl_isa(obj, klass));
1162 1162
1163 /* Check id invalidity after deletion */ 1163 /* Check id invalidity after deletion */
1164 Eo *obj1 = efl_add(klass, NULL); 1164 Eo *obj1 = efl_add_ref(klass, NULL);
1165 fail_if(!obj1); 1165 fail_if(!obj1);
1166 efl_unref(obj1); 1166 efl_unref(obj1);
1167 Eo *obj2 = efl_add(klass, NULL); 1167 Eo *obj2 = efl_add_ref(klass, NULL);
1168 fail_if(!obj2); 1168 fail_if(!obj2);
1169 fail_if(!efl_isa(obj2, klass)); 1169 fail_if(!efl_isa(obj2, klass));
1170 fail_if(efl_isa(obj1, klass)); 1170 fail_if(efl_isa(obj1, klass));
1171 efl_unref(obj2); 1171 efl_unref(obj2);
1172 1172
1173 /* Check id sanity checks for "close enough" ids. */ 1173 /* Check id sanity checks for "close enough" ids. */
1174 obj1 = efl_add(klass, NULL); 1174 obj1 = efl_add_ref(klass, NULL);
1175 fail_if(!obj1); 1175 fail_if(!obj1);
1176 obj2 = (Eo *) (((Eo_Id) obj1) & ~MASK_OBJ_TAG); 1176 obj2 = (Eo *) (((Eo_Id) obj1) & ~MASK_OBJ_TAG);
1177 fail_if(efl_class_get(obj2)); 1177 fail_if(efl_class_get(obj2));
@@ -1184,7 +1184,7 @@ START_TEST(eo_pointers_indirection)
1184 /* Creation of the objects */ 1184 /* Creation of the objects */
1185 for ( obj_id = 0; obj_id < NB_OBJS; obj_id++) 1185 for ( obj_id = 0; obj_id < NB_OBJS; obj_id++)
1186 { 1186 {
1187 objs[obj_id] = efl_add(klass, NULL); 1187 objs[obj_id] = efl_add_ref(klass, NULL);
1188 if(!objs[obj_id]) 1188 if(!objs[obj_id])
1189 fail_if(!objs[obj_id]); 1189 fail_if(!objs[obj_id]);
1190 if(!efl_isa(objs[obj_id], klass)) 1190 if(!efl_isa(objs[obj_id], klass))
@@ -1200,7 +1200,7 @@ START_TEST(eo_pointers_indirection)
1200 /* Creation of the deleted objects */ 1200 /* Creation of the deleted objects */
1201 for ( obj_id = 0; obj_id < NB_OBJS; obj_id+=2000) 1201 for ( obj_id = 0; obj_id < NB_OBJS; obj_id+=2000)
1202 { 1202 {
1203 objs[obj_id] = efl_add(klass, NULL); 1203 objs[obj_id] = efl_add_ref(klass, NULL);
1204 if(!objs[obj_id]) 1204 if(!objs[obj_id])
1205 fail_if(!objs[obj_id]); 1205 fail_if(!objs[obj_id]);
1206 if(!efl_isa(objs[obj_id], klass)) 1206 if(!efl_isa(objs[obj_id], klass))
@@ -1251,7 +1251,7 @@ START_TEST(efl_add_failures)
1251 1251
1252 const Efl_Class *klass = efl_class_new(&class_desc, EO_CLASS, NULL); 1252 const Efl_Class *klass = efl_class_new(&class_desc, EO_CLASS, NULL);
1253 1253
1254 Eo *obj = efl_add(klass, NULL); 1254 Eo *obj = efl_add_ref(klass, NULL);
1255 1255
1256 fail_if(obj); 1256 fail_if(obj);
1257 1257
@@ -1297,7 +1297,7 @@ START_TEST(efl_del_intercept)
1297 1297
1298 /* Check unref interception */ 1298 /* Check unref interception */
1299 intercepted = EINA_FALSE; 1299 intercepted = EINA_FALSE;
1300 Eo *obj = efl_add(klass, NULL); 1300 Eo *obj = efl_add_ref(klass, NULL);
1301 fail_if(!obj); 1301 fail_if(!obj);
1302 fail_if(!efl_isa(obj, klass)); 1302 fail_if(!efl_isa(obj, klass));
1303 efl_del_intercept_set(obj, _del_intercept); 1303 efl_del_intercept_set(obj, _del_intercept);
@@ -1307,17 +1307,17 @@ START_TEST(efl_del_intercept)
1307 1307
1308 /* Check del interception */ 1308 /* Check del interception */
1309 intercepted = EINA_FALSE; 1309 intercepted = EINA_FALSE;
1310 obj = efl_add(klass, NULL); 1310 obj = efl_add_ref(klass, NULL);
1311 fail_if(!obj); 1311 fail_if(!obj);
1312 fail_if(!efl_isa(obj, klass)); 1312 fail_if(!efl_isa(obj, klass));
1313 efl_del_intercept_set(obj, _del_intercept); 1313 efl_del_intercept_set(obj, _del_intercept);
1314 efl_del(obj); 1314 efl_unref(obj);
1315 fail_if(!intercepted); 1315 fail_if(!intercepted);
1316 fail_if(efl_isa(obj, klass)); 1316 fail_if(efl_isa(obj, klass));
1317 1317
1318 /* Check reuse works as expected. */ 1318 /* Check reuse works as expected. */
1319 Eo *parent = efl_add(SIMPLE_CLASS, NULL); 1319 Eo *parent = efl_add_ref(SIMPLE_CLASS, NULL);
1320 obj = efl_add(klass, NULL); 1320 obj = efl_add_ref(klass, NULL);
1321 fail_if(!obj); 1321 fail_if(!obj);
1322 ck_assert_int_eq(efl_ref_count(obj), 1); 1322 ck_assert_int_eq(efl_ref_count(obj), 1);
1323 efl_parent_set(obj, parent); 1323 efl_parent_set(obj, parent);
@@ -1328,7 +1328,7 @@ START_TEST(efl_del_intercept)
1328 ck_assert_int_eq(efl_ref_count(obj), 1); 1328 ck_assert_int_eq(efl_ref_count(obj), 1);
1329 efl_parent_set(obj, parent); 1329 efl_parent_set(obj, parent);
1330 ck_assert_int_eq(efl_ref_count(obj), 1); 1330 ck_assert_int_eq(efl_ref_count(obj), 1);
1331 efl_del(obj); 1331 efl_unref(obj);
1332 1332
1333 efl_object_shutdown(); 1333 efl_object_shutdown();
1334#endif 1334#endif
@@ -1338,9 +1338,9 @@ END_TEST
1338START_TEST(efl_name) 1338START_TEST(efl_name)
1339{ 1339{
1340 efl_object_init(); 1340 efl_object_init();
1341 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 1341 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
1342 Eo *obj2 = efl_add(SIMPLE_CLASS, NULL); 1342 Eo *obj2 = efl_add_ref(SIMPLE_CLASS, NULL);
1343 Eo *obj3 = efl_add(SIMPLE_CLASS, NULL); 1343 Eo *obj3 = efl_add_ref(SIMPLE_CLASS, NULL);
1344 Eo *objtmp; 1344 Eo *objtmp;
1345 const char *id; 1345 const char *id;
1346 1346
@@ -1386,7 +1386,7 @@ START_TEST(efl_name)
1386 objtmp = efl_name_find(obj, "*mple:joe"); 1386 objtmp = efl_name_find(obj, "*mple:joe");
1387 fail_if(objtmp != obj2); 1387 fail_if(objtmp != obj2);
1388 1388
1389 efl_del(obj); 1389 efl_unref(obj);
1390 1390
1391 efl_object_shutdown(); 1391 efl_object_shutdown();
1392} 1392}
@@ -1395,7 +1395,7 @@ END_TEST
1395START_TEST(eo_comment) 1395START_TEST(eo_comment)
1396{ 1396{
1397 efl_object_init(); 1397 efl_object_init();
1398 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 1398 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
1399 const char *comment; 1399 const char *comment;
1400 1400
1401 comment = efl_comment_get(obj); 1401 comment = efl_comment_get(obj);
@@ -1416,7 +1416,7 @@ START_TEST(eo_comment)
1416 comment = efl_comment_get(obj); 1416 comment = efl_comment_get(obj);
1417 fail_if(NULL != comment); 1417 fail_if(NULL != comment);
1418 1418
1419 efl_del(obj); 1419 efl_unref(obj);
1420 1420
1421 efl_object_shutdown(); 1421 efl_object_shutdown();
1422} 1422}
@@ -1425,7 +1425,7 @@ END_TEST
1425START_TEST(eo_rec_interface) 1425START_TEST(eo_rec_interface)
1426{ 1426{
1427 efl_object_init(); 1427 efl_object_init();
1428 Eo *s = efl_add(SEARCHABLE_CLASS, NULL); 1428 Eo *s = efl_add_ref(SEARCHABLE_CLASS, NULL);
1429 Eo *obj = efl_add(SIMPLE_CLASS, s); 1429 Eo *obj = efl_add(SIMPLE_CLASS, s);
1430 Eo *obj2 = efl_add(SIMPLE_CLASS, obj); 1430 Eo *obj2 = efl_add(SIMPLE_CLASS, obj);
1431 Eo *objtmp; 1431 Eo *objtmp;
@@ -1455,7 +1455,7 @@ thr1(void *data, Eina_Thread t EINA_UNUSED)
1455 fail_if(efl_domain_switch(EFL_ID_DOMAIN_THREAD) != EINA_TRUE); 1455 fail_if(efl_domain_switch(EFL_ID_DOMAIN_THREAD) != EINA_TRUE);
1456 fail_if(efl_domain_get() != EFL_ID_DOMAIN_THREAD); 1456 fail_if(efl_domain_get() != EFL_ID_DOMAIN_THREAD);
1457 printf("ADD2\n"); 1457 printf("ADD2\n");
1458 Eo *obj = efl_add(DOMAIN_CLASS, NULL); 1458 Eo *obj = efl_add_ref(DOMAIN_CLASS, NULL);
1459 printf("ADD2 DONE = %p\n", obj); 1459 printf("ADD2 DONE = %p\n", obj);
1460 1460
1461 printf("VERIFY finalized_get()\n"); 1461 printf("VERIFY finalized_get()\n");
@@ -1463,16 +1463,16 @@ thr1(void *data, Eina_Thread t EINA_UNUSED)
1463 1463
1464 printf("VERIFY parent_set(invalid) -- WILL SHOW ERRORS\n"); 1464 printf("VERIFY parent_set(invalid) -- WILL SHOW ERRORS\n");
1465 efl_domain_current_push(EFL_ID_DOMAIN_SHARED); 1465 efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
1466 s1 = efl_add(DOMAIN_CLASS, NULL); 1466 s1 = efl_add_ref(DOMAIN_CLASS, NULL);
1467 efl_domain_current_pop(); 1467 efl_domain_current_pop();
1468 efl_del(s1); 1468 efl_unref(s1);
1469 efl_parent_set(d->objs, s1); 1469 efl_parent_set(d->objs, s1);
1470 printf("END OF ERRORS\n"); 1470 printf("END OF ERRORS\n");
1471 1471
1472 printf("VERIFY composite\n"); 1472 printf("VERIFY composite\n");
1473 efl_domain_current_push(EFL_ID_DOMAIN_SHARED); 1473 efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
1474 s1 = efl_add(SIMPLE_CLASS, NULL, simple_a_set(efl_added, 7)); 1474 s1 = efl_add_ref(SIMPLE_CLASS, NULL, simple_a_set(efl_added, 7));
1475 s2 = efl_add(SIMPLE_CLASS, NULL, simple_a_set(efl_added, 42)); 1475 s2 = efl_add_ref(SIMPLE_CLASS, NULL, simple_a_set(efl_added, 42));
1476 efl_domain_current_pop(); 1476 efl_domain_current_pop();
1477 1477
1478 efl_composite_attach(d->objs, s1); 1478 efl_composite_attach(d->objs, s1);
@@ -1480,9 +1480,9 @@ thr1(void *data, Eina_Thread t EINA_UNUSED)
1480 int i2 = simple_a_get(s1); 1480 int i2 = simple_a_get(s1);
1481 fail_if(i1 != i2); 1481 fail_if(i1 != i2);
1482 fail_if(efl_composite_attach(d->objs, s2)); 1482 fail_if(efl_composite_attach(d->objs, s2));
1483 efl_del(s1); 1483 efl_unref(s1);
1484 fail_if(!efl_composite_attach(d->objs, s2)); 1484 fail_if(!efl_composite_attach(d->objs, s2));
1485 efl_del(s2); 1485 efl_unref(s2);
1486 1486
1487 printf("SET ON LOCAL\n"); 1487 printf("SET ON LOCAL\n");
1488 domain_a_set(obj, 1234); 1488 domain_a_set(obj, 1234);
@@ -1517,7 +1517,7 @@ thr1(void *data, Eina_Thread t EINA_UNUSED)
1517 fail_if(efl_domain_data_return(dom) != EINA_TRUE); 1517 fail_if(efl_domain_data_return(dom) != EINA_TRUE);
1518 printf("RETURN DOMAIN DATA DONE\n"); 1518 printf("RETURN DOMAIN DATA DONE\n");
1519 1519
1520 efl_del(obj); 1520 efl_unref(obj);
1521 return NULL; 1521 return NULL;
1522} 1522}
1523 1523
@@ -1579,12 +1579,12 @@ START_TEST(eo_domain)
1579 fail_if(efl_domain_current_get() != EFL_ID_DOMAIN_MAIN); 1579 fail_if(efl_domain_current_get() != EFL_ID_DOMAIN_MAIN);
1580 1580
1581 printf("ADD1\n"); 1581 printf("ADD1\n");
1582 obj = efl_add(DOMAIN_CLASS, NULL); 1582 obj = efl_add_ref(DOMAIN_CLASS, NULL);
1583 printf("ADD1 DONE = %p\n", obj); 1583 printf("ADD1 DONE = %p\n", obj);
1584 1584
1585 efl_domain_current_push(EFL_ID_DOMAIN_SHARED); 1585 efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
1586 printf("ADDS\n"); 1586 printf("ADDS\n");
1587 objs = efl_add(DOMAIN_CLASS, NULL, domain_a_set(efl_added, 42)); 1587 objs = efl_add_ref(DOMAIN_CLASS, NULL, domain_a_set(efl_added, 42));
1588 printf("ADDS DONE = %p\n", objs); 1588 printf("ADDS DONE = %p\n", objs);
1589 efl_domain_current_pop(); 1589 efl_domain_current_pop();
1590 1590
@@ -1610,8 +1610,8 @@ START_TEST(eo_domain)
1610 printf("JOIN DONE\n"); 1610 printf("JOIN DONE\n");
1611 1611
1612 printf("DELETING OBJECTS\n"); 1612 printf("DELETING OBJECTS\n");
1613 efl_del(obj); 1613 efl_unref(obj);
1614 efl_del(objs); 1614 efl_unref(objs);
1615 1615
1616 efl_object_shutdown(); 1616 efl_object_shutdown();
1617 printf("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"); 1617 printf("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
@@ -1685,30 +1685,30 @@ START_TEST(efl_cast_test)
1685 Eo *obj; 1685 Eo *obj;
1686 1686
1687 // Testing normal calls 1687 // Testing normal calls
1688 obj = efl_add(SIMPLE_CLASS, NULL); 1688 obj = efl_add_ref(SIMPLE_CLASS, NULL);
1689 fail_if(!obj); 1689 fail_if(!obj);
1690 ck_assert_int_eq(inherit_value(obj), 0); 1690 ck_assert_int_eq(inherit_value(obj), 0);
1691 efl_unref(obj); 1691 efl_unref(obj);
1692 1692
1693 obj = efl_add(klass1, NULL); 1693 obj = efl_add_ref(klass1, NULL);
1694 fail_if(!obj); 1694 fail_if(!obj);
1695 ck_assert_int_eq(inherit_value(obj), 1); 1695 ck_assert_int_eq(inherit_value(obj), 1);
1696 efl_unref(obj); 1696 efl_unref(obj);
1697 1697
1698 obj = efl_add(klass2, NULL); 1698 obj = efl_add_ref(klass2, NULL);
1699 fail_if(!obj); 1699 fail_if(!obj);
1700 ck_assert_int_eq(inherit_value(obj), 2); 1700 ck_assert_int_eq(inherit_value(obj), 2);
1701 efl_unref(obj); 1701 efl_unref(obj);
1702 1702
1703 // Testing efl_super 1703 // Testing efl_super
1704 obj = efl_add(klass2, NULL); 1704 obj = efl_add_ref(klass2, NULL);
1705 fail_if(!obj); 1705 fail_if(!obj);
1706 ck_assert_int_eq(inherit_value(efl_super(obj, klass2)), 1); 1706 ck_assert_int_eq(inherit_value(efl_super(obj, klass2)), 1);
1707 ck_assert_int_eq(inherit_value(efl_super(obj, klass1)), 0); 1707 ck_assert_int_eq(inherit_value(efl_super(obj, klass1)), 0);
1708 efl_unref(obj); 1708 efl_unref(obj);
1709 1709
1710 // Testing efl_cast 1710 // Testing efl_cast
1711 obj = efl_add(klass2, NULL); 1711 obj = efl_add_ref(klass2, NULL);
1712 fail_if(!obj); 1712 fail_if(!obj);
1713 ck_assert_int_eq(inherit_value(efl_cast(obj, klass2)), 2); 1713 ck_assert_int_eq(inherit_value(efl_cast(obj, klass2)), 2);
1714 ck_assert_int_eq(inherit_value(efl_cast(obj, klass1)), 1); 1714 ck_assert_int_eq(inherit_value(efl_cast(obj, klass1)), 1);
@@ -1744,11 +1744,11 @@ START_TEST(efl_object_destruct_test)
1744 1744
1745 efl_object_init(); 1745 efl_object_init();
1746 1746
1747 obj = efl_add(SIMPLE_CLASS, NULL); 1747 obj = efl_add_ref(SIMPLE_CLASS, NULL);
1748 fail_if(efl_ref_count(obj) != 1); 1748 fail_if(efl_ref_count(obj) != 1);
1749 efl_event_callback_add(obj, EFL_EVENT_DEL, _destruct_test_del_cb, &var); 1749 efl_event_callback_add(obj, EFL_EVENT_DEL, _destruct_test_del_cb, &var);
1750 efl_event_callback_add(obj, EFL_EVENT_DESTRUCT, _destruct_test_destruct_cb, &var); 1750 efl_event_callback_add(obj, EFL_EVENT_DESTRUCT, _destruct_test_destruct_cb, &var);
1751 efl_del(obj); 1751 efl_unref(obj);
1752 1752
1753 // var should be 2 if del then destruct, 0 otherwise 1753 // var should be 2 if del then destruct, 0 otherwise
1754 ck_assert_int_eq(var, 2); 1754 ck_assert_int_eq(var, 2);
@@ -1772,7 +1772,7 @@ START_TEST(efl_object_auto_unref_test)
1772 1772
1773 // Test unref after valid call 1773 // Test unref after valid call
1774 _auto_unref_del = 0; 1774 _auto_unref_del = 0;
1775 obj = efl_add(SIMPLE_CLASS, NULL); 1775 obj = efl_add_ref(SIMPLE_CLASS, NULL);
1776 fail_if(efl_ref_count(obj) != 1); 1776 fail_if(efl_ref_count(obj) != 1);
1777 efl_event_callback_add(obj, EFL_EVENT_DEL, _auto_unref_del_cb, &_auto_unref_del); 1777 efl_event_callback_add(obj, EFL_EVENT_DEL, _auto_unref_del_cb, &_auto_unref_del);
1778 ___efl_auto_unref_set(obj, 1); 1778 ___efl_auto_unref_set(obj, 1);
@@ -1783,7 +1783,7 @@ START_TEST(efl_object_auto_unref_test)
1783 1783
1784 // Test unref after invalid call 1784 // Test unref after invalid call
1785 _auto_unref_del = 0; 1785 _auto_unref_del = 0;
1786 obj = efl_add(SIMPLE_CLASS, NULL); 1786 obj = efl_add_ref(SIMPLE_CLASS, NULL);
1787 fail_if(efl_ref_count(obj) != 1); 1787 fail_if(efl_ref_count(obj) != 1);
1788 efl_event_callback_add(obj, EFL_EVENT_DEL, _auto_unref_del_cb, &_auto_unref_del); 1788 efl_event_callback_add(obj, EFL_EVENT_DEL, _auto_unref_del_cb, &_auto_unref_del);
1789 ___efl_auto_unref_set(obj, 1); 1789 ___efl_auto_unref_set(obj, 1);
@@ -1794,7 +1794,7 @@ START_TEST(efl_object_auto_unref_test)
1794 1794
1795 // Same with a parent 1795 // Same with a parent
1796 _auto_unref_del = 0; 1796 _auto_unref_del = 0;
1797 parent = efl_add(SIMPLE_CLASS, NULL); 1797 parent = efl_add_ref(SIMPLE_CLASS, NULL);
1798 obj = efl_add(SIMPLE_CLASS, parent); 1798 obj = efl_add(SIMPLE_CLASS, parent);
1799 fail_if(efl_ref_count(obj) != 1); 1799 fail_if(efl_ref_count(obj) != 1);
1800 efl_allow_parent_unref_set(obj, 1); 1800 efl_allow_parent_unref_set(obj, 1);
@@ -1804,7 +1804,7 @@ START_TEST(efl_object_auto_unref_test)
1804 fail_if(efl_ref_count(obj) != 1); 1804 fail_if(efl_ref_count(obj) != 1);
1805 efl_name_set(obj, "name"); 1805 efl_name_set(obj, "name");
1806 fail_if(!_auto_unref_del); 1806 fail_if(!_auto_unref_del);
1807 efl_del(parent); 1807 efl_unref(parent);
1808 1808
1809 efl_object_shutdown(); 1809 efl_object_shutdown();
1810} 1810}
diff --git a/src/tests/eo/suite/eo_test_init.c b/src/tests/eo/suite/eo_test_init.c
index 1f82be4..a625847 100644
--- a/src/tests/eo/suite/eo_test_init.c
+++ b/src/tests/eo/suite/eo_test_init.c
@@ -24,7 +24,7 @@ START_TEST(eo_test_init_shutdown)
24 ck_assert_str_eq("Efl.Object", efl_class_name_get(EFL_OBJECT_CLASS)); 24 ck_assert_str_eq("Efl.Object", efl_class_name_get(EFL_OBJECT_CLASS));
25 25
26 /* XXX-1: Essential for the next test to assign the wrong op. */ 26 /* XXX-1: Essential for the next test to assign the wrong op. */
27 obj = efl_add(SIMPLE_CLASS, NULL); 27 obj = efl_add_ref(SIMPLE_CLASS, NULL);
28 simple_a_set(obj, 1); 28 simple_a_set(obj, 1);
29 ck_assert_int_eq(1, simple_a_get(obj)); 29 ck_assert_int_eq(1, simple_a_get(obj));
30 30
diff --git a/src/tests/eo/suite/eo_test_threaded_calls.c b/src/tests/eo/suite/eo_test_threaded_calls.c
index bbbc374..a42de16 100644
--- a/src/tests/eo/suite/eo_test_threaded_calls.c
+++ b/src/tests/eo/suite/eo_test_threaded_calls.c
@@ -99,7 +99,7 @@ _thread_job(void *data, Eina_Thread t EINA_UNUSED)
99 fail_if(EINA_LOCK_SUCCEED != eina_spinlock_take(&locks[0])); 99 fail_if(EINA_LOCK_SUCCEED != eina_spinlock_take(&locks[0]));
100 } 100 }
101 101
102 obj = efl_add(THREAD_TEST_CLASS, NULL, thread_test_constructor(efl_added, v)); 102 obj = efl_add_ref(THREAD_TEST_CLASS, NULL, thread_test_constructor(efl_added, v));
103 103
104 thread_test_try_swap_stack(obj); 104 thread_test_try_swap_stack(obj);
105 v = thread_test_v_get(obj); 105 v = thread_test_v_get(obj);
diff --git a/src/tests/eo/suite/eo_test_value.c b/src/tests/eo/suite/eo_test_value.c
index 7daaf60..19ce91c 100644
--- a/src/tests/eo/suite/eo_test_value.c
+++ b/src/tests/eo/suite/eo_test_value.c
@@ -17,7 +17,7 @@ START_TEST(eo_value)
17 Eina_Value val2, eo_val; 17 Eina_Value val2, eo_val;
18 void *tmpp = NULL; 18 void *tmpp = NULL;
19 Efl_Dbg_Info *eo_dbg_info; 19 Efl_Dbg_Info *eo_dbg_info;
20 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 20 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
21 21
22 eo_dbg_info = EFL_DBG_INFO_LIST_APPEND(NULL, "Root"); 22 eo_dbg_info = EFL_DBG_INFO_LIST_APPEND(NULL, "Root");
23 efl_dbg_info_get(obj, eo_dbg_info); 23 efl_dbg_info_get(obj, eo_dbg_info);
diff --git a/src/tests/eolian_js/eolian_js_test_constructor_method_impl.c b/src/tests/eolian_js/eolian_js_test_constructor_method_impl.c
index 6fe2cb4..ae50c33 100644
--- a/src/tests/eolian_js/eolian_js_test_constructor_method_impl.c
+++ b/src/tests/eolian_js/eolian_js_test_constructor_method_impl.c
@@ -132,7 +132,7 @@ _constructor_method_class_classoutmethod1(Eo* obj EINA_UNUSED, Constructor_Metho
132{ 132{
133 fprintf(stderr, "classoutmethod1\n"); 133 fprintf(stderr, "classoutmethod1\n");
134 fflush(stderr); 134 fflush(stderr);
135 return efl_add(MY_CLASS, NULL, constructor_method_class_constructor1(efl_added, one), constructor_method_class_constructor2(efl_added, two)); 135 return efl_add_ref(MY_CLASS, NULL, constructor_method_class_constructor1(efl_added, one), constructor_method_class_constructor2(efl_added, two));
136} 136}
137 137
138EOLIAN static void 138EOLIAN static void
@@ -140,7 +140,7 @@ _constructor_method_class_classoutmethod2(Eo* obj EINA_UNUSED, Constructor_Metho
140{ 140{
141 fprintf(stderr, "classoutmethod2\n"); 141 fprintf(stderr, "classoutmethod2\n");
142 fflush(stderr); 142 fflush(stderr);
143 *out_class = efl_add(MY_CLASS, NULL, constructor_method_class_constructor1(efl_added, one), constructor_method_class_constructor2(efl_added, two)); 143 *out_class = efl_add_ref(MY_CLASS, NULL, constructor_method_class_constructor1(efl_added, one), constructor_method_class_constructor2(efl_added, two));
144} 144}
145 145
146 146