summaryrefslogtreecommitdiff
path: root/src/tests/eolian_cxx/name1_name2_type_generation.c
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-06-21 16:35:09 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-06-21 16:35:09 -0300
commitb09c1f8093eaedb723db65547f3cb1163ffbf6f5 (patch)
treed060b2e499fbbb3d15b24482de8c8283277e5818 /src/tests/eolian_cxx/name1_name2_type_generation.c
parentc951b6b754534e496f1545ac65b611c6e66736fb (diff)
eolian-cxx: Added stringshare
Diffstat (limited to 'src/tests/eolian_cxx/name1_name2_type_generation.c')
-rw-r--r--src/tests/eolian_cxx/name1_name2_type_generation.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/tests/eolian_cxx/name1_name2_type_generation.c b/src/tests/eolian_cxx/name1_name2_type_generation.c
index 9af748d..322c18c 100644
--- a/src/tests/eolian_cxx/name1_name2_type_generation.c
+++ b/src/tests/eolian_cxx/name1_name2_type_generation.c
@@ -88,6 +88,20 @@ void _name1_name2_type_generation_instringptr(Eo *obj EINA_UNUSED, Type_Generati
88{ 88{
89 ck_assert_str_eq(*v, "foobar"); 89 ck_assert_str_eq(*v, "foobar");
90} 90}
91
92void _name1_name2_type_generation_instringshare(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, const char *v EINA_UNUSED)
93{
94 ck_assert_str_eq(v, "foobar");
95 ck_assert(eina_stringshare_add(v) == v);
96 eina_stringshare_del(v);
97}
98
99void _name1_name2_type_generation_instringshareown(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, const char * v EINA_UNUSED)
100{
101 ck_assert_str_eq(v, "foobar");
102 eina_stringshare_del(v);
103}
104
91void _name1_name2_type_generation_instringptrown(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, const char * *v) 105void _name1_name2_type_generation_instringptrown(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, const char * *v)
92{ 106{
93 ck_assert_str_eq(*v, "foobar"); 107 ck_assert_str_eq(*v, "foobar");
@@ -165,6 +179,16 @@ const char * * _name1_name2_type_generation_returnstringptr(Eo *obj EINA_UNUSED,
165 return &foobar; 179 return &foobar;
166} 180}
167 181
182Eina_Stringshare* _name1_name2_type_generation_returnstringshare(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
183{
184 return eina_stringshare_add("foobar");
185}
186
187Eina_Stringshare* _name1_name2_type_generation_returnstringshareown(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
188{
189 return eina_stringshare_add("foobar");
190}
191
168const char * _name1_name2_type_generation_returnstringown(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED) 192const char * _name1_name2_type_generation_returnstringown(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
169{ 193{
170 const char foobar[] = "foobar"; 194 const char foobar[] = "foobar";
@@ -204,6 +228,16 @@ void _name1_name2_type_generation_outintptrownfree(Eo *obj EINA_UNUSED, Type_Gen
204{ 228{
205} 229}
206 230
231void _name1_name2_type_generation_outstringshare(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, Eina_Stringshare** v)
232{
233 *v = eina_stringshare_add("foobar");
234}
235
236void _name1_name2_type_generation_outstringshareown(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, Eina_Stringshare** v)
237{
238 *v = eina_stringshare_add("foobar");
239}
240
207void _name1_name2_type_generation_inclassname(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, Name1_Name2_Type_Generation *v EINA_UNUSED) 241void _name1_name2_type_generation_inclassname(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, Name1_Name2_Type_Generation *v EINA_UNUSED)
208{ 242{
209} 243}