summaryrefslogtreecommitdiff
path: root/src/tests/eo/suite
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/eo/suite
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 'src/tests/eo/suite')
-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
7 files changed, 113 insertions, 113 deletions
diff --git a/src/tests/eo/suite/eo_test_class_singleton.c b/src/tests/eo/suite/eo_test_class_singleton.c
index e5db1ff62c..a38a52b915 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 45a1fe377f..e864631b78 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 66902db233..43420e3791 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 c6bf035369..169db5b889 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 1f82be4a07..a625847b7d 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 bbbc3746ca..a42de16352 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 7daaf60c47..19ce91c331 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);