summaryrefslogtreecommitdiff
path: root/src/tests/eo
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2018-06-12 19:20:21 -0400
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-06-18 12:11:27 +0200
commitdfe703b9bc63d2174ef9a02e920d47cd6062bb3d (patch)
tree24bebfdf2a268411a995019b49dd09dd8a3f52d5 /src/tests/eo
parente5d4f9f63cd3746f57c0ad0bcac9f7c0f68af750 (diff)
tests: wrap critical errors to disable aborting in eo tests
ref T7002 Differential Revision: https://phab.enlightenment.org/D6271
Diffstat (limited to 'src/tests/eo')
-rw-r--r--src/tests/eo/suite/eo_test_class_behaviour_errors.c4
-rw-r--r--src/tests/eo/suite/eo_test_general.c6
-rw-r--r--src/tests/eo/suite/eo_test_lifecycle.c4
3 files changed, 14 insertions, 0 deletions
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 e1bd2c898f..7789ed170d 100644
--- a/src/tests/eo/suite/eo_test_class_behaviour_errors.c
+++ b/src/tests/eo/suite/eo_test_class_behaviour_errors.c
@@ -52,8 +52,10 @@ EFL_START_TEST(efl_destructor_unref)
52 Eo *obj = efl_add_ref(klass, NULL); 52 Eo *obj = efl_add_ref(klass, NULL);
53 fail_if(!obj); 53 fail_if(!obj);
54 54
55 DISABLE_ABORT_ON_CRITICAL_START;
55 TEST_EO_CRITICAL("efl_unref", "Obj:%s@%p. User refcount (%d) < 0. Too many unrefs."); 56 TEST_EO_CRITICAL("efl_unref", "Obj:%s@%p. User refcount (%d) < 0. Too many unrefs.");
56 efl_unref(obj); 57 efl_unref(obj);
58 DISABLE_ABORT_ON_CRITICAL_END;
57 59
58 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL); 60 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL);
59 61
@@ -83,7 +85,9 @@ EFL_START_TEST(efl_destructor_double_del)
83 85
84 TEST_EO_CRITICAL("efl_unref", "Obj:%s@%p. User refcount (%d) < 0. Too many unrefs."); 86 TEST_EO_CRITICAL("efl_unref", "Obj:%s@%p. User refcount (%d) < 0. Too many unrefs.");
85 efl_unref(obj); 87 efl_unref(obj);
88 DISABLE_ABORT_ON_CRITICAL_START;
86 efl_unref(obj); 89 efl_unref(obj);
90 DISABLE_ABORT_ON_CRITICAL_END;
87 91
88 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL); 92 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL);
89 93
diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c
index bdf3dd16a6..4acce86f4f 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -535,7 +535,9 @@ EFL_START_TEST(eo_man_free)
535 efl_unref(obj); 535 efl_unref(obj);
536 efl_ref(obj); 536 efl_ref(obj);
537 efl_unref(obj); 537 efl_unref(obj);
538 DISABLE_ABORT_ON_CRITICAL_START;
538 efl_unref(obj); 539 efl_unref(obj);
540 DISABLE_ABORT_ON_CRITICAL_END;
539 fail_if(!efl_manual_free(obj)); 541 fail_if(!efl_manual_free(obj));
540 542
541 obj = efl_add_ref(klass, NULL); 543 obj = efl_add_ref(klass, NULL);
@@ -544,9 +546,11 @@ EFL_START_TEST(eo_man_free)
544 efl_unref(obj); 546 efl_unref(obj);
545 efl_ref(obj); 547 efl_ref(obj);
546 efl_unref(obj); 548 efl_unref(obj);
549 DISABLE_ABORT_ON_CRITICAL_START;
547 efl_unref(obj); 550 efl_unref(obj);
548 efl_unref(obj); 551 efl_unref(obj);
549 efl_unref(obj); 552 efl_unref(obj);
553 DISABLE_ABORT_ON_CRITICAL_END;
550 fail_if(!efl_manual_free(obj)); 554 fail_if(!efl_manual_free(obj));
551 555
552} 556}
@@ -675,7 +679,9 @@ EFL_START_TEST(efl_refs)
675 679
676 obj = efl_add_ref(SIMPLE_CLASS, NULL); 680 obj = efl_add_ref(SIMPLE_CLASS, NULL);
677 obj2 = efl_add(SIMPLE_CLASS, obj); 681 obj2 = efl_add(SIMPLE_CLASS, obj);
682 DISABLE_ABORT_ON_CRITICAL_START;
678 efl_unref(obj2); 683 efl_unref(obj2);
684 DISABLE_ABORT_ON_CRITICAL_END;
679 efl_ref(obj2); 685 efl_ref(obj2);
680 efl_del(obj2); 686 efl_del(obj2);
681 efl_unref(obj); 687 efl_unref(obj);
diff --git a/src/tests/eo/suite/eo_test_lifecycle.c b/src/tests/eo/suite/eo_test_lifecycle.c
index a576ca6dda..b0c67bca45 100644
--- a/src/tests/eo/suite/eo_test_lifecycle.c
+++ b/src/tests/eo/suite/eo_test_lifecycle.c
@@ -131,7 +131,9 @@ EFL_START_TEST(eo_test_del_in_noref)
131 efl_event_callback_add(obj, EFL_EVENT_NOREF, _noref2, NULL); 131 efl_event_callback_add(obj, EFL_EVENT_NOREF, _noref2, NULL);
132 132
133 efl_ref(obj); 133 efl_ref(obj);
134 DISABLE_ABORT_ON_CRITICAL_START;
134 efl_unref(obj); //this fires noref 135 efl_unref(obj); //this fires noref
136 DISABLE_ABORT_ON_CRITICAL_END;
135 137
136 ck_assert_ptr_eq(efl_class_name_get(obj), NULL); 138 ck_assert_ptr_eq(efl_class_name_get(obj), NULL);
137 139
@@ -151,7 +153,9 @@ EFL_START_TEST(eo_test_unref_noref)
151 153
152 efl_event_callback_add(obj, EFL_EVENT_NOREF, _noref3, NULL); 154 efl_event_callback_add(obj, EFL_EVENT_NOREF, _noref3, NULL);
153 155
156 DISABLE_ABORT_ON_CRITICAL_START;
154 efl_unref(obj); 157 efl_unref(obj);
158 DISABLE_ABORT_ON_CRITICAL_END;
155 159
156 ck_assert_ptr_eq(efl_class_name_get(obj), NULL); 160 ck_assert_ptr_eq(efl_class_name_get(obj), NULL);
157 161