summaryrefslogtreecommitdiff
path: root/src/tests/eolian_cxx/name1_name2_type_generation.c
diff options
context:
space:
mode:
authorVitor Sousa <vitorsousa@expertisesolutions.com.br>2019-07-08 16:15:41 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-07-08 16:15:41 +0200
commit2775534fda1ac3f7d938a84fd81c9b8b5358c6e8 (patch)
tree36239025bbf9e106d3fe92732238e999f21f1b4a /src/tests/eolian_cxx/name1_name2_type_generation.c
parent61f39eef49a93c266b217ec5a49dd12579046c8b (diff)
eolian_cxx: update tests to no longer use forbidden eolian notations
Summary: Update eolian_cxx tests in order to remove forbidden eolian notations. For tests with containers that support non-pointer types, change `ptr(int)` to `int`. For tests with containers that only support pointer types, change `ptr(int)` to `string`. Remove tests for features that are no longer meaningful with eolian new restrictions. Add a FIXME note to eina::range_array when used with eina::string_view. Reviewers: lauromoura, felipealmeida, q66 Reviewed By: q66 Subscribers: cedric, #reviewers, #committers, bu5hm4n, segfaultxavi Tags: #efl Differential Revision: https://phab.enlightenment.org/D9236
Diffstat (limited to 'src/tests/eolian_cxx/name1_name2_type_generation.c')
-rw-r--r--src/tests/eolian_cxx/name1_name2_type_generation.c129
1 files changed, 0 insertions, 129 deletions
diff --git a/src/tests/eolian_cxx/name1_name2_type_generation.c b/src/tests/eolian_cxx/name1_name2_type_generation.c
index 2517bcd..9b03b36 100644
--- a/src/tests/eolian_cxx/name1_name2_type_generation.c
+++ b/src/tests/eolian_cxx/name1_name2_type_generation.c
@@ -16,23 +16,6 @@ typedef struct _Type_Generation_Data Type_Generation_Data;
16 16
17#include "name1_name2_type_generation.eo.h" 17#include "name1_name2_type_generation.eo.h"
18 18
19void _name1_name2_type_generation_inrefint(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int* v EINA_UNUSED)
20{
21 ck_assert(*v == 42);
22}
23
24void _name1_name2_type_generation_inrefintown(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int* v EINA_UNUSED)
25{
26 ck_assert(*v == 42);
27 free(v);
28}
29
30void _name1_name2_type_generation_inrefintownfree(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int* v EINA_UNUSED)
31{
32 ck_assert(*v == 42);
33 free(v);
34}
35
36void _name1_name2_type_generation_invoidptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, void *v) 19void _name1_name2_type_generation_invoidptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, void *v)
37{ 20{
38 ck_assert(v == NULL); 21 ck_assert(v == NULL);
@@ -43,36 +26,6 @@ void _name1_name2_type_generation_inint(Eo *obj EINA_UNUSED, Type_Generation_Dat
43 ck_assert(v == 42); 26 ck_assert(v == 42);
44} 27}
45 28
46void _name1_name2_type_generation_inintptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int *v EINA_UNUSED)
47{
48 ck_assert(*v == 42);
49}
50
51void _name1_name2_type_generation_inintptrown(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int *v EINA_UNUSED)
52{
53 ck_assert(*v == 42);
54}
55
56void _name1_name2_type_generation_inintptrownptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int **v EINA_UNUSED)
57{
58 ck_assert(**v == 42);
59}
60
61void _name1_name2_type_generation_inintptrownptrptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int ***v EINA_UNUSED)
62{
63 ck_assert(***v == 42);
64}
65
66void _name1_name2_type_generation_inintptrptrownptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int ***v EINA_UNUSED)
67{
68 ck_assert(***v == 42);
69}
70
71void _name1_name2_type_generation_inintptrownfree(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int *v EINA_UNUSED)
72{
73 ck_assert(*v == 42);
74}
75
76void * _name1_name2_type_generation_returnvoidptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED) 29void * _name1_name2_type_generation_returnvoidptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
77{ 30{
78 static int i = 42; 31 static int i = 42;
@@ -126,48 +79,11 @@ void _name1_name2_type_generation_instringownptr(Eo *obj EINA_UNUSED, Type_Gener
126 free(v); 79 free(v);
127} 80}
128 81
129int* _name1_name2_type_generation_returnrefint(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
130{
131 static int i = 42;
132 return &i;
133}
134int _name1_name2_type_generation_returnint(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED) 82int _name1_name2_type_generation_returnint(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
135{ 83{
136 return 42; 84 return 42;
137} 85}
138 86
139int * _name1_name2_type_generation_returnintptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
140{
141 static int i = 42;
142 return &i;
143}
144
145int * _name1_name2_type_generation_returnintptrown(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
146{
147 int* i = malloc(sizeof(int));
148 *i = 42;
149 return i;
150}
151
152int ** _name1_name2_type_generation_returnintptrownptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
153{
154 return NULL;
155}
156
157int *** _name1_name2_type_generation_returnintptrownptrptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
158{
159 return NULL;
160}
161
162int *** _name1_name2_type_generation_returnintptrptrownptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
163{
164 return NULL;
165}
166
167void _name1_name2_type_generation_returnintptrownfree(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int *v EINA_UNUSED)
168{
169}
170
171const char * _name1_name2_type_generation_returnstring(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED) 87const char * _name1_name2_type_generation_returnstring(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
172{ 88{
173 return "foobar"; 89 return "foobar";
@@ -216,18 +132,6 @@ void _name1_name2_type_generation_outint(Eo *obj EINA_UNUSED, Type_Generation_Da
216{ 132{
217} 133}
218 134
219void _name1_name2_type_generation_outintptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int **v EINA_UNUSED)
220{
221}
222
223void _name1_name2_type_generation_outintptrown(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int **v EINA_UNUSED)
224{
225}
226
227void _name1_name2_type_generation_outintptrownfree(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int **v EINA_UNUSED)
228{
229}
230
231void _name1_name2_type_generation_outstringshare(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, Eina_Stringshare** v) 135void _name1_name2_type_generation_outstringshare(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, Eina_Stringshare** v)
232{ 136{
233 *v = eina_stringshare_add("foobar"); 137 *v = eina_stringshare_add("foobar");
@@ -258,18 +162,6 @@ void _name1_name2_type_generation_optionalinint(Eo *obj EINA_UNUSED, Type_Genera
258{ 162{
259} 163}
260 164
261void _name1_name2_type_generation_optionalinintptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int *v EINA_UNUSED)
262{
263}
264
265void _name1_name2_type_generation_optionalinintptrown(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int *v EINA_UNUSED)
266{
267}
268
269void _name1_name2_type_generation_optionalinintptrownfree(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int *v EINA_UNUSED)
270{
271}
272
273void _name1_name2_type_generation_optionaloutvoidptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, void **v EINA_UNUSED) 165void _name1_name2_type_generation_optionaloutvoidptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, void **v EINA_UNUSED)
274{ 166{
275} 167}
@@ -280,27 +172,6 @@ void _name1_name2_type_generation_optionaloutint(Eo *obj EINA_UNUSED, Type_Gener
280 *v = 42; 172 *v = 42;
281} 173}
282 174
283void _name1_name2_type_generation_optionaloutintptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int **v EINA_UNUSED)
284{
285 static int i = 42;
286 if(v)
287 *v = &i;
288}
289
290void _name1_name2_type_generation_optionaloutintptrown(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int **v EINA_UNUSED)
291{
292 int* i = malloc(sizeof(int));
293 *i = 42;
294 if(v) *v = i;
295}
296
297void _name1_name2_type_generation_optionaloutintptrownfree(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int **v EINA_UNUSED)
298{
299 int* i = malloc(sizeof(int));
300 *i = 42;
301 if(v) *v = i;
302}
303
304void _name1_name2_type_generation_optionalinclassname(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, Name1_Name2_Type_Generation *v EINA_UNUSED) 175void _name1_name2_type_generation_optionalinclassname(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, Name1_Name2_Type_Generation *v EINA_UNUSED)
305{ 176{
306} 177}