summaryrefslogtreecommitdiff
path: root/src/tests/eo/suite/eo_test_class_behaviour_errors.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/eo/suite/eo_test_class_behaviour_errors.c')
-rw-r--r--src/tests/eo/suite/eo_test_class_behaviour_errors.c34
1 files changed, 34 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 300f3fa..a54a2f2 100644
--- a/src/tests/eo/suite/eo_test_class_behaviour_errors.c
+++ b/src/tests/eo/suite/eo_test_class_behaviour_errors.c
@@ -57,7 +57,41 @@ START_TEST(eo_destructor_unref)
57} 57}
58END_TEST 58END_TEST
59 59
60START_TEST(eo_destructor_double_del)
61{
62 eo_init();
63 eina_log_print_cb_set(eo_test_print_cb, &ctx);
64
65 static Eo_Class_Description class_desc = {
66 EO_VERSION,
67 "Simple",
68 EO_CLASS_TYPE_REGULAR,
69 EO_CLASS_DESCRIPTION_NOOPS(),
70 NULL,
71 0,
72 NULL,
73 NULL
74 };
75
76 klass = eo_class_new(&class_desc, SIMPLE_CLASS, NULL);
77 fail_if(!klass);
78
79 Eo *obj = eo_add(klass, NULL);
80 eo_manual_free_set(obj, EINA_TRUE);
81 fail_if(!obj);
82
83 TEST_EO_ERROR("_eo_unref", "Object %p already destructed.");
84 eo_del(obj);
85 eo_del(obj);
86
87 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL);
88
89 eo_shutdown();
90}
91END_TEST
92
60void eo_test_class_behaviour_errors(TCase *tc) 93void eo_test_class_behaviour_errors(TCase *tc)
61{ 94{
62 tcase_add_test(tc, eo_destructor_unref); 95 tcase_add_test(tc, eo_destructor_unref);
96 tcase_add_test(tc, eo_destructor_double_del);
63} 97}