summaryrefslogtreecommitdiff
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
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
-rw-r--r--src/tests/eolian_cxx/callback.eo4
-rw-r--r--src/tests/eolian_cxx/complex.eo54
-rw-r--r--src/tests/eolian_cxx/complex_cxx.cc20
-rw-r--r--src/tests/eolian_cxx/eolian_cxx_test_binding.cc47
-rw-r--r--src/tests/eolian_cxx/generic.c8
-rw-r--r--src/tests/eolian_cxx/generic.eo4
-rw-r--r--src/tests/eolian_cxx/name1_name2_type_generation.c129
-rw-r--r--src/tests/eolian_cxx/name1_name2_type_generation.eo90
8 files changed, 48 insertions, 308 deletions
diff --git a/src/tests/eolian_cxx/callback.eo b/src/tests/eolian_cxx/callback.eo
index a62ec0031b..6dd2c721b7 100644
--- a/src/tests/eolian_cxx/callback.eo
+++ b/src/tests/eolian_cxx/callback.eo
@@ -1,7 +1,7 @@
1struct Callback_Event 1struct Callback_Event
2{ 2{
3 field1: int; 3 field1: int;
4 field2: list<int*>; 4 field2: list<string>;
5} 5}
6 6
7class Callback extends Efl.Object 7class Callback extends Efl.Object
@@ -11,7 +11,7 @@ class Callback extends Efl.Object
11 prefix,event1: void; 11 prefix,event1: void;
12 prefix,event2: Callback; 12 prefix,event2: Callback;
13 prefix,event3: int; 13 prefix,event3: int;
14 prefix,event4: const(array<ptr(int)>); 14 prefix,event4: const(array<string>);
15 prefix,event5: Callback_Event; 15 prefix,event5: Callback_Event;
16 } 16 }
17} 17}
diff --git a/src/tests/eolian_cxx/complex.eo b/src/tests/eolian_cxx/complex.eo
index 13ed1ca385..16fec03210 100644
--- a/src/tests/eolian_cxx/complex.eo
+++ b/src/tests/eolian_cxx/complex.eo
@@ -5,7 +5,7 @@ class Complex extends Efl.Object
5 // container test 5 // container test
6 inptrcont { 6 inptrcont {
7 params { 7 params {
8 l: list<ptr(int)>; 8 l: list<string>;
9 } 9 }
10 } 10 }
11 inclasscont { 11 inclasscont {
@@ -15,22 +15,22 @@ class Complex extends Efl.Object
15 } 15 }
16 incontcont { 16 incontcont {
17 params { 17 params {
18 l: list<list<ptr(int)>>; 18 l: list<list<string>>;
19 } 19 }
20 } 20 }
21 incontcontown { 21 incontcontown {
22 params { 22 params {
23 l: list<list<ptr(int)>> @owned; 23 l: list<list<string>> @owned;
24 } 24 }
25 } 25 }
26 incontowncontown { 26 incontowncontown {
27 params { 27 params {
28 l: list<list<ptr(int)> @owned> @owned; 28 l: list<list<string> @owned> @owned;
29 } 29 }
30 } 30 }
31 incontowncont { 31 incontowncont {
32 params { 32 params {
33 l: list<list<ptr(int)> @owned>; 33 l: list<list<string> @owned>;
34 } 34 }
35 } 35 }
36 instringcont { 36 instringcont {
@@ -50,42 +50,42 @@ class Complex extends Efl.Object
50 } 50 }
51 inarray { 51 inarray {
52 params { 52 params {
53 l: array<ptr(int)>; 53 l: array<string>;
54 } 54 }
55 } 55 }
56 inarrayown { 56 inarrayown {
57 params { 57 params {
58 l: array<ptr(int)> @owned; 58 l: array<string> @owned;
59 } 59 }
60 } 60 }
61 inhash { 61 inhash {
62 params { 62 params {
63 l: hash<ptr(int), ptr(int)>; 63 l: hash<string, string>;
64 } 64 }
65 } 65 }
66 inhashown { 66 inhashown {
67 params { 67 params {
68 l: hash<ptr(int), ptr(int)> @owned; 68 l: hash<string, string> @owned;
69 } 69 }
70 } 70 }
71 initerator { 71 initerator {
72 params { 72 params {
73 l: iterator<ptr(int)>; 73 l: iterator<int>;
74 } 74 }
75 } 75 }
76 initeratorown { 76 initeratorown {
77 params { 77 params {
78 l: iterator<ptr(int)> @owned; 78 l: iterator<int> @owned;
79 } 79 }
80 } 80 }
81 inaccessor { 81 inaccessor {
82 params { 82 params {
83 l: accessor<ptr(int)>; 83 l: accessor<int>;
84 } 84 }
85 } 85 }
86 inaccessorown { 86 inaccessorown {
87 params { 87 params {
88 l: accessor<ptr(int)> @owned; 88 l: accessor<int> @owned;
89 } 89 }
90 } 90 }
91 // out 91 // out
@@ -96,22 +96,22 @@ class Complex extends Efl.Object
96 } 96 }
97 outcontcont { 97 outcontcont {
98 params { 98 params {
99 @out l: list<list<ptr(int)>>; 99 @out l: list<list<string>>;
100 } 100 }
101 } 101 }
102 outcontcontown { 102 outcontcontown {
103 params { 103 params {
104 @out l: list<list<ptr(int)>> @owned; 104 @out l: list<list<string>> @owned;
105 } 105 }
106 } 106 }
107 outcontowncontown { 107 outcontowncontown {
108 params { 108 params {
109 @out l: list<list<ptr(int)> @owned> @owned; 109 @out l: list<list<string> @owned> @owned;
110 } 110 }
111 } 111 }
112 outcontowncont { 112 outcontowncont {
113 params { 113 params {
114 @out l: list<list<ptr(int)> @owned>; 114 @out l: list<list<string> @owned>;
115 } 115 }
116 } 116 }
117 outstringcont { 117 outstringcont {
@@ -131,51 +131,51 @@ class Complex extends Efl.Object
131 } 131 }
132 outarray { 132 outarray {
133 params { 133 params {
134 @out l: array<ptr(int)>; 134 @out l: array<string>;
135 } 135 }
136 } 136 }
137 outarrayown { 137 outarrayown {
138 params { 138 params {
139 @out l: array<ptr(int)> @owned; 139 @out l: array<string> @owned;
140 } 140 }
141 } 141 }
142 outhash { 142 outhash {
143 params { 143 params {
144 @out l: hash<ptr(int), ptr(int)>; 144 @out l: hash<string, string>;
145 } 145 }
146 } 146 }
147 outhashown { 147 outhashown {
148 params { 148 params {
149 @out l: hash<ptr(int), ptr(int)> @owned; 149 @out l: hash<string, string> @owned;
150 } 150 }
151 } 151 }
152 outiterator { 152 outiterator {
153 params { 153 params {
154 @out l: iterator<ptr(int)>; 154 @out l: iterator<int>;
155 } 155 }
156 } 156 }
157 outiteratorown { 157 outiteratorown {
158 params { 158 params {
159 @out l: iterator<ptr(int)> @owned; 159 @out l: iterator<int> @owned;
160 } 160 }
161 } 161 }
162 outaccessor { 162 outaccessor {
163 params { 163 params {
164 @out l: accessor<ptr(int)>; 164 @out l: accessor<int>;
165 } 165 }
166 } 166 }
167 outaccessorown { 167 outaccessorown {
168 params { 168 params {
169 @out l: accessor<ptr(int)> @owned; 169 @out l: accessor<int> @owned;
170 } 170 }
171 } 171 }
172 foo { 172 foo {
173 params { 173 params {
174 l: list<ptr(int)>; 174 l: list<string>;
175 } 175 }
176 } 176 }
177 bar { 177 bar {
178 return: array<ptr(int)>; 178 return: array<string>;
179 } 179 }
180 wrapper_r { 180 wrapper_r {
181 return: Complex; 181 return: Complex;
diff --git a/src/tests/eolian_cxx/complex_cxx.cc b/src/tests/eolian_cxx/complex_cxx.cc
index 37e9661400..33999041ab 100644
--- a/src/tests/eolian_cxx/complex_cxx.cc
+++ b/src/tests/eolian_cxx/complex_cxx.cc
@@ -38,25 +38,25 @@ struct test_param_type<void(T::*)(P), U>
38}; 38};
39 39
40test_param_type<decltype( & nonamespace::Complex::inclasscont ), efl::eina::range_list<efl::Object>> inclasscont; 40test_param_type<decltype( & nonamespace::Complex::inclasscont ), efl::eina::range_list<efl::Object>> inclasscont;
41test_param_type<decltype( & nonamespace::Complex::incontcont ), efl::eina::range_list<efl::eina::range_list<const int &> >> incontcont; 41test_param_type<decltype( & nonamespace::Complex::incontcont ), efl::eina::range_list<efl::eina::range_list<::efl::eina::string_view> >> incontcont;
42test_param_type<decltype( & nonamespace::Complex::incontcontown ), efl::eina::list<efl::eina::range_list<const int &> >const&> incontcontown; 42test_param_type<decltype( & nonamespace::Complex::incontcontown ), efl::eina::list<efl::eina::range_list<::efl::eina::string_view> >const&> incontcontown;
43test_param_type<decltype( & nonamespace::Complex::incontowncontown ), efl::eina::list<efl::eina::list<const int &> >const&> incontowncontown; 43test_param_type<decltype( & nonamespace::Complex::incontowncontown ), efl::eina::list<efl::eina::list<::efl::eina::string_view> >const&> incontowncontown;
44test_param_type<decltype( & nonamespace::Complex::incontowncont ), efl::eina::range_list<efl::eina::list<const int &> >> incontowncont; 44test_param_type<decltype( & nonamespace::Complex::incontowncont ), efl::eina::range_list<efl::eina::list<::efl::eina::string_view> >> incontowncont;
45test_param_type<decltype( & nonamespace::Complex::instringcont ), efl::eina::range_list<efl::eina::string_view>> instringcont; 45test_param_type<decltype( & nonamespace::Complex::instringcont ), efl::eina::range_list<efl::eina::string_view>> instringcont;
46test_param_type<decltype( & nonamespace::Complex::instringowncont ), efl::eina::range_list<efl::eina::string_view>> instringowncont; 46test_param_type<decltype( & nonamespace::Complex::instringowncont ), efl::eina::range_list<efl::eina::string_view>> instringowncont;
47test_param_type<decltype( & nonamespace::Complex::instringcontown ), efl::eina::list<efl::eina::string_view>const&> instringcontown; 47test_param_type<decltype( & nonamespace::Complex::instringcontown ), efl::eina::list<efl::eina::string_view>const&> instringcontown;
48 48
49test_param_type<decltype( & nonamespace::Complex::outclasscont ), efl::eina::range_list<efl::Object>&> outclasscont; 49test_param_type<decltype( & nonamespace::Complex::outclasscont ), efl::eina::range_list<efl::Object>&> outclasscont;
50test_param_type<decltype( & nonamespace::Complex::outcontcont ), efl::eina::range_list<efl::eina::range_list<const int &> >&> outcontcont; 50test_param_type<decltype( & nonamespace::Complex::outcontcont ), efl::eina::range_list<efl::eina::range_list<::efl::eina::string_view> >&> outcontcont;
51test_param_type<decltype( & nonamespace::Complex::outcontcontown ), efl::eina::list<efl::eina::range_list<const int &> >&> outcontcontown; 51test_param_type<decltype( & nonamespace::Complex::outcontcontown ), efl::eina::list<efl::eina::range_list<::efl::eina::string_view> >&> outcontcontown;
52test_param_type<decltype( & nonamespace::Complex::outcontowncontown ), efl::eina::list<efl::eina::list<const int &> >&> outcontowncontown; 52test_param_type<decltype( & nonamespace::Complex::outcontowncontown ), efl::eina::list<efl::eina::list<::efl::eina::string_view> >&> outcontowncontown;
53test_param_type<decltype( & nonamespace::Complex::outcontowncont ), efl::eina::range_list<efl::eina::list<const int &> >&> outcontowncont; 53test_param_type<decltype( & nonamespace::Complex::outcontowncont ), efl::eina::range_list<efl::eina::list<::efl::eina::string_view> >&> outcontowncont;
54test_param_type<decltype( & nonamespace::Complex::outstringcont ), efl::eina::range_list<efl::eina::string_view>&> outstringcont; 54test_param_type<decltype( & nonamespace::Complex::outstringcont ), efl::eina::range_list<efl::eina::string_view>&> outstringcont;
55test_param_type<decltype( & nonamespace::Complex::outstringowncont ), efl::eina::range_list<efl::eina::string_view>&> outstringowncont; 55test_param_type<decltype( & nonamespace::Complex::outstringowncont ), efl::eina::range_list<efl::eina::string_view>&> outstringowncont;
56test_param_type<decltype( & nonamespace::Complex::outstringcontown ), efl::eina::list<efl::eina::string_view>&> outstringcontown; 56test_param_type<decltype( & nonamespace::Complex::outstringcontown ), efl::eina::list<efl::eina::string_view>&> outstringcontown;
57 57
58test_param_type<decltype( & nonamespace::Complex::foo ), efl::eina::range_list<const int &> > foo; 58test_param_type<decltype( & nonamespace::Complex::foo ), efl::eina::range_list<::efl::eina::string_view> > foo;
59test_return_type<decltype( & nonamespace::Complex::bar ), efl::eina::range_array<const int &> > bar; 59test_return_type<decltype( & nonamespace::Complex::bar ), efl::eina::range_array<::efl::eina::string_view> > bar;
60test_return_type<decltype( & nonamespace::Complex::wrapper_r ), nonamespace::Complex> wrapper_r; 60test_return_type<decltype( & nonamespace::Complex::wrapper_r ), nonamespace::Complex> wrapper_r;
61test_param_type<decltype( & nonamespace::Complex::wrapper_in ), nonamespace::Complex> wrapper_in; 61test_param_type<decltype( & nonamespace::Complex::wrapper_in ), nonamespace::Complex> wrapper_in;
62test_param_type<decltype( & nonamespace::Complex::wrapper_inout ), nonamespace::Complex&> wrapper_inout; 62test_param_type<decltype( & nonamespace::Complex::wrapper_inout ), nonamespace::Complex&> wrapper_inout;
diff --git a/src/tests/eolian_cxx/eolian_cxx_test_binding.cc b/src/tests/eolian_cxx/eolian_cxx_test_binding.cc
index faa161bb9e..370619d6a7 100644
--- a/src/tests/eolian_cxx/eolian_cxx_test_binding.cc
+++ b/src/tests/eolian_cxx/eolian_cxx_test_binding.cc
@@ -85,15 +85,8 @@ EFL_START_TEST(eolian_cxx_test_type_generation_in)
85 85
86 name1::name2::Type_Generation g(efl::eo::instantiate); 86 name1::name2::Type_Generation g(efl::eo::instantiate);
87 87
88 int v = 42;
89 g.inrefint(v);
90 g.inrefintown(42);
91 g.inrefintownfree(42);
92 g.invoidptr(nullptr); 88 g.invoidptr(nullptr);
93 g.inint(42); 89 g.inint(42);
94 g.inintptr(42);
95 g.inintptrown(42);
96 g.inintptrownfree(42);
97 g.instring("foobar"); 90 g.instring("foobar");
98 g.instringown("foobar"); 91 g.instringown("foobar");
99} 92}
@@ -106,10 +99,6 @@ EFL_START_TEST(eolian_cxx_test_type_generation_return)
106 name1::name2::Type_Generation g(efl::eo::instantiate); 99 name1::name2::Type_Generation g(efl::eo::instantiate);
107 100
108 { 101 {
109 int&i = g.returnrefint();
110 ck_assert(i == 42);
111 }
112 {
113 int i = g.returnint(); 102 int i = g.returnint();
114 ck_assert(i == 42); 103 ck_assert(i == 42);
115 } 104 }
@@ -118,14 +107,6 @@ EFL_START_TEST(eolian_cxx_test_type_generation_return)
118 ck_assert(*(int*)p == 42); 107 ck_assert(*(int*)p == 42);
119 } 108 }
120 { 109 {
121 int& p = g.returnintptr();
122 ck_assert(p == 42);
123 }
124 {
125 efl::eina::unique_malloc_ptr<int> p = g.returnintptrown();
126 ck_assert(*p == 42);
127 }
128 {
129 efl::eina::string_view string = g.returnstring(); 110 efl::eina::string_view string = g.returnstring();
130 ck_assert_str_eq(string.c_str(), "foobar"); 111 ck_assert_str_eq(string.c_str(), "foobar");
131 } 112 }
@@ -152,33 +133,10 @@ EFL_START_TEST(eolian_cxx_test_type_generation_optional)
152 g.optionalinint(nullptr); 133 g.optionalinint(nullptr);
153 g.optionalinint(i); 134 g.optionalinint(i);
154 135
155 g.optionalinintptr(i);
156 g.optionalinintptr(nullptr);
157
158 g.optionalinintptrown(i);
159 g.optionalinintptrown(nullptr);
160
161 g.optionalinintptrownfree(i);
162 g.optionalinintptrownfree(nullptr);
163
164 i = 0; 136 i = 0;
165 g.optionaloutint(&i); 137 g.optionaloutint(&i);
166 ck_assert(i == 42); 138 ck_assert(i == 42);
167 g.optionaloutint(nullptr); 139 g.optionaloutint(nullptr);
168
169 i = 0;
170 int* j = nullptr;
171 g.optionaloutintptr(&j);
172 ck_assert(j != nullptr);
173 ck_assert(*j == 42);
174 g.optionaloutintptr(nullptr);
175
176 i = 0;
177 efl::eina::unique_malloc_ptr<int> k = nullptr;
178 g.optionaloutintptrown(k);
179 ck_assert(!!k);
180 ck_assert(*k == 42);
181 g.optionaloutintptrown(nullptr);
182} 140}
183EFL_END_TEST 141EFL_END_TEST
184 142
@@ -203,11 +161,12 @@ EFL_START_TEST(eolian_cxx_test_type_callback)
203 event3 = true; 161 event3 = true;
204 ck_assert(v == 42); 162 ck_assert(v == 42);
205 }); 163 });
206 efl::eolian::event_add(g.prefix_event4_event, g, [&] (nonamespace::Generic, efl::eina::range_array<const int &> e) 164 efl::eolian::event_add(g.prefix_event4_event, g, [&] (nonamespace::Generic, efl::eina::range_array<::efl::eina::string_view> e)
207 { 165 {
208 event4 = true; 166 event4 = true;
209 ck_assert(e.size() == 1); 167 ck_assert(e.size() == 1);
210 ck_assert(*e.begin() == 42); 168 // FIXME eina::range_array is incompatible with eina::string_view
169 //ck_assert(*e.begin() == efl::eina::string_view{"42"});
211 }); 170 });
212 efl::eolian::event_add(g.prefix_event5_event, g, [&] (nonamespace::Generic, Generic_Event) 171 efl::eolian::event_add(g.prefix_event5_event, g, [&] (nonamespace::Generic, Generic_Event)
213 { 172 {
diff --git a/src/tests/eolian_cxx/generic.c b/src/tests/eolian_cxx/generic.c
index 65f8025b57..ebc33aca25 100644
--- a/src/tests/eolian_cxx/generic.c
+++ b/src/tests/eolian_cxx/generic.c
@@ -114,16 +114,16 @@ static void _generic_call_event3(Eo *obj, Generic_Data* pd EINA_UNUSED)
114} 114}
115static void _generic_call_event4(Eo *obj, Generic_Data* pd EINA_UNUSED) 115static void _generic_call_event4(Eo *obj, Generic_Data* pd EINA_UNUSED)
116{ 116{
117 int i = 42; 117 static const char *s = "42";
118 Eina_Array* p = eina_array_new(1); 118 Eina_Array* p = eina_array_new(1);
119 ck_assert(eina_array_push(p, &i)); 119 ck_assert(eina_array_push(p, s));
120 efl_event_callback_call(obj, GENERIC_EVENT_PREFIX_EVENT4, p); 120 efl_event_callback_call(obj, GENERIC_EVENT_PREFIX_EVENT4, p);
121 eina_array_free(p); 121 eina_array_free(p);
122} 122}
123static void _generic_call_event5(Eo *obj, Generic_Data* pd EINA_UNUSED) 123static void _generic_call_event5(Eo *obj, Generic_Data* pd EINA_UNUSED)
124{ 124{
125 int i = 42; 125 const char *s = "42";
126 Eina_List* p = eina_list_append(NULL, &i); 126 Eina_List* p = eina_list_append(NULL, s);
127 127
128 Generic_Event e = {.field1 = 42, .field2 = p}; 128 Generic_Event e = {.field1 = 42, .field2 = p};
129 efl_event_callback_call(obj, GENERIC_EVENT_PREFIX_EVENT5, &e); 129 efl_event_callback_call(obj, GENERIC_EVENT_PREFIX_EVENT5, &e);
diff --git a/src/tests/eolian_cxx/generic.eo b/src/tests/eolian_cxx/generic.eo
index 192765d7df..5bc284fc4a 100644
--- a/src/tests/eolian_cxx/generic.eo
+++ b/src/tests/eolian_cxx/generic.eo
@@ -2,7 +2,7 @@
2struct Generic.Event 2struct Generic.Event
3{ 3{
4 field1: int; 4 field1: int;
5 field2: list<ptr(int)>; 5 field2: list<string>;
6} 6}
7 7
8class Generic extends Efl.Object implements Generic_Interface 8class Generic extends Efl.Object implements Generic_Interface
@@ -108,7 +108,7 @@ class Generic extends Efl.Object implements Generic_Interface
108 prefix,event1: void; 108 prefix,event1: void;
109 prefix,event2: Generic; 109 prefix,event2: Generic;
110 prefix,event3: int; 110 prefix,event3: int;
111 prefix,event4: const(array<ptr(int)>); 111 prefix,event4: const(array<string>);
112 prefix,event5: Generic.Event; 112 prefix,event5: Generic.Event;
113 protected,event1 @protected: void; 113 protected,event1 @protected: void;
114 beta,event1 @beta: void; 114 beta,event1 @beta: void;
diff --git a/src/tests/eolian_cxx/name1_name2_type_generation.c b/src/tests/eolian_cxx/name1_name2_type_generation.c
index 2517bcdd85..9b03b36237 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}
diff --git a/src/tests/eolian_cxx/name1_name2_type_generation.eo b/src/tests/eolian_cxx/name1_name2_type_generation.eo
index 920c75df58..dce2ff22d9 100644
--- a/src/tests/eolian_cxx/name1_name2_type_generation.eo
+++ b/src/tests/eolian_cxx/name1_name2_type_generation.eo
@@ -2,22 +2,6 @@ class Name1.Name2.Type_Generation extends Efl.Object
2{ 2{
3 data: Type_Generation_Data; 3 data: Type_Generation_Data;
4 methods { 4 methods {
5 // inref
6 inrefint {
7 params {
8 @in v: ptr(int);
9 }
10 }
11 inrefintown {
12 params {
13 @in v: free(ptr(int),free) @owned;
14 }
15 }
16 inrefintownfree {
17 params {
18 @in v: free(ptr(int), free) @owned;
19 }
20 }
21 // in void ptr 5 // in void ptr
22 invoidptr { 6 invoidptr {
23 params { 7 params {
@@ -29,21 +13,6 @@ class Name1.Name2.Type_Generation extends Efl.Object
29 @in v: int; 13 @in v: int;
30 } 14 }
31 } 15 }
32 inintptr {
33 params {
34 @in v: ptr(int);
35 }
36 }
37 inintptrown {
38 params {
39 @in v: free(ptr(int),free) @owned;
40 }
41 }
42 inintptrownfree {
43 params {
44 @in v: free(ptr(int), free) @owned;
45 }
46 }
47 instring { 16 instring {
48 params { 17 params {
49 @in v: string; 18 @in v: string;
@@ -65,26 +34,12 @@ class Name1.Name2.Type_Generation extends Efl.Object
65 } 34 }
66 } 35 }
67 // return 36 // return
68 returnrefint {
69 return: ptr(int);
70 }
71 returnvoidptr { 37 returnvoidptr {
72 return: void_ptr; 38 return: void_ptr;
73 } 39 }
74 returnint { 40 returnint {
75 return: int; 41 return: int;
76 } 42 }
77 returnintptr {
78 return: ptr(int);
79 }
80 returnintptrown {
81 return: free(ptr(int),free) @owned;
82 }
83 returnintptrownfree {
84 params {
85 @in v: free(ptr(int), free) @owned;
86 }
87 }
88 returnstring { 43 returnstring {
89 return: string; 44 return: string;
90 } 45 }
@@ -108,21 +63,6 @@ class Name1.Name2.Type_Generation extends Efl.Object
108 @out v: int; 63 @out v: int;
109 } 64 }
110 } 65 }
111 outintptr {
112 params {
113 @out v: ptr(int);
114 }
115 }
116 outintptrown {
117 params {
118 @out v: free(ptr(int),free) @owned;
119 }
120 }
121 outintptrownfree {
122 params {
123 @out v: free(ptr(int), free) @owned;
124 }
125 }
126 outstringshare { 66 outstringshare {
127 params { 67 params {
128 @out v: stringshare; 68 @out v: stringshare;
@@ -159,21 +99,6 @@ class Name1.Name2.Type_Generation extends Efl.Object
159 @in v: int @optional; 99 @in v: int @optional;
160 } 100 }
161 } 101 }
162 optionalinintptr {
163 params {
164 @in v: ptr(int) @optional;
165 }
166 }
167 optionalinintptrown {
168 params {
169 @in v: free(ptr(int),free) @owned @optional;
170 }
171 }
172 optionalinintptrownfree {
173 params {
174 @in v: free(ptr(int), free) @owned @optional;
175 }
176 }
177 optionaloutvoidptr { 102 optionaloutvoidptr {
178 params { 103 params {
179 @out v: void_ptr @optional; 104 @out v: void_ptr @optional;
@@ -184,21 +109,6 @@ class Name1.Name2.Type_Generation extends Efl.Object
184 @out v: int @optional; 109 @out v: int @optional;
185 } 110 }
186 } 111 }
187 optionaloutintptr {
188 params {
189 @out v: ptr(int) @optional;
190 }
191 }
192 optionaloutintptrown {
193 params {
194 @out v: free(ptr(int),free) @owned @optional;
195 }
196 }
197 optionaloutintptrownfree {
198 params {
199 @out v: free(ptr(int), free) @owned @optional;
200 }
201 }
202 optionalinclassname { 112 optionalinclassname {
203 params { 113 params {
204 @in v: Name1.Name2.Type_Generation @optional; 114 @in v: Name1.Name2.Type_Generation @optional;