summaryrefslogtreecommitdiff
path: root/src/tests/eo/suite/eo_test_general.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-11 12:24:09 +0000
committerTom Hacohen <tom@stosb.com>2016-03-11 12:29:03 +0000
commit81240669e82a71645011b2d3ba4034fbe297447c (patch)
tree645b9f4f4a1b91293df0928b3ab38bcd40f9981b /src/tests/eo/suite/eo_test_general.c
parentf24210caac8d50940ddef858994571be59179c10 (diff)
Revert "Ector and eo suite: Semi automatically migrate to the new eo_add."
This reverts commit df83edaeb6b10324868f28e8f1910147ba22e5e5.
Diffstat (limited to '')
-rw-r--r--src/tests/eo/suite/eo_test_general.c129
1 files changed, 54 insertions, 75 deletions
diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c
index bebf5c7e67..2960902715 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -17,11 +17,10 @@
17START_TEST(eo_simple) 17START_TEST(eo_simple)
18{ 18{
19 eo_init(); 19 eo_init();
20 Eo *obj = NULL; 20 Eo *obj = eo_add(EO_CLASS, NULL);
21 eo_add(&obj, EO_CLASS, NULL);
22 fail_if(obj); 21 fail_if(obj);
23 22
24 eo_add(&obj, SIMPLE_CLASS, NULL); 23 obj = eo_add(SIMPLE_CLASS, NULL);
25 fail_if(!obj); 24 fail_if(!obj);
26 eo_constructor(obj); 25 eo_constructor(obj);
27 eo_destructor(obj); 26 eo_destructor(obj);
@@ -34,8 +33,7 @@ END_TEST
34START_TEST(eo_stack) 33START_TEST(eo_stack)
35{ 34{
36 eo_init(); 35 eo_init();
37 Eo *obj = NULL; 36 Eo *obj = eo_add(SIMPLE_CLASS, NULL);
38 eo_add(&obj, SIMPLE_CLASS, NULL);
39 fail_if(!obj); 37 fail_if(!obj);
40 38
41 simple_recursive(obj, 123); 39 simple_recursive(obj, 123);
@@ -102,8 +100,7 @@ START_TEST(eo_signals)
102 { EO_BASE_EVENT_DEL, _eo_signals_eo_del_cb }, 100 { EO_BASE_EVENT_DEL, _eo_signals_eo_del_cb },
103 { NULL, NULL } 101 { NULL, NULL }
104 }; 102 };
105 Eo *obj = NULL; 103 Eo *obj = eo_add(SIMPLE_CLASS, NULL);
106 eo_add(&obj, SIMPLE_CLASS, NULL);
107 Eina_Bool r; 104 Eina_Bool r;
108 105
109 eo_event_callback_add(obj, EO_BASE_EVENT_CALLBACK_ADD, _eo_signals_cb_added_deled, callbacks); 106 eo_event_callback_add(obj, EO_BASE_EVENT_CALLBACK_ADD, _eo_signals_cb_added_deled, callbacks);
@@ -132,7 +129,7 @@ START_TEST(eo_signals)
132 129
133 eo_unref(obj); 130 eo_unref(obj);
134 131
135 eo_add(&obj, SIMPLE_CLASS, NULL); 132 obj = eo_add(SIMPLE_CLASS, NULL);
136 /* Legacy support signals. */ 133 /* Legacy support signals. */
137 { 134 {
138 const Eo_Event_Description *a_desc = eo_base_legacy_only_event_description_get("a,changed"); 135 const Eo_Event_Description *a_desc = eo_base_legacy_only_event_description_get("a,changed");
@@ -193,8 +190,7 @@ START_TEST(eo_data_fetch)
193 const Eo_Class *klass = eo_class_new(&class_desc, EO_CLASS, NULL); 190 const Eo_Class *klass = eo_class_new(&class_desc, EO_CLASS, NULL);
194 fail_if(!klass); 191 fail_if(!klass);
195 192
196 Eo *obj = NULL; 193 Eo *obj = eo_add(klass, NULL);
197 eo_add(&obj, klass, NULL);
198 fail_if(!obj); 194 fail_if(!obj);
199#ifdef EO_DEBUG 195#ifdef EO_DEBUG
200 fail_if(eo_data_scope_get(obj, SIMPLE_CLASS)); 196 fail_if(eo_data_scope_get(obj, SIMPLE_CLASS));
@@ -205,7 +201,7 @@ START_TEST(eo_data_fetch)
205 klass = eo_class_new(&class_desc, EO_CLASS, NULL); 201 klass = eo_class_new(&class_desc, EO_CLASS, NULL);
206 fail_if(!klass); 202 fail_if(!klass);
207 203
208 eo_add(&obj, klass, NULL); 204 obj = eo_add(klass, NULL);
209 fail_if(!obj); 205 fail_if(!obj);
210 fail_if(eo_data_scope_get(obj, klass)); 206 fail_if(eo_data_scope_get(obj, klass));
211 fail_if(!eo_data_scope_get(obj, EO_BASE_CLASS)); 207 fail_if(!eo_data_scope_get(obj, EO_BASE_CLASS));
@@ -272,8 +268,7 @@ START_TEST(eo_isa_tests)
272 fail_if(!klass); 268 fail_if(!klass);
273 } 269 }
274 270
275 Eo *obj = NULL; 271 Eo *obj = eo_add(klass, NULL);
276 eo_add(&obj, klass, NULL);
277 fail_if(!obj); 272 fail_if(!obj);
278 fail_if(eo_isa(obj, SIMPLE_CLASS)); 273 fail_if(eo_isa(obj, SIMPLE_CLASS));
279 fail_if(!eo_isa(obj, iface)); 274 fail_if(!eo_isa(obj, iface));
@@ -282,7 +277,7 @@ START_TEST(eo_isa_tests)
282 fail_if(!eo_isa(obj, EO_CLASS)); 277 fail_if(!eo_isa(obj, EO_CLASS));
283 eo_unref(obj); 278 eo_unref(obj);
284 279
285 eo_add(&obj, SIMPLE_CLASS, NULL); 280 obj = eo_add(SIMPLE_CLASS, NULL);
286 fail_if(!obj); 281 fail_if(!obj);
287 fail_if(eo_isa(obj, klass)); 282 fail_if(eo_isa(obj, klass));
288 fail_if(eo_isa(obj, iface)); 283 fail_if(eo_isa(obj, iface));
@@ -300,11 +295,9 @@ START_TEST(eo_composite_tests)
300{ 295{
301 eo_init(); 296 eo_init();
302 297
303 Eo *obj = NULL; 298 Eo *obj = eo_add(SIMPLE_CLASS, NULL);
304 eo_add(&obj, SIMPLE_CLASS, NULL);
305 fail_if(!obj); 299 fail_if(!obj);
306 Eo *obj2 = NULL; 300 Eo *obj2 = eo_add(SIMPLE_CLASS, NULL);
307 eo_add(&obj2, SIMPLE_CLASS, NULL);
308 fail_if(!obj2); 301 fail_if(!obj2);
309 302
310 eo_composite_attach(obj, obj2); 303 eo_composite_attach(obj, obj2);
@@ -363,12 +356,11 @@ START_TEST(eo_man_free)
363 fail_if(!klass); 356 fail_if(!klass);
364 cur_klass = klass; 357 cur_klass = klass;
365 358
366 Eo *obj = NULL; 359 Eo *obj = eo_add(klass, NULL);
367 eo_add(&obj, klass, NULL);
368 fail_if(!obj); 360 fail_if(!obj);
369 eo_unref(obj); 361 eo_unref(obj);
370 362
371 eo_add(&obj, klass, NULL); 363 obj = eo_add(klass, NULL);
372 fail_if(!obj); 364 fail_if(!obj);
373 fail_if(eo_manual_free(obj)); 365 fail_if(eo_manual_free(obj));
374 eo_unref(obj); 366 eo_unref(obj);
@@ -378,7 +370,7 @@ START_TEST(eo_man_free)
378 cur_klass = klass; 370 cur_klass = klass;
379 fail_if(!klass); 371 fail_if(!klass);
380 372
381 eo_add(&obj, klass, NULL); 373 obj = eo_add(klass, NULL);
382 fail_if(!obj); 374 fail_if(!obj);
383 fail_if(eo_manual_free(obj)); 375 fail_if(eo_manual_free(obj));
384 fail_if(eo_destructed_is(obj)); 376 fail_if(eo_destructed_is(obj));
@@ -386,7 +378,7 @@ START_TEST(eo_man_free)
386 fail_if(!eo_destructed_is(obj)); 378 fail_if(!eo_destructed_is(obj));
387 fail_if(!eo_manual_free(obj)); 379 fail_if(!eo_manual_free(obj));
388 380
389 eo_add(&obj, klass, NULL); 381 obj = eo_add(klass, NULL);
390 fail_if(!obj); 382 fail_if(!obj);
391 eo_unref(obj); 383 eo_unref(obj);
392 fail_if(!eo_destructed_is(obj)); 384 fail_if(!eo_destructed_is(obj));
@@ -397,12 +389,12 @@ START_TEST(eo_man_free)
397 cur_klass = klass; 389 cur_klass = klass;
398 fail_if(!klass); 390 fail_if(!klass);
399 391
400 eo_add(&obj, klass, NULL); 392 obj = eo_add(klass, NULL);
401 fail_if(!obj); 393 fail_if(!obj);
402 fail_if(eo_manual_free(obj)); 394 fail_if(eo_manual_free(obj));
403 eo_unref(obj); 395 eo_unref(obj);
404 396
405 eo_add(&obj, klass, NULL); 397 obj = eo_add(klass, NULL);
406 fail_if(!obj); 398 fail_if(!obj);
407 eo_manual_free_set(obj, EINA_TRUE); 399 eo_manual_free_set(obj, EINA_TRUE);
408 eo_unref(obj); 400 eo_unref(obj);
@@ -411,7 +403,7 @@ START_TEST(eo_man_free)
411 eo_unref(obj); 403 eo_unref(obj);
412 fail_if(!eo_manual_free(obj)); 404 fail_if(!eo_manual_free(obj));
413 405
414 eo_add(&obj, klass, NULL); 406 obj = eo_add(klass, NULL);
415 fail_if(!obj); 407 fail_if(!obj);
416 eo_manual_free_set(obj, EINA_TRUE); 408 eo_manual_free_set(obj, EINA_TRUE);
417 eo_unref(obj); 409 eo_unref(obj);
@@ -429,12 +421,9 @@ END_TEST
429START_TEST(eo_refs) 421START_TEST(eo_refs)
430{ 422{
431 eo_init(); 423 eo_init();
432 Eo *obj = NULL; 424 Eo *obj = eo_add(SIMPLE_CLASS, NULL);
433 eo_add(&obj, SIMPLE_CLASS, NULL); 425 Eo *obj2 = eo_add(SIMPLE_CLASS, NULL);
434 Eo *obj2 = NULL; 426 Eo *obj3 = eo_add(SIMPLE_CLASS, NULL);
435 eo_add(&obj2, SIMPLE_CLASS, NULL);
436 Eo *obj3 = NULL;
437 eo_add(&obj3, SIMPLE_CLASS, NULL);
438 427
439 eo_xref(obj, obj2); 428 eo_xref(obj, obj2);
440 fail_if(eo_ref_get(obj) != 2); 429 fail_if(eo_ref_get(obj) != 2);
@@ -469,8 +458,8 @@ START_TEST(eo_refs)
469 eo_unref(obj3); 458 eo_unref(obj3);
470 459
471 /* Check hierarchy */ 460 /* Check hierarchy */
472 eo_add(&obj, SIMPLE_CLASS, NULL); 461 obj = eo_add(SIMPLE_CLASS, NULL);
473 eo_ref(eo_add(&obj2, SIMPLE_CLASS, obj)); 462 obj2 = eo_ref(eo_add(SIMPLE_CLASS, obj));
474 463
475 Eo *wref = NULL; 464 Eo *wref = NULL;
476 eo_wref_add(obj2, &wref); 465 eo_wref_add(obj2, &wref);
@@ -485,18 +474,18 @@ START_TEST(eo_refs)
485 fail_if(wref); 474 fail_if(wref);
486 475
487 /* eo_add_ref and normal eo_add */ 476 /* eo_add_ref and normal eo_add */
488 eo_add(&obj, SIMPLE_CLASS, NULL); 477 obj = eo_add(SIMPLE_CLASS, NULL);
489 eo_add(&obj2, SIMPLE_CLASS, obj); 478 obj2 = eo_add(SIMPLE_CLASS, obj);
490 eo_add_ref(&obj3, SIMPLE_CLASS, obj); 479 obj3 = eo_add_ref(SIMPLE_CLASS, obj);
491 480
492 ck_assert_int_eq(eo_ref_get(obj), 1); 481 ck_assert_int_eq(eo_ref_get(obj), 1);
493 ck_assert_int_eq(eo_ref_get(obj2), 1); 482 ck_assert_int_eq(eo_ref_get(obj2), 1);
494 ck_assert_int_eq(eo_ref_get(obj3), 2); 483 ck_assert_int_eq(eo_ref_get(obj3), 2);
495 484
496 /* Setting and removing parents. */ 485 /* Setting and removing parents. */
497 eo_add(&obj, SIMPLE_CLASS, NULL); 486 obj = eo_add(SIMPLE_CLASS, NULL);
498 eo_ref(eo_add(&obj2, SIMPLE_CLASS, obj)); 487 obj2 = eo_ref(eo_add(SIMPLE_CLASS, obj));
499 eo_ref(eo_add(&obj3, SIMPLE_CLASS, NULL)); 488 obj3 = eo_ref(eo_add(SIMPLE_CLASS, NULL));
500 489
501 eo_parent_set(obj2, obj3); 490 eo_parent_set(obj2, obj3);
502 eo_parent_set(obj3, obj); 491 eo_parent_set(obj3, obj);
@@ -518,13 +507,13 @@ START_TEST(eo_refs)
518 eo_del(obj3); 507 eo_del(obj3);
519 508
520 /* Just check it doesn't seg atm. */ 509 /* Just check it doesn't seg atm. */
521 eo_add(&obj, SIMPLE_CLASS, NULL); 510 obj = eo_add(SIMPLE_CLASS, NULL);
522 eo_ref(obj); 511 eo_ref(obj);
523 eo_unref(obj); 512 eo_unref(obj);
524 eo_unref(obj); 513 eo_unref(obj);
525 514
526 eo_add(&obj, SIMPLE_CLASS, NULL); 515 obj = eo_add(SIMPLE_CLASS, NULL);
527 eo_add(&obj2, SIMPLE_CLASS, obj); 516 obj2 = eo_add(SIMPLE_CLASS, obj);
528 eo_unref(obj2); 517 eo_unref(obj2);
529 eo_ref(obj2); 518 eo_ref(obj2);
530 eo_del(obj2); 519 eo_del(obj2);
@@ -538,10 +527,8 @@ START_TEST(eo_weak_reference)
538{ 527{
539 eo_init(); 528 eo_init();
540 529
541 Eo *obj = NULL; 530 Eo *obj = eo_add(SIMPLE_CLASS, NULL);
542 eo_add(&obj, SIMPLE_CLASS, NULL); 531 Eo *obj2 = eo_add(SIMPLE_CLASS, NULL);
543 Eo *obj2 = NULL;
544 eo_add(&obj2, SIMPLE_CLASS, NULL);
545 Eo *wref = NULL, *wref2 = NULL, *wref3 = NULL; 532 Eo *wref = NULL, *wref2 = NULL, *wref3 = NULL;
546 eo_wref_add(obj, &wref); 533 eo_wref_add(obj, &wref);
547 fail_if(!wref); 534 fail_if(!wref);
@@ -549,7 +536,7 @@ START_TEST(eo_weak_reference)
549 eo_unref(obj); 536 eo_unref(obj);
550 fail_if(wref); 537 fail_if(wref);
551 538
552 eo_add(&obj, SIMPLE_CLASS, NULL); 539 obj = eo_add(SIMPLE_CLASS, NULL);
553 eo_wref_add(obj, &wref); 540 eo_wref_add(obj, &wref);
554 541
555 eo_ref(obj); 542 eo_ref(obj);
@@ -561,7 +548,7 @@ START_TEST(eo_weak_reference)
561 eo_unref(obj); 548 eo_unref(obj);
562 fail_if(wref); 549 fail_if(wref);
563 550
564 eo_add(&obj, SIMPLE_CLASS, NULL); 551 obj = eo_add(SIMPLE_CLASS, NULL);
565 552
566 eo_wref_add(obj, &wref); 553 eo_wref_add(obj, &wref);
567 eo_wref_del(obj, &wref); 554 eo_wref_del(obj, &wref);
@@ -610,8 +597,7 @@ END_TEST
610START_TEST(eo_generic_data) 597START_TEST(eo_generic_data)
611{ 598{
612 eo_init(); 599 eo_init();
613 Eo *obj = NULL; 600 Eo *obj = eo_add(SIMPLE_CLASS, NULL);
614 eo_add(&obj, SIMPLE_CLASS, NULL);
615 void *data = NULL; 601 void *data = NULL;
616 602
617 eo_key_data_set(obj, "test1", (void *) 1); 603 eo_key_data_set(obj, "test1", (void *) 1);
@@ -655,8 +641,7 @@ START_TEST(eo_magic_checks)
655 641
656 memset(_buf, 1, sizeof(_buf)); 642 memset(_buf, 1, sizeof(_buf));
657 643
658 Eo *obj = NULL; 644 Eo *obj = eo_add(SIMPLE_CLASS, (Eo *) buf);
659 eo_add(&obj, SIMPLE_CLASS, (Eo *) buf);
660 fail_if(obj); 645 fail_if(obj);
661 646
662 while (1) 647 while (1)
@@ -666,10 +651,10 @@ START_TEST(eo_magic_checks)
666 Eo *wref = NULL; 651 Eo *wref = NULL;
667 Eo *obj2 = NULL; 652 Eo *obj2 = NULL;
668 653
669 eo_add(&obj, (Eo_Class *) buf, NULL); 654 obj = eo_add((Eo_Class *) buf, NULL);
670 fail_if(obj); 655 fail_if(obj);
671 656
672 eo_add(&obj, SIMPLE_CLASS, NULL); 657 obj = eo_add(SIMPLE_CLASS, NULL);
673 fail_if(!obj); 658 fail_if(!obj);
674 659
675 simple_a_set((Eo *) buf, ++i); 660 simple_a_set((Eo *) buf, ++i);
@@ -784,8 +769,7 @@ START_TEST(eo_multiple_do)
784 const Eo_Class *klass = eo_class_new(&class_desc, SIMPLE_CLASS, NULL); 769 const Eo_Class *klass = eo_class_new(&class_desc, SIMPLE_CLASS, NULL);
785 fail_if(!klass); 770 fail_if(!klass);
786 771
787 Eo *obj = NULL; 772 Eo *obj = eo_add(klass, NULL);
788 eo_add(&obj, klass, NULL);
789 fail_if(!obj); 773 fail_if(!obj);
790 774
791 Eina_Bool ca, cb, cc; 775 Eina_Bool ca, cb, cc;
@@ -814,24 +798,24 @@ START_TEST(eo_add_do_and_custom)
814 Eo *obj = NULL; 798 Eo *obj = NULL;
815 eo_init(); 799 eo_init();
816 800
817 eo_add(&obj, SIMPLE_CLASS, NULL, eo_constructor(obj)); 801 obj = eo_add(SIMPLE_CLASS, NULL, eo_constructor(eoid));
818 fail_if(!obj); 802 fail_if(!obj);
819 eo_unref(obj); 803 eo_unref(obj);
820 804
821 eo_add(&obj, SIMPLE_CLASS, NULL, simple_a_set(obj, 7)); 805 obj = eo_add(SIMPLE_CLASS, NULL, simple_a_set(eoid, 7));
822 fail_if(!obj); 806 fail_if(!obj);
823 pd = eo_data_scope_get(obj, SIMPLE_CLASS); 807 pd = eo_data_scope_get(obj, SIMPLE_CLASS);
824 fail_if(pd->a != 7); 808 fail_if(pd->a != 7);
825 eo_unref(obj); 809 eo_unref(obj);
826 810
827 eo_add(&obj, SIMPLE_CLASS, NULL, eo_constructor(obj), simple_a_set(obj, 7)); 811 obj = eo_add(SIMPLE_CLASS, NULL, eo_constructor(eoid), simple_a_set(eoid, 7));
828 fail_if(!obj); 812 fail_if(!obj);
829 pd = eo_data_scope_get(obj, SIMPLE_CLASS); 813 pd = eo_data_scope_get(obj, SIMPLE_CLASS);
830 fail_if(pd->a != 7); 814 fail_if(pd->a != 7);
831 eo_unref(obj); 815 eo_unref(obj);
832 816
833 Eina_Bool finalized; 817 Eina_Bool finalized;
834 eo_add(&obj, SIMPLE_CLASS, NULL, finalized = eo_finalized_get(obj)); 818 obj = eo_add(SIMPLE_CLASS, NULL, finalized = eo_finalized_get(eoid));
835 fail_if(finalized); 819 fail_if(finalized);
836 820
837 finalized = eo_finalized_get(obj); 821 finalized = eo_finalized_get(obj);
@@ -862,8 +846,7 @@ START_TEST(eo_pointers_indirection)
862 fail_if(!klass); 846 fail_if(!klass);
863 847
864 /* Check simple id validity */ 848 /* Check simple id validity */
865 Eo *obj = NULL; 849 Eo *obj = eo_add(klass, NULL);
866 eo_add(&obj, klass, NULL);
867 fail_if(!obj); 850 fail_if(!obj);
868 fail_if(!eo_isa(obj, klass)); 851 fail_if(!eo_isa(obj, klass));
869 obj = (Eo *)((char *)(obj) + 1); 852 obj = (Eo *)((char *)(obj) + 1);
@@ -874,19 +857,17 @@ START_TEST(eo_pointers_indirection)
874 fail_if(eo_isa(obj, klass)); 857 fail_if(eo_isa(obj, klass));
875 858
876 /* Check id invalidity after deletion */ 859 /* Check id invalidity after deletion */
877 Eo *obj1 = NULL; 860 Eo *obj1 = eo_add(klass, NULL);
878 eo_add(&obj1, klass, NULL);
879 fail_if(!obj1); 861 fail_if(!obj1);
880 eo_unref(obj1); 862 eo_unref(obj1);
881 Eo *obj2 = NULL; 863 Eo *obj2 = eo_add(klass, NULL);
882 eo_add(&obj2, klass, NULL);
883 fail_if(!obj2); 864 fail_if(!obj2);
884 fail_if(!eo_isa(obj2, klass)); 865 fail_if(!eo_isa(obj2, klass));
885 fail_if(eo_isa(obj1, klass)); 866 fail_if(eo_isa(obj1, klass));
886 eo_unref(obj2); 867 eo_unref(obj2);
887 868
888 /* Check id sanity checks for "close enough" ids. */ 869 /* Check id sanity checks for "close enough" ids. */
889 eo_add(&obj1, klass, NULL); 870 obj1 = eo_add(klass, NULL);
890 fail_if(!obj1); 871 fail_if(!obj1);
891 obj2 = (Eo *) (((Eo_Id) obj1) & ~MASK_OBJ_TAG); 872 obj2 = (Eo *) (((Eo_Id) obj1) & ~MASK_OBJ_TAG);
892 fail_if(eo_class_get(obj2)); 873 fail_if(eo_class_get(obj2));
@@ -899,7 +880,7 @@ START_TEST(eo_pointers_indirection)
899 /* Creation of the objects */ 880 /* Creation of the objects */
900 for ( obj_id = 0; obj_id < NB_OBJS; obj_id++) 881 for ( obj_id = 0; obj_id < NB_OBJS; obj_id++)
901 { 882 {
902 eo_add(&objs[obj_id], klass, NULL); 883 objs[obj_id] = eo_add(klass, NULL);
903 if(!objs[obj_id]) 884 if(!objs[obj_id])
904 fail_if(!objs[obj_id]); 885 fail_if(!objs[obj_id]);
905 if(!eo_isa(objs[obj_id], klass)) 886 if(!eo_isa(objs[obj_id], klass))
@@ -915,7 +896,7 @@ START_TEST(eo_pointers_indirection)
915 /* Creation of the deleted objects */ 896 /* Creation of the deleted objects */
916 for ( obj_id = 0; obj_id < NB_OBJS; obj_id+=2000) 897 for ( obj_id = 0; obj_id < NB_OBJS; obj_id+=2000)
917 { 898 {
918 eo_add(&objs[obj_id], klass, NULL); 899 objs[obj_id] = eo_add(klass, NULL);
919 if(!objs[obj_id]) 900 if(!objs[obj_id])
920 fail_if(!objs[obj_id]); 901 fail_if(!objs[obj_id]);
921 if(!eo_isa(objs[obj_id], klass)) 902 if(!eo_isa(objs[obj_id], klass))
@@ -961,8 +942,7 @@ START_TEST(eo_add_failures)
961 942
962 const Eo_Class *klass = eo_class_new(&class_desc, EO_CLASS, NULL); 943 const Eo_Class *klass = eo_class_new(&class_desc, EO_CLASS, NULL);
963 944
964 Eo *obj = NULL; 945 Eo *obj = eo_add(klass, NULL);
965 eo_add(&obj, klass, NULL);
966 946
967 fail_if(obj); 947 fail_if(obj);
968 948
@@ -1001,8 +981,7 @@ START_TEST(eo_del_intercept)
1001 981
1002 /* Check unref interception */ 982 /* Check unref interception */
1003 intercepted = EINA_FALSE; 983 intercepted = EINA_FALSE;
1004 Eo *obj = NULL; 984 Eo *obj = eo_add(klass, NULL);
1005 eo_add(&obj, klass, NULL);
1006 fail_if(!obj); 985 fail_if(!obj);
1007 fail_if(!eo_isa(obj, klass)); 986 fail_if(!eo_isa(obj, klass));
1008 eo_del_intercept_set(obj, _del_intercept); 987 eo_del_intercept_set(obj, _del_intercept);
@@ -1012,7 +991,7 @@ START_TEST(eo_del_intercept)
1012 991
1013 /* Check del interception */ 992 /* Check del interception */
1014 intercepted = EINA_FALSE; 993 intercepted = EINA_FALSE;
1015 eo_add(&obj, klass, NULL); 994 obj = eo_add(klass, NULL);
1016 fail_if(!obj); 995 fail_if(!obj);
1017 fail_if(!eo_isa(obj, klass)); 996 fail_if(!eo_isa(obj, klass));
1018 eo_del_intercept_set(obj, _del_intercept); 997 eo_del_intercept_set(obj, _del_intercept);