tests: wrap critical errors to disable aborting in eo tests
authorMike Blumenkrantz <zmike@samsung.com>
Tue, 12 Jun 2018 23:20:21 +0000 (19:20 -0400)
committerJongmin Lee <jm105.lee@samsung.com>
Mon, 18 Jun 2018 21:49:54 +0000 (06:49 +0900)
ref T7002

Differential Revision: https://phab.enlightenment.org/D6271

src/tests/eo/suite/eo_test_class_behaviour_errors.c
src/tests/eo/suite/eo_test_general.c
src/tests/eo/suite/eo_test_lifecycle.c

index e1bd2c8..7789ed1 100644 (file)
@@ -52,8 +52,10 @@ EFL_START_TEST(efl_destructor_unref)
    Eo *obj = efl_add_ref(klass, NULL);
    fail_if(!obj);
 
+   DISABLE_ABORT_ON_CRITICAL_START;
    TEST_EO_CRITICAL("efl_unref", "Obj:%s@%p. User refcount (%d) < 0. Too many unrefs.");
    efl_unref(obj);
+   DISABLE_ABORT_ON_CRITICAL_END;
 
    eina_log_print_cb_set(eina_log_print_cb_stderr, NULL);
 
@@ -83,7 +85,9 @@ EFL_START_TEST(efl_destructor_double_del)
 
    TEST_EO_CRITICAL("efl_unref", "Obj:%s@%p. User refcount (%d) < 0. Too many unrefs.");
    efl_unref(obj);
+   DISABLE_ABORT_ON_CRITICAL_START;
    efl_unref(obj);
+   DISABLE_ABORT_ON_CRITICAL_END;
 
    eina_log_print_cb_set(eina_log_print_cb_stderr, NULL);
 
index bdf3dd1..4acce86 100644 (file)
@@ -535,7 +535,9 @@ EFL_START_TEST(eo_man_free)
    efl_unref(obj);
    efl_ref(obj);
    efl_unref(obj);
+   DISABLE_ABORT_ON_CRITICAL_START;
    efl_unref(obj);
+   DISABLE_ABORT_ON_CRITICAL_END;
    fail_if(!efl_manual_free(obj));
 
    obj = efl_add_ref(klass, NULL);
@@ -544,9 +546,11 @@ EFL_START_TEST(eo_man_free)
    efl_unref(obj);
    efl_ref(obj);
    efl_unref(obj);
+   DISABLE_ABORT_ON_CRITICAL_START;
    efl_unref(obj);
    efl_unref(obj);
    efl_unref(obj);
+   DISABLE_ABORT_ON_CRITICAL_END;
    fail_if(!efl_manual_free(obj));
 
 }
@@ -675,7 +679,9 @@ EFL_START_TEST(efl_refs)
 
    obj = efl_add_ref(SIMPLE_CLASS, NULL);
    obj2 = efl_add(SIMPLE_CLASS, obj);
+   DISABLE_ABORT_ON_CRITICAL_START;
    efl_unref(obj2);
+   DISABLE_ABORT_ON_CRITICAL_END;
    efl_ref(obj2);
    efl_del(obj2);
    efl_unref(obj);
index a576ca6..b0c67bc 100644 (file)
@@ -131,7 +131,9 @@ EFL_START_TEST(eo_test_del_in_noref)
    efl_event_callback_add(obj, EFL_EVENT_NOREF, _noref2, NULL);
 
    efl_ref(obj);
+   DISABLE_ABORT_ON_CRITICAL_START;
    efl_unref(obj); //this fires noref
+   DISABLE_ABORT_ON_CRITICAL_END;
 
    ck_assert_ptr_eq(efl_class_name_get(obj), NULL);
 
@@ -151,7 +153,9 @@ EFL_START_TEST(eo_test_unref_noref)
 
    efl_event_callback_add(obj, EFL_EVENT_NOREF, _noref3, NULL);
 
+   DISABLE_ABORT_ON_CRITICAL_START;
    efl_unref(obj);
+   DISABLE_ABORT_ON_CRITICAL_END;
 
    ck_assert_ptr_eq(efl_class_name_get(obj), NULL);