cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=fccaeb182e607aa2c1e7896436035e877cc18c8e

commit fccaeb182e607aa2c1e7896436035e877cc18c8e
Author: Cedric Bail <[email protected]>
Date:   Mon Mar 19 14:27:01 2018 -0700

    eo: update tests to also use efl_add_ref correctly.
---
 src/tests/eo/suite/eo_test_call_errors.c            | 8 ++++----
 src/tests/eo/suite/eo_test_class_behaviour_errors.c | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/tests/eo/suite/eo_test_call_errors.c 
b/src/tests/eo/suite/eo_test_call_errors.c
index 8bc4329ee5..c20f7f7e83 100644
--- a/src/tests/eo/suite/eo_test_call_errors.c
+++ b/src/tests/eo/suite/eo_test_call_errors.c
@@ -17,7 +17,7 @@ START_TEST(eo_pure_virtual_fct_call)
    efl_object_init();
    eina_log_print_cb_set(eo_test_print_cb, &ctx);
 
-   Eo *obj = efl_add(SIMPLE_CLASS, NULL);
+   Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
    fail_if(!obj);
 
    TEST_EO_ERROR("_efl_object_call_resolve", "in %s:%d: you called a pure 
virtual func '%s' (%d) of class '%s'.");
@@ -35,7 +35,7 @@ START_TEST(eo_api_not_implemented_call)
    efl_object_init();
    eina_log_print_cb_set(eo_test_print_cb, &ctx);
 
-   Eo *obj = efl_add(SIMPLE_CLASS, NULL);
+   Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
    fail_if(!obj);
 
    TEST_EO_ERROR("simple_no_implementation", "Unable to resolve op for api 
func %p for obj=%p (%s)");
@@ -53,7 +53,7 @@ START_TEST(eo_op_not_found_in_super)
    efl_object_init();
    eina_log_print_cb_set(eo_test_print_cb, &ctx);
 
-   Eo *obj = efl_add(SIMPLE_CLASS, NULL);
+   Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
    fail_if(!obj);
 
    TEST_EO_ERROR("_efl_object_call_resolve", "in %s:%d: func '%s' (%d) could 
not be resolved for class '%s' for super of '%s'.");
@@ -114,7 +114,7 @@ START_TEST(eo_fallbackcall_execute)
 {
    efl_object_init();
 
-   Eo *obj = efl_add(SIMPLE_CLASS, NULL);
+   Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
 
    fallback_called = EINA_FALSE;
    simple_error_test(NULL);
diff --git a/src/tests/eo/suite/eo_test_class_behaviour_errors.c 
b/src/tests/eo/suite/eo_test_class_behaviour_errors.c
index 98ee81e462..c39fe0eff4 100644
--- a/src/tests/eo/suite/eo_test_class_behaviour_errors.c
+++ b/src/tests/eo/suite/eo_test_class_behaviour_errors.c
@@ -50,7 +50,7 @@ START_TEST(efl_destructor_unref)
    klass = efl_class_new(&class_desc, SIMPLE_CLASS, NULL);
    fail_if(!klass);
 
-   Eo *obj = efl_add(klass, NULL);
+   Eo *obj = efl_add_ref(klass, NULL);
    fail_if(!obj);
 
    TEST_EO_ERROR("efl_unref", "Obj:%s@%p. User refcount (%d) < 0. Too many 
unrefs.");
@@ -80,13 +80,13 @@ START_TEST(efl_destructor_double_del)
    klass = efl_class_new(&class_desc, SIMPLE_CLASS, NULL);
    fail_if(!klass);
 
-   Eo *obj = efl_add(klass, NULL);
+   Eo *obj = efl_add_ref(klass, NULL);
    efl_manual_free_set(obj, EINA_TRUE);
    fail_if(!obj);
 
    TEST_EO_ERROR("efl_unref", "Obj:%s@%p. User refcount (%d) < 0. Too many 
unrefs.");
-   efl_del(obj);
-   efl_del(obj);
+   efl_unref(obj);
+   efl_unref(obj);
 
    eina_log_print_cb_set(eina_log_print_cb_stderr, NULL);
 

-- 


Reply via email to