summaryrefslogtreecommitdiff
path: root/src/tests/eo/suite/eo_test_class_simple.c
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-02-10 16:57:00 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-02-13 16:59:59 +0100
commit46885653bc0467f88042bb110fdc973b2258f69c (patch)
treec716b93474cbc0847c1e082298ae7314a0f16b26 /src/tests/eo/suite/eo_test_class_simple.c
parent37d2d378ec2e2d1f9a3941372ef4d818996291c7 (diff)
eo: remove class functions from eo
As in the previous commit explained, we want to get rid of class functions in eo, and make them just c functions right away. This commit removes the class parameter from the eo_class_function_set call, and adjusts the tests to not depend on class functions anymore. Class functions are now not tested anymore, tests that used them as a way to test *things* are adjusted to test them now with object functions, tests that just tested the working of class functions are dropped. This fixes T7675. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D7902
Diffstat (limited to 'src/tests/eo/suite/eo_test_class_simple.c')
-rw-r--r--src/tests/eo/suite/eo_test_class_simple.c31
1 files changed, 4 insertions, 27 deletions
diff --git a/src/tests/eo/suite/eo_test_class_simple.c b/src/tests/eo/suite/eo_test_class_simple.c
index 8d82b1eb11..fef3dd3ae5 100644
--- a/src/tests/eo/suite/eo_test_class_simple.c
+++ b/src/tests/eo/suite/eo_test_class_simple.c
@@ -58,14 +58,6 @@ _a_print(Eo *obj EINA_UNUSED, void *class_data)
58 return EINA_TRUE; 58 return EINA_TRUE;
59} 59}
60 60
61static Eina_Bool
62_class_hi_print(Efl_Class *klass, void *data EINA_UNUSED)
63{
64 printf("Hi Print %s\n", efl_class_name_get(klass));
65
66 return EINA_TRUE;
67}
68
69EFL_FUNC_BODYV(simple_part_get, Eo *, NULL, EFL_FUNC_CALL(name), const char *name); 61EFL_FUNC_BODYV(simple_part_get, Eo *, NULL, EFL_FUNC_CALL(name), const char *name);
70 62
71static Eo * 63static Eo *
@@ -102,7 +94,6 @@ _dbg_info_get(Eo *eo_obj, void *_pd EINA_UNUSED, Efl_Dbg_Info *root)
102EFL_VOID_FUNC_BODYV(simple_a_set, EFL_FUNC_CALL(a), int a); 94EFL_VOID_FUNC_BODYV(simple_a_set, EFL_FUNC_CALL(a), int a);
103EFL_FUNC_BODY(simple_a_get, int, 0); 95EFL_FUNC_BODY(simple_a_get, int, 0);
104EFL_FUNC_BODY(simple_a_print, Eina_Bool, EINA_FALSE); 96EFL_FUNC_BODY(simple_a_print, Eina_Bool, EINA_FALSE);
105EFL_FUNC_BODY_CONST(simple_class_hi_print, Eina_Bool, EINA_FALSE);
106EFL_VOID_FUNC_BODY(simple_pure_virtual); 97EFL_VOID_FUNC_BODY(simple_pure_virtual);
107EFL_VOID_FUNC_BODY(simple_no_implementation); 98EFL_VOID_FUNC_BODY(simple_no_implementation);
108 99
@@ -118,9 +109,6 @@ _class_initializer(Efl_Class *klass)
118 EFL_OBJECT_OP_FUNC(simple_pure_virtual, NULL), 109 EFL_OBJECT_OP_FUNC(simple_pure_virtual, NULL),
119 EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _dbg_info_get), 110 EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _dbg_info_get),
120 ); 111 );
121 EFL_OPS_DEFINE(cops,
122 EFL_OBJECT_OP_FUNC(simple_class_hi_print, _class_hi_print),
123 );
124 static const Efl_Object_Property_Reflection reflection_table[] = { 112 static const Efl_Object_Property_Reflection reflection_table[] = {
125 {"simple_a", _a_set_reflect, _a_get_reflect}, 113 {"simple_a", _a_set_reflect, _a_get_reflect},
126 }; 114 };
@@ -128,7 +116,7 @@ _class_initializer(Efl_Class *klass)
128 reflection_table, EINA_C_ARRAY_LENGTH(reflection_table) 116 reflection_table, EINA_C_ARRAY_LENGTH(reflection_table)
129 }; 117 };
130 118
131 return efl_class_functions_set(klass, &ops, &cops, &ref_ops); 119 return efl_class_functions_set(klass, &ops, &ref_ops);
132} 120}
133 121
134static const Efl_Class_Description class_desc = { 122static const Efl_Class_Description class_desc = {
@@ -142,24 +130,13 @@ static const Efl_Class_Description class_desc = {
142}; 130};
143 131
144EFL_DEFINE_CLASS(simple_class_get, &class_desc, EO_CLASS, NULL) 132EFL_DEFINE_CLASS(simple_class_get, &class_desc, EO_CLASS, NULL)
145
146
147static int
148_beef_get(Eo *obj EINA_UNUSED, void *class_data EINA_UNUSED)
149{
150 return 0xBEEF;
151}
152
153EFL_FUNC_BODY_CONST(simple2_class_beef_get, int, 0); 133EFL_FUNC_BODY_CONST(simple2_class_beef_get, int, 0);
154 134
155static Eina_Bool 135static Eina_Bool
156_class_initializer2(Efl_Class *klass) 136_class_initializer2(Efl_Class *klass)
157{ 137{
158 EFL_OPS_DEFINE(cops,
159 EFL_OBJECT_OP_FUNC(simple2_class_beef_get, _beef_get),
160 );
161 138
162 return efl_class_functions_set(klass, NULL, &cops, NULL); 139 return efl_class_functions_set(klass, NULL, NULL);
163} 140}
164 141
165static const Efl_Class_Description class_desc2 = { 142static const Efl_Class_Description class_desc2 = {
@@ -178,7 +155,7 @@ EFL_DEFINE_CLASS(simple2_class_get, &class_desc2, EO_CLASS, NULL)
178static Eina_Bool 155static Eina_Bool
179_class_initializer3(Efl_Class *klass) 156_class_initializer3(Efl_Class *klass)
180{ 157{
181 return efl_class_functions_set(klass, NULL, NULL, NULL); 158 return efl_class_functions_set(klass, NULL, NULL);
182} 159}
183 160
184static const Efl_Class_Description class_desc3 = { 161static const Efl_Class_Description class_desc3 = {
@@ -209,7 +186,7 @@ _searchable_class_initializer(Efl_Class *klass)
209 EFL_OBJECT_OP_FUNC(efl_provider_find, _interface_get) 186 EFL_OBJECT_OP_FUNC(efl_provider_find, _interface_get)
210 ); 187 );
211 188
212 return efl_class_functions_set(klass, &ops, NULL, NULL); 189 return efl_class_functions_set(klass, &ops, NULL);
213} 190}
214 191
215static const Efl_Class_Description class_desc_searchable = { 192static const Efl_Class_Description class_desc_searchable = {