summaryrefslogtreecommitdiff
path: root/src/tests/eo
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-03-27 13:51:13 -0400
committerStefan Schmidt <stefan@osg.samsung.com>2018-04-05 11:10:26 +0200
commit624925fe6e9c72c639d47135d5ea70d4110ac1fe (patch)
treeb57c12a611bf3b4b492327a7fcb5722cd39dad5b /src/tests/eo
parent730020c7d4a87daf60cbfbb3a0a912b4f75d8cb5 (diff)
tests: move to using checked fixtures for all test suites
individual tests should not need to explicitly call init/shutdown functions in most cases, and many did not properly do this anyway see followup commit which resolves some issues with eina tests ref T6813 ref T6811 Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Diffstat (limited to 'src/tests/eo')
-rw-r--r--src/tests/eo/suite/eo_suite.c13
-rw-r--r--src/tests/eo/suite/eo_test_call_errors.c8
-rw-r--r--src/tests/eo/suite/eo_test_class_behaviour_errors.c4
-rw-r--r--src/tests/eo/suite/eo_test_class_errors.c12
-rw-r--r--src/tests/eo/suite/eo_test_event.c6
-rw-r--r--src/tests/eo/suite/eo_test_general.c50
-rw-r--r--src/tests/eo/suite/eo_test_init.c4
-rw-r--r--src/tests/eo/suite/eo_test_threaded_calls.c2
-rw-r--r--src/tests/eo/suite/eo_test_value.c2
9 files changed, 12 insertions, 89 deletions
diff --git a/src/tests/eo/suite/eo_suite.c b/src/tests/eo/suite/eo_suite.c
index a9e6cc7444..58b01ac706 100644
--- a/src/tests/eo/suite/eo_suite.c
+++ b/src/tests/eo/suite/eo_suite.c
@@ -4,6 +4,7 @@
4 4
5#include "eo_suite.h" 5#include "eo_suite.h"
6#include "../../efl_check.h" 6#include "../../efl_check.h"
7#include <Eo.h>
7 8
8static const Efl_Test_Case etc[] = { 9static const Efl_Test_Case etc[] = {
9 { "Eo init", eo_test_init }, 10 { "Eo init", eo_test_init },
@@ -17,6 +18,16 @@ static const Efl_Test_Case etc[] = {
17 { NULL, NULL } 18 { NULL, NULL }
18}; 19};
19 20
21SUITE_INIT(efl_object)
22{
23 ck_assert_int_eq(efl_object_init(), 1);
24}
25
26SUITE_SHUTDOWN(efl_object)
27{
28 ck_assert_int_eq(efl_object_shutdown(), 0);
29}
30
20int 31int
21main(int argc, char **argv) 32main(int argc, char **argv)
22{ 33{
@@ -30,7 +41,7 @@ main(int argc, char **argv)
30#endif 41#endif
31 42
32 failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1, 43 failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
33 "Eo", etc); 44 "Eo", etc, SUITE_INIT_FN(efl_object), SUITE_SHUTDOWN_FN(efl_object));
34 45
35 return (failed_count == 0) ? 0 : 255; 46 return (failed_count == 0) ? 0 : 255;
36} 47}
diff --git a/src/tests/eo/suite/eo_test_call_errors.c b/src/tests/eo/suite/eo_test_call_errors.c
index 83d6eaac2b..5a737a415d 100644
--- a/src/tests/eo/suite/eo_test_call_errors.c
+++ b/src/tests/eo/suite/eo_test_call_errors.c
@@ -14,7 +14,6 @@ static struct log_ctx ctx;
14 14
15EFL_START_TEST(eo_pure_virtual_fct_call) 15EFL_START_TEST(eo_pure_virtual_fct_call)
16{ 16{
17 efl_object_init();
18 eina_log_print_cb_set(eo_test_print_cb, &ctx); 17 eina_log_print_cb_set(eo_test_print_cb, &ctx);
19 18
20 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL); 19 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
@@ -26,13 +25,11 @@ EFL_START_TEST(eo_pure_virtual_fct_call)
26 25
27 efl_unref(obj); 26 efl_unref(obj);
28 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL); 27 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL);
29 efl_object_shutdown();
30} 28}
31EFL_END_TEST 29EFL_END_TEST
32 30
33EFL_START_TEST(eo_api_not_implemented_call) 31EFL_START_TEST(eo_api_not_implemented_call)
34{ 32{
35 efl_object_init();
36 eina_log_print_cb_set(eo_test_print_cb, &ctx); 33 eina_log_print_cb_set(eo_test_print_cb, &ctx);
37 34
38 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL); 35 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
@@ -44,13 +41,11 @@ EFL_START_TEST(eo_api_not_implemented_call)
44 41
45 efl_unref(obj); 42 efl_unref(obj);
46 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL); 43 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL);
47 efl_object_shutdown();
48} 44}
49EFL_END_TEST 45EFL_END_TEST
50 46
51EFL_START_TEST(eo_op_not_found_in_super) 47EFL_START_TEST(eo_op_not_found_in_super)
52{ 48{
53 efl_object_init();
54 eina_log_print_cb_set(eo_test_print_cb, &ctx); 49 eina_log_print_cb_set(eo_test_print_cb, &ctx);
55 50
56 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL); 51 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
@@ -62,7 +57,6 @@ EFL_START_TEST(eo_op_not_found_in_super)
62 57
63 efl_unref(obj); 58 efl_unref(obj);
64 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL); 59 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL);
65 efl_object_shutdown();
66} 60}
67EFL_END_TEST 61EFL_END_TEST
68 62
@@ -112,7 +106,6 @@ EFL_DEFINE_CLASS(simple_errorcase_class_get, &errorcase_class_desc, EO_CLASS, NU
112 106
113EFL_START_TEST(eo_fallbackcall_execute) 107EFL_START_TEST(eo_fallbackcall_execute)
114{ 108{
115 efl_object_init();
116 109
117 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL); 110 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
118 111
@@ -124,7 +117,6 @@ EFL_START_TEST(eo_fallbackcall_execute)
124 simple_error_test(obj); 117 simple_error_test(obj);
125 ck_assert_int_eq(fallback_called, 1); 118 ck_assert_int_eq(fallback_called, 1);
126 119
127 efl_object_shutdown();
128} 120}
129EFL_END_TEST 121EFL_END_TEST
130 122
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 22591cb578..df370a1cd4 100644
--- a/src/tests/eo/suite/eo_test_class_behaviour_errors.c
+++ b/src/tests/eo/suite/eo_test_class_behaviour_errors.c
@@ -34,7 +34,6 @@ _destructor_unref_class_initializer(Efl_Class *klass2)
34 34
35EFL_START_TEST(efl_destructor_unref) 35EFL_START_TEST(efl_destructor_unref)
36{ 36{
37 efl_object_init();
38 eina_log_print_cb_set(eo_test_print_cb, &ctx); 37 eina_log_print_cb_set(eo_test_print_cb, &ctx);
39 38
40 static Efl_Class_Description class_desc = { 39 static Efl_Class_Description class_desc = {
@@ -58,13 +57,11 @@ EFL_START_TEST(efl_destructor_unref)
58 57
59 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL); 58 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL);
60 59
61 efl_object_shutdown();
62} 60}
63EFL_END_TEST 61EFL_END_TEST
64 62
65EFL_START_TEST(efl_destructor_double_del) 63EFL_START_TEST(efl_destructor_double_del)
66{ 64{
67 efl_object_init();
68 eina_log_print_cb_set(eo_test_print_cb, &ctx); 65 eina_log_print_cb_set(eo_test_print_cb, &ctx);
69 66
70 static Efl_Class_Description class_desc = { 67 static Efl_Class_Description class_desc = {
@@ -90,7 +87,6 @@ EFL_START_TEST(efl_destructor_double_del)
90 87
91 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL); 88 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL);
92 89
93 efl_object_shutdown();
94} 90}
95EFL_END_TEST 91EFL_END_TEST
96 92
diff --git a/src/tests/eo/suite/eo_test_class_errors.c b/src/tests/eo/suite/eo_test_class_errors.c
index e4d9e77954..a5052196c7 100644
--- a/src/tests/eo/suite/eo_test_class_errors.c
+++ b/src/tests/eo/suite/eo_test_class_errors.c
@@ -14,7 +14,6 @@ static struct log_ctx ctx;
14 14
15EFL_START_TEST(eo_inherit_errors) 15EFL_START_TEST(eo_inherit_errors)
16{ 16{
17 efl_object_init();
18 eina_log_print_cb_set(eo_test_print_cb, &ctx); 17 eina_log_print_cb_set(eo_test_print_cb, &ctx);
19 18
20 const Efl_Class *klass; 19 const Efl_Class *klass;
@@ -72,13 +71,11 @@ EFL_START_TEST(eo_inherit_errors)
72 (void) klass; 71 (void) klass;
73 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL); 72 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL);
74 73
75 efl_object_shutdown();
76} 74}
77EFL_END_TEST 75EFL_END_TEST
78 76
79EFL_START_TEST(eo_inconsistent_mro) 77EFL_START_TEST(eo_inconsistent_mro)
80{ 78{
81 efl_object_init();
82 eina_log_print_cb_set(eo_test_print_cb, &ctx); 79 eina_log_print_cb_set(eo_test_print_cb, &ctx);
83 80
84 const Efl_Class *klass; 81 const Efl_Class *klass;
@@ -148,7 +145,6 @@ EFL_START_TEST(eo_inconsistent_mro)
148 145
149 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL); 146 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL);
150 147
151 efl_object_shutdown();
152} 148}
153EFL_END_TEST 149EFL_END_TEST
154 150
@@ -156,7 +152,6 @@ static void _stub_class_constructor(Efl_Class *klass EINA_UNUSED) {}
156 152
157EFL_START_TEST(eo_bad_interface) 153EFL_START_TEST(eo_bad_interface)
158{ 154{
159 efl_object_init();
160 eina_log_print_cb_set(eo_test_safety_print_cb, &ctx); 155 eina_log_print_cb_set(eo_test_safety_print_cb, &ctx);
161 156
162 const Efl_Class *klass; 157 const Efl_Class *klass;
@@ -195,7 +190,6 @@ EFL_START_TEST(eo_bad_interface)
195 190
196 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL); 191 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL);
197 192
198 efl_object_shutdown();
199} 193}
200EFL_END_TEST 194EFL_END_TEST
201 195
@@ -214,7 +208,6 @@ _null_class_initializer(Efl_Class *klass)
214 208
215EFL_START_TEST(eo_null_api) 209EFL_START_TEST(eo_null_api)
216{ 210{
217 efl_object_init();
218 eina_log_print_cb_set(eo_test_print_cb, &ctx); 211 eina_log_print_cb_set(eo_test_print_cb, &ctx);
219 212
220 const Efl_Class *klass; 213 const Efl_Class *klass;
@@ -236,7 +229,6 @@ EFL_START_TEST(eo_null_api)
236 229
237 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL); 230 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL);
238 231
239 efl_object_shutdown();
240} 232}
241EFL_END_TEST 233EFL_END_TEST
242 234
@@ -253,7 +245,6 @@ _redefined_class_initializer(Efl_Class *klass)
253 245
254EFL_START_TEST(eo_api_redefined) 246EFL_START_TEST(eo_api_redefined)
255{ 247{
256 efl_object_init();
257 eina_log_print_cb_set(eo_test_print_cb, &ctx); 248 eina_log_print_cb_set(eo_test_print_cb, &ctx);
258 249
259 const Efl_Class *klass; 250 const Efl_Class *klass;
@@ -275,7 +266,6 @@ EFL_START_TEST(eo_api_redefined)
275 266
276 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL); 267 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL);
277 268
278 efl_object_shutdown();
279} 269}
280EFL_END_TEST 270EFL_END_TEST
281 271
@@ -292,7 +282,6 @@ _dich_func_class_initializer(Efl_Class *klass)
292 282
293EFL_START_TEST(eo_dich_func_override) 283EFL_START_TEST(eo_dich_func_override)
294{ 284{
295 efl_object_init();
296 eina_log_print_cb_set(eo_test_print_cb, &ctx); 285 eina_log_print_cb_set(eo_test_print_cb, &ctx);
297 286
298 const Efl_Class *klass; 287 const Efl_Class *klass;
@@ -314,7 +303,6 @@ EFL_START_TEST(eo_dich_func_override)
314 303
315 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL); 304 eina_log_print_cb_set(eina_log_print_cb_stderr, NULL);
316 305
317 efl_object_shutdown();
318} 306}
319EFL_END_TEST 307EFL_END_TEST
320 308
diff --git a/src/tests/eo/suite/eo_test_event.c b/src/tests/eo/suite/eo_test_event.c
index 7adc7fd29e..9694ba3a76 100644
--- a/src/tests/eo/suite/eo_test_event.c
+++ b/src/tests/eo/suite/eo_test_event.c
@@ -60,7 +60,6 @@ _cb1(void *data, const Efl_Event *event)
60EFL_START_TEST(eo_event) 60EFL_START_TEST(eo_event)
61{ 61{
62 Test_Data data; 62 Test_Data data;
63 efl_object_init();
64 Eo *obj; 63 Eo *obj;
65 64
66 obj = efl_add_ref(efl_test_event_class_get(), NULL); 65 obj = efl_add_ref(efl_test_event_class_get(), NULL);
@@ -79,7 +78,6 @@ EFL_START_TEST(eo_event)
79 ck_assert_int_ne(data.event2, 0); 78 ck_assert_int_ne(data.event2, 0);
80 ck_assert_int_ne(data.event3, 0); 79 ck_assert_int_ne(data.event3, 0);
81 80
82 efl_object_shutdown();
83} 81}
84EFL_END_TEST 82EFL_END_TEST
85 83
@@ -120,7 +118,6 @@ _cb_rec_1(void *data, const Efl_Event *event)
120EFL_START_TEST(eo_event_call_in_call) 118EFL_START_TEST(eo_event_call_in_call)
121{ 119{
122 Test_Data data; 120 Test_Data data;
123 efl_object_init();
124 Eo *obj; 121 Eo *obj;
125 122
126 obj = efl_add_ref(efl_test_event_class_get(), NULL); 123 obj = efl_add_ref(efl_test_event_class_get(), NULL);
@@ -132,7 +129,6 @@ EFL_START_TEST(eo_event_call_in_call)
132 ck_assert_int_ne(data.event2, 0); 129 ck_assert_int_ne(data.event2, 0);
133 ck_assert_int_ne(data.event3, 0); 130 ck_assert_int_ne(data.event3, 0);
134 131
135 efl_object_shutdown();
136} 132}
137EFL_END_TEST 133EFL_END_TEST
138 134
@@ -164,7 +160,6 @@ _generation_clamp_step1(void *data EINA_UNUSED, const Efl_Event *e)
164 160
165EFL_START_TEST(eo_event_generation_bug) 161EFL_START_TEST(eo_event_generation_bug)
166{ 162{
167 efl_object_init();
168 163
169 /* 164 /*
170 * The idea is: 165 * The idea is:
@@ -187,7 +182,6 @@ EFL_START_TEST(eo_event_generation_bug)
187 182
188 ck_assert_int_ne(emitted, 0); 183 ck_assert_int_ne(emitted, 0);
189 184
190 efl_object_shutdown();
191} 185}
192EFL_END_TEST 186EFL_END_TEST
193 187
diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c
index a52935a9aa..e142704ad1 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -21,7 +21,6 @@
21 21
22EFL_START_TEST(eo_simple) 22EFL_START_TEST(eo_simple)
23{ 23{
24 efl_object_init();
25 Eo *obj = efl_add_ref(EO_CLASS, NULL); 24 Eo *obj = efl_add_ref(EO_CLASS, NULL);
26 fail_if(obj); 25 fail_if(obj);
27 26
@@ -31,13 +30,11 @@ EFL_START_TEST(eo_simple)
31 efl_destructor(obj); 30 efl_destructor(obj);
32 efl_unref(obj); 31 efl_unref(obj);
33 32
34 efl_object_shutdown();
35} 33}
36EFL_END_TEST 34EFL_END_TEST
37 35
38EFL_START_TEST(eo_singleton) 36EFL_START_TEST(eo_singleton)
39{ 37{
40 efl_object_init();
41 38
42 Eo *obj = efl_add_ref(SINGLETON_CLASS, NULL); 39 Eo *obj = efl_add_ref(SINGLETON_CLASS, NULL);
43 fail_if(!obj); 40 fail_if(!obj);
@@ -50,7 +47,6 @@ EFL_START_TEST(eo_singleton)
50 efl_unref(obj); 47 efl_unref(obj);
51 efl_unref(obj2); 48 efl_unref(obj2);
52 49
53 efl_object_shutdown();
54} 50}
55EFL_END_TEST 51EFL_END_TEST
56 52
@@ -70,7 +66,6 @@ _simple_obj_override_a_double_set(Eo *obj, void *class_data EINA_UNUSED, int a)
70 66
71EFL_START_TEST(efl_object_override_tests) 67EFL_START_TEST(efl_object_override_tests)
72{ 68{
73 efl_object_init();
74 69
75 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL); 70 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
76 fail_if(!obj); 71 fail_if(!obj);
@@ -133,7 +128,6 @@ EFL_START_TEST(efl_object_override_tests)
133 128
134 efl_unref(obj); 129 efl_unref(obj);
135 130
136 efl_object_shutdown();
137} 131}
138EFL_END_TEST 132EFL_END_TEST
139 133
@@ -199,7 +193,6 @@ EFL_CALLBACKS_ARRAY_DEFINE(_eo_signals_callbacks,
199 193
200EFL_START_TEST(eo_signals) 194EFL_START_TEST(eo_signals)
201{ 195{
202 efl_object_init();
203 196
204 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL); 197 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
205 Eina_Bool r; 198 Eina_Bool r;
@@ -280,13 +273,11 @@ EFL_START_TEST(eo_signals)
280 } 273 }
281 efl_unref(obj); 274 efl_unref(obj);
282 275
283 efl_object_shutdown();
284} 276}
285EFL_END_TEST 277EFL_END_TEST
286 278
287EFL_START_TEST(efl_data_fetch) 279EFL_START_TEST(efl_data_fetch)
288{ 280{
289 efl_object_init();
290 281
291 /* Usually should be const, not const only for the test... */ 282 /* Usually should be const, not const only for the test... */
292 static Efl_Class_Description class_desc = { 283 static Efl_Class_Description class_desc = {
@@ -319,13 +310,11 @@ EFL_START_TEST(efl_data_fetch)
319 fail_if(!efl_data_scope_get(obj, EFL_OBJECT_CLASS)); 310 fail_if(!efl_data_scope_get(obj, EFL_OBJECT_CLASS));
320 efl_unref(obj); 311 efl_unref(obj);
321 312
322 efl_object_shutdown();
323} 313}
324EFL_END_TEST 314EFL_END_TEST
325 315
326EFL_START_TEST(efl_data_safe_fetch) 316EFL_START_TEST(efl_data_safe_fetch)
327{ 317{
328 efl_object_init();
329 318
330 Eo *obj = efl_add_ref(SIMPLE2_CLASS, NULL); 319 Eo *obj = efl_add_ref(SIMPLE2_CLASS, NULL);
331 fail_if(!obj || !efl_data_scope_safe_get(obj, SIMPLE2_CLASS)); 320 fail_if(!obj || !efl_data_scope_safe_get(obj, SIMPLE2_CLASS));
@@ -343,13 +332,11 @@ EFL_START_TEST(efl_data_safe_fetch)
343 efl_unref(obj); 332 efl_unref(obj);
344 fail_if(efl_data_scope_safe_get(obj, SIMPLE3_CLASS) != NULL); 333 fail_if(efl_data_scope_safe_get(obj, SIMPLE3_CLASS) != NULL);
345 334
346 efl_object_shutdown();
347} 335}
348EFL_END_TEST 336EFL_END_TEST
349 337
350EFL_START_TEST(efl_isa_tests) 338EFL_START_TEST(efl_isa_tests)
351{ 339{
352 efl_object_init();
353 340
354 const Efl_Class *klass, *iface, *mixin; 341 const Efl_Class *klass, *iface, *mixin;
355 342
@@ -419,14 +406,12 @@ EFL_START_TEST(efl_isa_tests)
419 fail_if(!efl_isa(obj, EO_CLASS)); 406 fail_if(!efl_isa(obj, EO_CLASS));
420 efl_unref(obj); 407 efl_unref(obj);
421 408
422 efl_object_shutdown();
423} 409}
424EFL_END_TEST 410EFL_END_TEST
425 411
426 412
427EFL_START_TEST(efl_composite_tests) 413EFL_START_TEST(efl_composite_tests)
428{ 414{
429 efl_object_init();
430 415
431 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL); 416 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
432 fail_if(!obj); 417 fail_if(!obj);
@@ -452,7 +437,6 @@ EFL_START_TEST(efl_composite_tests)
452 437
453 efl_unref(obj); 438 efl_unref(obj);
454 439
455 efl_object_shutdown();
456} 440}
457EFL_END_TEST 441EFL_END_TEST
458 442
@@ -489,7 +473,6 @@ _class_initializer(Efl_Class *klass)
489 473
490EFL_START_TEST(eo_man_free) 474EFL_START_TEST(eo_man_free)
491{ 475{
492 efl_object_init();
493 476
494 /* Usually should be const, not const only for the test... */ 477 /* Usually should be const, not const only for the test... */
495 static Efl_Class_Description class_desc = { 478 static Efl_Class_Description class_desc = {
@@ -564,13 +547,11 @@ EFL_START_TEST(eo_man_free)
564 efl_unref(obj); 547 efl_unref(obj);
565 fail_if(!efl_manual_free(obj)); 548 fail_if(!efl_manual_free(obj));
566 549
567 efl_object_shutdown();
568} 550}
569EFL_END_TEST 551EFL_END_TEST
570 552
571EFL_START_TEST(efl_refs) 553EFL_START_TEST(efl_refs)
572{ 554{
573 efl_object_init();
574 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL); 555 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
575 Eo *obj2 = efl_add_ref(SIMPLE_CLASS, NULL); 556 Eo *obj2 = efl_add_ref(SIMPLE_CLASS, NULL);
576 Eo *obj3 = efl_add_ref(SIMPLE_CLASS, NULL); 557 Eo *obj3 = efl_add_ref(SIMPLE_CLASS, NULL);
@@ -697,13 +678,11 @@ EFL_START_TEST(efl_refs)
697 efl_del(obj2); 678 efl_del(obj2);
698 efl_unref(obj); 679 efl_unref(obj);
699 680
700 efl_object_shutdown();
701} 681}
702EFL_END_TEST 682EFL_END_TEST
703 683
704EFL_START_TEST(efl_weak_reference) 684EFL_START_TEST(efl_weak_reference)
705{ 685{
706 efl_object_init();
707 686
708 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL); 687 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
709 Eo *obj2 = efl_add_ref(SIMPLE_CLASS, NULL); 688 Eo *obj2 = efl_add_ref(SIMPLE_CLASS, NULL);
@@ -768,13 +747,11 @@ EFL_START_TEST(efl_weak_reference)
768 efl_unref(obj2); 747 efl_unref(obj2);
769 748
770 749
771 efl_object_shutdown();
772} 750}
773EFL_END_TEST 751EFL_END_TEST
774 752
775EFL_START_TEST(eo_generic_data) 753EFL_START_TEST(eo_generic_data)
776{ 754{
777 efl_object_init();
778 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL); 755 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
779 Eo *obj2 = efl_add_ref(SIMPLE_CLASS, NULL); 756 Eo *obj2 = efl_add_ref(SIMPLE_CLASS, NULL);
780 Eo *obj3 = efl_add_ref(SIMPLE_CLASS, NULL); 757 Eo *obj3 = efl_add_ref(SIMPLE_CLASS, NULL);
@@ -941,7 +918,6 @@ EFL_START_TEST(eo_generic_data)
941 efl_unref(obj2); 918 efl_unref(obj2);
942 efl_unref(obj3); 919 efl_unref(obj3);
943 920
944 efl_object_shutdown();
945} 921}
946EFL_END_TEST 922EFL_END_TEST
947 923
@@ -950,7 +926,6 @@ EFL_START_TEST(eo_magic_checks)
950{ 926{
951 char _buf[sizeof(long)]; /* Just enough to hold eina magic + a bit more. */ 927 char _buf[sizeof(long)]; /* Just enough to hold eina magic + a bit more. */
952 char *buf = _buf; 928 char *buf = _buf;
953 efl_object_init();
954 929
955 memset(_buf, 1, sizeof(_buf)); 930 memset(_buf, 1, sizeof(_buf));
956 931
@@ -1033,7 +1008,6 @@ EFL_START_TEST(eo_magic_checks)
1033 buf = NULL; 1008 buf = NULL;
1034 } 1009 }
1035 1010
1036 efl_object_shutdown();
1037} 1011}
1038EFL_END_TEST 1012EFL_END_TEST
1039 1013
@@ -1061,7 +1035,6 @@ _multi_class_initializer(Efl_Class *klass)
1061 1035
1062EFL_START_TEST(efl_func_resolve) 1036EFL_START_TEST(efl_func_resolve)
1063{ 1037{
1064 efl_object_init();
1065 1038
1066 /* Usually should be const, not const only for the test... */ 1039 /* Usually should be const, not const only for the test... */
1067 static Efl_Class_Description class_desc = { 1040 static Efl_Class_Description class_desc = {
@@ -1093,7 +1066,6 @@ EFL_START_TEST(efl_func_resolve)
1093 fail_if(!efl_destructed_is(obj)); 1066 fail_if(!efl_destructed_is(obj));
1094 efl_manual_free(obj); 1067 efl_manual_free(obj);
1095 1068
1096 efl_object_shutdown();
1097} 1069}
1098EFL_END_TEST 1070EFL_END_TEST
1099 1071
@@ -1101,7 +1073,6 @@ EFL_START_TEST(efl_add_do_and_custom)
1101{ 1073{
1102 Simple_Public_Data *pd = NULL; 1074 Simple_Public_Data *pd = NULL;
1103 Eo *obj = NULL; 1075 Eo *obj = NULL;
1104 efl_object_init();
1105 1076
1106 obj = efl_add_ref(SIMPLE_CLASS, NULL, efl_constructor(efl_added)); 1077 obj = efl_add_ref(SIMPLE_CLASS, NULL, efl_constructor(efl_added));
1107 fail_if(!obj); 1078 fail_if(!obj);
@@ -1127,14 +1098,12 @@ EFL_START_TEST(efl_add_do_and_custom)
1127 fail_if(!finalized); 1098 fail_if(!finalized);
1128 efl_unref(obj); 1099 efl_unref(obj);
1129 1100
1130 efl_object_shutdown();
1131} 1101}
1132EFL_END_TEST 1102EFL_END_TEST
1133 1103
1134EFL_START_TEST(eo_pointers_indirection) 1104EFL_START_TEST(eo_pointers_indirection)
1135{ 1105{
1136#ifdef HAVE_EO_ID 1106#ifdef HAVE_EO_ID
1137 efl_object_init();
1138 1107
1139 static const Efl_Class_Description class_desc = { 1108 static const Efl_Class_Description class_desc = {
1140 EO_VERSION, 1109 EO_VERSION,
@@ -1213,7 +1182,6 @@ EFL_START_TEST(eo_pointers_indirection)
1213 efl_unref(objs[0]); 1182 efl_unref(objs[0]);
1214 free(objs); 1183 free(objs);
1215 1184
1216 efl_object_shutdown();
1217#endif 1185#endif
1218} 1186}
1219EFL_END_TEST 1187EFL_END_TEST
@@ -1237,7 +1205,6 @@ _add_failures_class_initializer(Efl_Class *klass)
1237 1205
1238EFL_START_TEST(efl_add_failures) 1206EFL_START_TEST(efl_add_failures)
1239{ 1207{
1240 efl_object_init();
1241 1208
1242 static const Efl_Class_Description class_desc = { 1209 static const Efl_Class_Description class_desc = {
1243 EO_VERSION, 1210 EO_VERSION,
@@ -1255,7 +1222,6 @@ EFL_START_TEST(efl_add_failures)
1255 1222
1256 fail_if(obj); 1223 fail_if(obj);
1257 1224
1258 efl_object_shutdown();
1259} 1225}
1260EFL_END_TEST 1226EFL_END_TEST
1261 1227
@@ -1280,7 +1246,6 @@ _del_intercept_reuse(Eo *obj)
1280EFL_START_TEST(efl_del_intercept) 1246EFL_START_TEST(efl_del_intercept)
1281{ 1247{
1282#ifdef HAVE_EO_ID 1248#ifdef HAVE_EO_ID
1283 efl_object_init();
1284 1249
1285 static const Efl_Class_Description class_desc = { 1250 static const Efl_Class_Description class_desc = {
1286 EO_VERSION, 1251 EO_VERSION,
@@ -1330,14 +1295,12 @@ EFL_START_TEST(efl_del_intercept)
1330 ck_assert_int_eq(efl_ref_count(obj), 1); 1295 ck_assert_int_eq(efl_ref_count(obj), 1);
1331 efl_unref(obj); 1296 efl_unref(obj);
1332 1297
1333 efl_object_shutdown();
1334#endif 1298#endif
1335} 1299}
1336EFL_END_TEST 1300EFL_END_TEST
1337 1301
1338EFL_START_TEST(efl_name) 1302EFL_START_TEST(efl_name)
1339{ 1303{
1340 efl_object_init();
1341 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL); 1304 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
1342 Eo *obj2 = efl_add_ref(SIMPLE_CLASS, NULL); 1305 Eo *obj2 = efl_add_ref(SIMPLE_CLASS, NULL);
1343 Eo *obj3 = efl_add_ref(SIMPLE_CLASS, NULL); 1306 Eo *obj3 = efl_add_ref(SIMPLE_CLASS, NULL);
@@ -1388,13 +1351,11 @@ EFL_START_TEST(efl_name)
1388 1351
1389 efl_unref(obj); 1352 efl_unref(obj);
1390 1353
1391 efl_object_shutdown();
1392} 1354}
1393EFL_END_TEST 1355EFL_END_TEST
1394 1356
1395EFL_START_TEST(eo_comment) 1357EFL_START_TEST(eo_comment)
1396{ 1358{
1397 efl_object_init();
1398 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL); 1359 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
1399 const char *comment; 1360 const char *comment;
1400 1361
@@ -1418,13 +1379,11 @@ EFL_START_TEST(eo_comment)
1418 1379
1419 efl_unref(obj); 1380 efl_unref(obj);
1420 1381
1421 efl_object_shutdown();
1422} 1382}
1423EFL_END_TEST 1383EFL_END_TEST
1424 1384
1425EFL_START_TEST(eo_rec_interface) 1385EFL_START_TEST(eo_rec_interface)
1426{ 1386{
1427 efl_object_init();
1428 Eo *s = efl_add_ref(SEARCHABLE_CLASS, NULL); 1387 Eo *s = efl_add_ref(SEARCHABLE_CLASS, NULL);
1429 Eo *obj = efl_add(SIMPLE_CLASS, s); 1388 Eo *obj = efl_add(SIMPLE_CLASS, s);
1430 Eo *obj2 = efl_add(SIMPLE_CLASS, obj); 1389 Eo *obj2 = efl_add(SIMPLE_CLASS, obj);
@@ -1435,7 +1394,6 @@ EFL_START_TEST(eo_rec_interface)
1435 1394
1436 efl_del(obj); 1395 efl_del(obj);
1437 1396
1438 efl_object_shutdown();
1439} 1397}
1440EFL_END_TEST 1398EFL_END_TEST
1441 1399
@@ -1535,7 +1493,6 @@ EFL_START_TEST(eo_domain)
1535 Eo *obj, *objs; 1493 Eo *obj, *objs;
1536 1494
1537 printf("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"); 1495 printf("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
1538 efl_object_init();
1539 1496
1540#ifndef _WIN32 1497#ifndef _WIN32
1541 signal(SIGALRM, _timeout); 1498 signal(SIGALRM, _timeout);
@@ -1613,7 +1570,6 @@ EFL_START_TEST(eo_domain)
1613 efl_unref(obj); 1570 efl_unref(obj);
1614 efl_unref(objs); 1571 efl_unref(objs);
1615 1572
1616 efl_object_shutdown();
1617 printf("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"); 1573 printf("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
1618 1574
1619#ifndef _WIN32 1575#ifndef _WIN32
@@ -1654,7 +1610,6 @@ _cast_inherit_class_initializer_2(Efl_Class *klass)
1654 1610
1655EFL_START_TEST(efl_cast_test) 1611EFL_START_TEST(efl_cast_test)
1656{ 1612{
1657 efl_object_init();
1658 1613
1659 static const Efl_Class_Description class_desc_1 = { 1614 static const Efl_Class_Description class_desc_1 = {
1660 EO_VERSION, 1615 EO_VERSION,
@@ -1715,7 +1670,6 @@ EFL_START_TEST(efl_cast_test)
1715 ck_assert_int_eq(inherit_value(efl_cast(obj, SIMPLE_CLASS)), 0); 1670 ck_assert_int_eq(inherit_value(efl_cast(obj, SIMPLE_CLASS)), 0);
1716 efl_unref(obj); 1671 efl_unref(obj);
1717 1672
1718 efl_object_shutdown();
1719} 1673}
1720EFL_END_TEST 1674EFL_END_TEST
1721 1675
@@ -1742,7 +1696,6 @@ EFL_START_TEST(efl_object_destruct_test)
1742 int var = 0; 1696 int var = 0;
1743 Eo *obj; 1697 Eo *obj;
1744 1698
1745 efl_object_init();
1746 1699
1747 obj = efl_add_ref(SIMPLE_CLASS, NULL); 1700 obj = efl_add_ref(SIMPLE_CLASS, NULL);
1748 fail_if(efl_ref_count(obj) != 1); 1701 fail_if(efl_ref_count(obj) != 1);
@@ -1753,7 +1706,6 @@ EFL_START_TEST(efl_object_destruct_test)
1753 // var should be 2 if del then destruct, 0 otherwise 1706 // var should be 2 if del then destruct, 0 otherwise
1754 ck_assert_int_eq(var, 2); 1707 ck_assert_int_eq(var, 2);
1755 1708
1756 efl_object_shutdown();
1757} 1709}
1758EFL_END_TEST 1710EFL_END_TEST
1759 1711
@@ -1768,7 +1720,6 @@ EFL_START_TEST(efl_object_auto_unref_test)
1768 int _auto_unref_del; 1720 int _auto_unref_del;
1769 Eo *obj, *parent; 1721 Eo *obj, *parent;
1770 1722
1771 efl_object_init();
1772 1723
1773 // Test unref after valid call 1724 // Test unref after valid call
1774 _auto_unref_del = 0; 1725 _auto_unref_del = 0;
@@ -1806,7 +1757,6 @@ EFL_START_TEST(efl_object_auto_unref_test)
1806 fail_if(!_auto_unref_del); 1757 fail_if(!_auto_unref_del);
1807 efl_unref(parent); 1758 efl_unref(parent);
1808 1759
1809 efl_object_shutdown();
1810} 1760}
1811EFL_END_TEST 1761EFL_END_TEST
1812 1762
diff --git a/src/tests/eo/suite/eo_test_init.c b/src/tests/eo/suite/eo_test_init.c
index 31e16d2099..cee49211e1 100644
--- a/src/tests/eo/suite/eo_test_init.c
+++ b/src/tests/eo/suite/eo_test_init.c
@@ -10,9 +10,7 @@
10EFL_START_TEST(eo_test_simple) 10EFL_START_TEST(eo_test_simple)
11{ 11{
12 fail_if(!efl_object_init()); /* one init by test suite */ 12 fail_if(!efl_object_init()); /* one init by test suite */
13 fail_if(!efl_object_init());
14 fail_if(!efl_object_shutdown()); 13 fail_if(!efl_object_shutdown());
15 fail_if(efl_object_shutdown());
16} 14}
17EFL_END_TEST 15EFL_END_TEST
18 16
@@ -20,7 +18,6 @@ EFL_START_TEST(eo_test_init_shutdown)
20{ 18{
21 Eo *obj; 19 Eo *obj;
22 20
23 fail_if(!efl_object_init());
24 ck_assert_str_eq("Efl.Object", efl_class_name_get(EFL_OBJECT_CLASS)); 21 ck_assert_str_eq("Efl.Object", efl_class_name_get(EFL_OBJECT_CLASS));
25 22
26 /* XXX-1: Essential for the next test to assign the wrong op. */ 23 /* XXX-1: Essential for the next test to assign the wrong op. */
@@ -38,7 +35,6 @@ EFL_START_TEST(eo_test_init_shutdown)
38 35
39 /* XXX-1: Verify that the op was not cached. */ 36 /* XXX-1: Verify that the op was not cached. */
40 ck_assert_int_eq(0xBEEF, simple2_class_beef_get(SIMPLE2_CLASS)); 37 ck_assert_int_eq(0xBEEF, simple2_class_beef_get(SIMPLE2_CLASS));
41 fail_if(efl_object_shutdown());
42} 38}
43EFL_END_TEST 39EFL_END_TEST
44 40
diff --git a/src/tests/eo/suite/eo_test_threaded_calls.c b/src/tests/eo/suite/eo_test_threaded_calls.c
index 92d023c6dd..411eb4536f 100644
--- a/src/tests/eo/suite/eo_test_threaded_calls.c
+++ b/src/tests/eo/suite/eo_test_threaded_calls.c
@@ -115,7 +115,6 @@ EFL_START_TEST(eo_threaded_calls_test)
115{ 115{
116 Eina_Thread threads[2]; 116 Eina_Thread threads[2];
117 117
118 efl_object_init();
119 118
120 fail_if(!eina_spinlock_new(&locks[0])); 119 fail_if(!eina_spinlock_new(&locks[0]));
121 fail_if(!eina_spinlock_new(&locks[1])); 120 fail_if(!eina_spinlock_new(&locks[1]));
@@ -133,7 +132,6 @@ EFL_START_TEST(eo_threaded_calls_test)
133 eina_barrier_free(&barrier); 132 eina_barrier_free(&barrier);
134 eina_barrier_free(&barrier0); 133 eina_barrier_free(&barrier0);
135 134
136 efl_object_shutdown();
137} 135}
138EFL_END_TEST 136EFL_END_TEST
139 137
diff --git a/src/tests/eo/suite/eo_test_value.c b/src/tests/eo/suite/eo_test_value.c
index 36709a9043..515ae79d8e 100644
--- a/src/tests/eo/suite/eo_test_value.c
+++ b/src/tests/eo/suite/eo_test_value.c
@@ -11,7 +11,6 @@
11 11
12EFL_START_TEST(eo_value) 12EFL_START_TEST(eo_value)
13{ 13{
14 efl_object_init();
15 char *str, *str2; 14 char *str, *str2;
16 15
17 Eina_Value val2, eo_val; 16 Eina_Value val2, eo_val;
@@ -45,7 +44,6 @@ EFL_START_TEST(eo_value)
45 efl_dbg_info_free(eo_dbg_info); 44 efl_dbg_info_free(eo_dbg_info);
46 efl_unref(obj); 45 efl_unref(obj);
47 46
48 efl_object_shutdown();
49} 47}
50EFL_END_TEST 48EFL_END_TEST
51 49