summaryrefslogtreecommitdiff
path: root/src/tests/eolian_js
diff options
context:
space:
mode:
authorVitor Sousa <vitorsousasilva@gmail.com>2016-03-14 13:14:37 -0300
committerVitor Sousa <vitorsousasilva@gmail.com>2016-03-18 17:46:38 -0300
commita85348b70bdae9672ed2017d9a0c16fa315edcfa (patch)
tree75da634dbd86e26ed5133077239f7d76d9ff6eaa /src/tests/eolian_js
parentbd200cefc44cb8b03ef465791b4dfc6b6cec85be (diff)
efl js: Update Javascript binding to compile with new Eolian API
Reword test method names to check naming convention.
Diffstat (limited to 'src/tests/eolian_js')
-rwxr-xr-xsrc/tests/eolian_js/eolian_js_suite.js192
-rw-r--r--src/tests/eolian_js/eolian_js_test_test_object_impl.c440
-rw-r--r--src/tests/eolian_js/test_object.eo94
3 files changed, 389 insertions, 337 deletions
diff --git a/src/tests/eolian_js/eolian_js_suite.js b/src/tests/eolian_js/eolian_js_suite.js
index 1461273..44c4b5a 100755
--- a/src/tests/eolian_js/eolian_js_suite.js
+++ b/src/tests/eolian_js/eolian_js_suite.js
@@ -31,7 +31,7 @@ if(typeof process !== 'undefined')
31} 31}
32else 32else
33{ 33{
34 assert = function(test, message) { if (test !== true) throw message; }; 34 assert = function(test, message) { if (!test) throw message; };
35 print('running from libv8') 35 print('running from libv8')
36 //FIXME Add levels to v8 tests 36 //FIXME Add levels to v8 tests
37 printError = print 37 printError = print
@@ -99,9 +99,9 @@ startTest("integral_in_and_out_parameters", function() {
99 var obj = new TestObject(null); 99 var obj = new TestObject(null);
100 100
101 var expectedValue = 1234; 101 var expectedValue = 1234;
102 obj.methodIntegralInA(expectedValue); 102 obj.checkMethodIntegralInA(expectedValue);
103 103
104 var actualValue = obj.methodIntegralOutA(); 104 var actualValue = obj.checkMethodIntegralOutA();
105 assert(actualValue == expectedValue, actualValue + " == " + expectedValue); 105 assert(actualValue == expectedValue, actualValue + " == " + expectedValue);
106}); 106});
107 107
@@ -109,11 +109,11 @@ startTest("integral_inout_parameter", function() {
109 var obj = new TestObject(null); 109 var obj = new TestObject(null);
110 110
111 var expectedValue = 1234; 111 var expectedValue = 1234;
112 var actualValue = obj.methodIntegralInout(-expectedValue); 112 var actualValue = obj.checkMethodIntegralInout(-expectedValue);
113 assert(actualValue == expectedValue, actualValue + " == " + expectedValue); 113 assert(actualValue == expectedValue, actualValue + " == " + expectedValue);
114 114
115 var expectedValue = -4321; 115 var expectedValue = -4321;
116 var actualValue = obj.methodIntegralInout(-expectedValue); 116 var actualValue = obj.checkMethodIntegralInout(-expectedValue);
117 assert(actualValue == expectedValue, actualValue + " == " + expectedValue); 117 assert(actualValue == expectedValue, actualValue + " == " + expectedValue);
118}); 118});
119 119
@@ -121,38 +121,38 @@ startTest("integral_return_value", function() {
121 var obj = new TestObject(null); 121 var obj = new TestObject(null);
122 122
123 var expectedValue = 1234; 123 var expectedValue = 1234;
124 obj.methodIntegralInA(expectedValue); 124 obj.checkMethodIntegralInA(expectedValue);
125 125
126 var actualValue = obj.methodIntegralReturnA(); 126 var actualValue = obj.checkMethodIntegralReturnA();
127 assert(actualValue == expectedValue, actualValue + " == " + expectedValue); 127 assert(actualValue == expectedValue, actualValue + " == " + expectedValue);
128}); 128});
129 129
130startTest("more_parameters_than_expected_is_ok", function() { 130startTest("more_parameters_than_expected_is_ok", function() {
131 var obj = new TestObject(null); 131 var obj = new TestObject(null);
132 var expectedValue = 1234; 132 var expectedValue = 1234;
133 obj.methodIntegralInA(expectedValue, 4321); 133 obj.checkMethodIntegralInA(expectedValue, 4321);
134 134
135 var actualValue = obj.methodIntegralOutA(); 135 var actualValue = obj.checkMethodIntegralOutA();
136 assert(actualValue == expectedValue, actualValue + " == " + expectedValue); 136 assert(actualValue == expectedValue, actualValue + " == " + expectedValue);
137}); 137});
138 138
139startTest("less_parameters_that_expected_fails", function() { 139startTest("less_parameters_that_expected_fails", function() {
140 var obj = new TestObject(null); 140 var obj = new TestObject(null);
141 expectException(function() { 141 expectException(function() {
142 obj.methodIntegralInA(); 142 obj.checkMethodIntegralInA();
143 }); 143 });
144}); 144});
145 145
146startTest("wrong_parameter_type_fails", function() { 146startTest("wrong_parameter_type_fails", function() {
147 var obj = new TestObject(null); 147 var obj = new TestObject(null);
148 expectException(function() { 148 expectException(function() {
149 obj.methodIntegralInA('string'); 149 obj.checkMethodIntegralInA('string');
150 }); 150 });
151}); 151});
152 152
153startTest("mixed_in_out_and_result", function() { 153startTest("mixed_in_out_and_result", function() {
154 var obj = new TestObject(null); 154 var obj = new TestObject(null);
155 var ret = obj.methodDivMod(7, 3); 155 var ret = obj.checkMethodDivMod(7, 3);
156 var success = ret[0]; 156 var success = ret[0];
157 var quotient = ret[1]; 157 var quotient = ret[1];
158 var remainder = ret[2]; 158 var remainder = ret[2];
@@ -160,46 +160,46 @@ startTest("mixed_in_out_and_result", function() {
160 assert(2 == quotient); 160 assert(2 == quotient);
161 assert(1 == remainder); 161 assert(1 == remainder);
162 162
163 ret = obj.methodDivMod(42, 0); 163 ret = obj.checkMethodDivMod(42, 0);
164 success = ret[0]; 164 success = ret[0];
165 assert(!success); 165 assert(!success);
166}); 166});
167 167
168startTest("boolean", function() { 168startTest("boolean", function() {
169 var obj = new TestObject(null); 169 var obj = new TestObject(null);
170 var ret = obj.methodAnd(false, false); 170 var ret = obj.checkMethodAnd(false, false);
171 assert(ret == false); 171 assert(ret == false);
172 ret = obj.methodAnd(false, true); 172 ret = obj.checkMethodAnd(false, true);
173 assert(ret == false); 173 assert(ret == false);
174 ret = obj.methodAnd(true, false); 174 ret = obj.checkMethodAnd(true, false);
175 assert(ret == false); 175 assert(ret == false);
176 ret = obj.methodAnd(true, true); 176 ret = obj.checkMethodAnd(true, true);
177 assert(ret); 177 assert(ret);
178}); 178});
179 179
180startTest("floating_point", function() { 180startTest("floating_point", function() {
181 var obj = new TestObject(null); 181 var obj = new TestObject(null);
182 var ret = obj.methodModf(3.14159); 182 var ret = obj.checkMethodModf(3.14159);
183 assert(Math.abs(ret[0] - 0.14159) < 0.00001, "Math.abs(ret[0] - 0.14159) < 0.00001 (" + Math.abs(ret[0] - 0.14159) + " < 0.00001)"); 183 assert(Math.abs(ret[0] - 0.14159) < 0.00001, "Math.abs(ret[0] - 0.14159) < 0.00001 (" + Math.abs(ret[0] - 0.14159) + " < 0.00001)");
184 assert(ret[1] == 3, "ret[1] == 3 (" + ret[1] + " == 3)"); 184 assert(ret[1] == 3, "ret[1] == 3 (" + ret[1] + " == 3)");
185}); 185});
186 186
187startTest("string_inout", function() { 187startTest("string_inout", function() {
188 var obj = new TestObject(null); 188 var obj = new TestObject(null);
189 var ret = obj.methodUppercase('hello world'); 189 var ret = obj.checkMethodUppercase('hello world');
190 assert(ret == "HELLO WORLD", "ret == " + ret); 190 assert(ret == "HELLO WORLD", "ret == " + ret);
191}); 191});
192 192
193startTest("in_null_string", function() { 193startTest("in_null_string", function() {
194 var obj = new TestObject(null); 194 var obj = new TestObject(null);
195 var success = obj.methodInNull(null); 195 var success = obj.checkMethodInNull(null);
196 assert(success, "success == " + success); 196 assert(success, "success == " + success);
197}); 197});
198 198
199 199
200startTest("out_null_string", function() { 200startTest("out_null_string", function() {
201 var obj = new TestObject(null); 201 var obj = new TestObject(null);
202 var ret = obj.methodOutNull(); 202 var ret = obj.checkMethodOutNull();
203 assert(ret[0], "success == " + ret[0]); 203 assert(ret[0], "success == " + ret[0]);
204 assert(ret[1] === null, "output == " + ret[1]); 204 assert(ret[1] === null, "output == " + ret[1]);
205}); 205});
@@ -207,7 +207,7 @@ startTest("out_null_string", function() {
207 207
208startTest("inout_null_string", function() { 208startTest("inout_null_string", function() {
209 var obj = new TestObject(null); 209 var obj = new TestObject(null);
210 var ret = obj.methodInoutNull(null); 210 var ret = obj.checkMethodInoutNull(null);
211 assert(ret[0], "success == " + ret[0]); 211 assert(ret[0], "success == " + ret[0]);
212 assert(ret[1] === null, "output == " + ret[1]); 212 assert(ret[1] === null, "output == " + ret[1]);
213}); 213});
@@ -215,14 +215,14 @@ startTest("inout_null_string", function() {
215 215
216startTest("return_null_string", function() { 216startTest("return_null_string", function() {
217 var obj = new TestObject(null); 217 var obj = new TestObject(null);
218 var ret = obj.methodReturnNull(); 218 var ret = obj.checkMethodReturnNull();
219 assert(ret === null, "ret == " + ret); 219 assert(ret === null, "ret == " + ret);
220}); 220});
221 221
222 222
223startTest("null_values", function() { 223startTest("null_values", function() {
224 var obj = new TestObject(null); 224 var obj = new TestObject(null);
225 var ret = obj.methodNull(null, null); 225 var ret = obj.checkMethodNull(null, null);
226 assert(ret[0] === null, "ret == " + ret[0]); 226 assert(ret[0] === null, "ret == " + ret[0]);
227 assert(ret[1] === null, "ret == " + ret[1]); 227 assert(ret[1] === null, "ret == " + ret[1]);
228 assert(ret[2] === null, "ret == " + ret[2]); 228 assert(ret[2] === null, "ret == " + ret[2]);
@@ -230,11 +230,11 @@ startTest("null_values", function() {
230 230
231startTest("enum_values", function() { 231startTest("enum_values", function() {
232 var obj = new TestObject(null); 232 var obj = new TestObject(null);
233 var ret = obj.methodInEnumReturnEnum(suite.Test.EnumEx.SECOND); 233 var ret = obj.checkMethodInEnumReturnEnum(suite.Test.EnumEx.SECOND);
234 assert(ret === suite.Test.EnumEx.SECOND); 234 assert(ret === suite.Test.EnumEx.SECOND);
235 var value = suite.Test.EnumEx.THIRD; 235 var value = suite.Test.EnumEx.THIRD;
236 assert(value === 2); 236 assert(value === 2);
237 ret = obj.methodInEnumReturnEnum(value); 237 ret = obj.checkMethodInEnumReturnEnum(value);
238 assert(ret === value); 238 assert(ret === value);
239}); 239});
240 240
@@ -247,7 +247,7 @@ startTest("struct_values", function() {
247 assert(ret === 42); 247 assert(ret === 42);
248 ret = newStruct.valueEnum; 248 ret = newStruct.valueEnum;
249 assert(ret === suite.Test.EnumEx.FOURTH); 249 assert(ret === suite.Test.EnumEx.FOURTH);
250 ret = obj.methodInStructReturnStruct(newStruct); 250 ret = obj.checkMethodInStructReturnStruct(newStruct);
251 assert(ret.valueInt === 42); 251 assert(ret.valueInt === 42);
252 assert(ret.valueEnum === suite.Test.EnumEx.FOURTH); 252 assert(ret.valueEnum === suite.Test.EnumEx.FOURTH);
253}); 253});
@@ -264,7 +264,7 @@ startTest("event_simple", function() {
264 } 264 }
265 ); 265 );
266 printInfo('going to call event'); 266 printInfo('going to call event');
267 obj.callEvent(); 267 obj.emitEvent();
268 printInfo('is event called?'); 268 printInfo('is event called?');
269 assert(v); 269 assert(v);
270}); 270});
@@ -280,14 +280,14 @@ startTest("event_object_call", function() {
280 var o = arguments[0]; 280 var o = arguments[0];
281 assert(o != null); 281 assert(o != null);
282 var expectedValue = 1234; 282 var expectedValue = 1234;
283 o.methodIntegralInA(expectedValue); 283 o.checkMethodIntegralInA(expectedValue);
284 var actualValue = o.methodIntegralOutA(); 284 var actualValue = o.checkMethodIntegralOutA();
285 assert(actualValue == expectedValue, actualValue + " == " + expectedValue); 285 assert(actualValue == expectedValue, actualValue + " == " + expectedValue);
286 v = true; 286 v = true;
287 } 287 }
288 ); 288 );
289 printInfo('going to call event'); 289 printInfo('going to call event');
290 obj.callEvent(); 290 obj.emitEvent();
291 printInfo('is event called?'); 291 printInfo('is event called?');
292 assert(v); 292 assert(v);
293}); 293});
@@ -296,7 +296,7 @@ startTest("event_structarg", function() {
296 var v = false; 296 var v = false;
297 var obj = new TestObject(null); 297 var obj = new TestObject(null);
298 var ret = obj.on 298 var ret = obj.on
299 ("test_structarg", 299 ("test,structarg",
300 function() 300 function()
301 { 301 {
302 printInfo('Event called'); 302 printInfo('Event called');
@@ -308,7 +308,7 @@ startTest("event_structarg", function() {
308 } 308 }
309 ); 309 );
310 printInfo('going to call event'); 310 printInfo('going to call event');
311 obj.callEvent(); 311 obj.emitEvent();
312 printInfo('is event called?'); 312 printInfo('is event called?');
313 assert(v); 313 assert(v);
314}); 314});
@@ -317,7 +317,7 @@ startTest("event_stringarg", function() {
317 var v = false; 317 var v = false;
318 var obj = new TestObject(null); 318 var obj = new TestObject(null);
319 var ret = obj.on 319 var ret = obj.on
320 ("test_stringarg", 320 ("test,stringarg",
321 function() 321 function()
322 { 322 {
323 printInfo('Event called'); 323 printInfo('Event called');
@@ -327,7 +327,7 @@ startTest("event_stringarg", function() {
327 } 327 }
328 ); 328 );
329 printInfo('going to call event'); 329 printInfo('going to call event');
330 obj.callEvent(); 330 obj.emitEvent();
331 printInfo('is event called?'); 331 printInfo('is event called?');
332 assert(v); 332 assert(v);
333}); 333});
@@ -335,15 +335,15 @@ startTest("event_stringarg", function() {
335// // TODO: disabled. Not implemented yet 335// // TODO: disabled. Not implemented yet
336// startTest("integral_array", function() { 336// startTest("integral_array", function() {
337// var obj = new TestObject(null); 337// var obj = new TestObject(null);
338// var ret = obj.methodArrayAt([1, 2, 3, 4, 5], 1); 338// var ret = obj.checkMethodArrayAt([1, 2, 3, 4, 5], 1);
339// assert(ret == 2, "ret == " + ret); 339// assert(ret == 2, "ret == " + ret);
340// }); 340// });
341 341
342startTest("array_in_array_out", function() { 342startTest("array_in_array_out", function() {
343 var obj = new TestObject(null); 343 var obj = new TestObject(null);
344 var newArray = obj.methodArrayWith42(); 344 var newArray = obj.checkMethodArrayWith42();
345 assert(newArray != null); 345 assert(newArray != null);
346 var arr = obj.methodArrayInArrayOut(newArray); 346 var arr = obj.checkMethodArrayInArrayOut(newArray);
347 assert(arr != null); 347 assert(arr != null);
348 assert(arr[0] === 42); 348 assert(arr[0] === 42);
349 assert(newArray[0] === arr[0]); 349 assert(newArray[0] === arr[0]);
@@ -351,80 +351,80 @@ startTest("array_in_array_out", function() {
351 351
352startTest("method_array_of_objects", function() { 352startTest("method_array_of_objects", function() {
353 var obj = new TestObject(null); 353 var obj = new TestObject(null);
354 var arr = obj.methodArrayOfObjects(null); 354 var arr = obj.checkMethodArrayOfObjects(null);
355 assert(arr != null); 355 assert(arr != null);
356 assert(arr[0] != null); 356 assert(arr[0] != null);
357 arr = obj.methodArrayOfObjects(arr); 357 arr = obj.checkMethodArrayOfObjects(arr);
358 assert(arr != null); 358 assert(arr != null);
359 var v = arr[0]; 359 var v = arr[0];
360 assert(v != null); 360 assert(v != null);
361 // assert(v == obj); // TODO: check if same Eo object pointer? 361 // assert(v == obj); // TODO: check if same Eo object pointer?
362 var expectedValue = 1234; 362 var expectedValue = 1234;
363 v.methodIntegralInA(expectedValue); 363 v.checkMethodIntegralInA(expectedValue);
364 var actualValue = v.methodIntegralOutA(); 364 var actualValue = v.checkMethodIntegralOutA();
365 assert(actualValue == expectedValue, actualValue + " == " + expectedValue); 365 assert(actualValue == expectedValue, actualValue + " == " + expectedValue);
366}); 366});
367 367
368// FIXME 368// FIXME
369// startTest("method_array_of_strings", function() { 369// startTest("method_array_of_strings", function() {
370// var obj = new TestObject(null); 370// var obj = new TestObject(null);
371// var arr = obj.methodArrayOfStrings(null); 371// var arr = obj.checkMethodArrayOfStrings(null);
372// assert(arr != null); 372// assert(arr != null);
373// assert(arr[0] === "foo"); 373// assert(arr[0] === "foo");
374// arr = obj.methodArrayOfStrings(arr); 374// arr = obj.checkMethodArrayOfStrings(arr);
375// assert(arr != null); 375// assert(arr != null);
376// assert(arr[0] === "foo"); 376// assert(arr[0] === "foo");
377// }); 377// });
378 378
379startTest("method_array_of_ints", function() { 379startTest("method_array_of_ints", function() {
380 var obj = new TestObject(null); 380 var obj = new TestObject(null);
381 var arr = obj.methodArrayOfInts(null); 381 var arr = obj.checkMethodArrayOfInts(null);
382 assert(arr != null); 382 assert(arr != null);
383 assert(arr[0] === 42); 383 assert(arr[0] === 42);
384 arr = obj.methodArrayOfInts(arr); 384 arr = obj.checkMethodArrayOfInts(arr);
385 assert(arr != null); 385 assert(arr != null);
386 assert(arr[0] === 42); 386 assert(arr[0] === 42);
387}); 387});
388 388
389startTest("method_array_of_bools", function() { 389startTest("method_array_of_bools", function() {
390 var obj = new TestObject(null); 390 var obj = new TestObject(null);
391 var arr = obj.methodArrayOfBools(null); 391 var arr = obj.checkMethodArrayOfBools(null);
392 assert(arr != null); 392 assert(arr != null);
393 assert(arr[0] === true); 393 assert(arr[0] === true);
394 arr = obj.methodArrayOfBools(arr); 394 arr = obj.checkMethodArrayOfBools(arr);
395 assert(arr != null); 395 assert(arr != null);
396 assert(arr[0] === true); 396 assert(arr[0] === true);
397}); 397});
398 398
399startTest("method_array_of_doubles", function() { 399startTest("method_array_of_doubles", function() {
400 var obj = new TestObject(null); 400 var obj = new TestObject(null);
401 var arr = obj.methodArrayOfDoubles(null); 401 var arr = obj.checkMethodArrayOfDoubles(null);
402 assert(arr != null); 402 assert(arr != null);
403 assert(arr[0] === 42.0); 403 assert(arr[0] === 42.0);
404 arr = obj.methodArrayOfDoubles(arr); 404 arr = obj.checkMethodArrayOfDoubles(arr);
405 assert(arr != null); 405 assert(arr != null);
406 assert(arr[0] === 42.0); 406 assert(arr[0] === 42.0);
407}); 407});
408 408
409startTest("method_array_of_enums", function() { 409startTest("method_array_of_enums", function() {
410 var obj = new TestObject(null); 410 var obj = new TestObject(null);
411 var arr = obj.methodArrayOfEnums(null); 411 var arr = obj.checkMethodArrayOfEnums(null);
412 assert(arr != null); 412 assert(arr != null);
413 assert(arr[0] === suite.Test.EnumEx.THIRD); 413 assert(arr[0] === suite.Test.EnumEx.THIRD);
414 arr = obj.methodArrayOfEnums(arr); 414 arr = obj.checkMethodArrayOfEnums(arr);
415 assert(arr != null); 415 assert(arr != null);
416 assert(arr[0] === suite.Test.EnumEx.THIRD); 416 assert(arr[0] === suite.Test.EnumEx.THIRD);
417}); 417});
418 418
419startTest("method_array_of_structs", function() { 419startTest("method_array_of_structs", function() {
420 var obj = new TestObject(null); 420 var obj = new TestObject(null);
421 var arr = obj.methodArrayOfStructs(null); 421 var arr = obj.checkMethodArrayOfStructs(null);
422 assert(arr != null); 422 assert(arr != null);
423 var s = arr[0]; 423 var s = arr[0];
424 assert(s != null); 424 assert(s != null);
425 assert(s.valueInt === 42); 425 assert(s.valueInt === 42);
426 assert(s.valueEnum === suite.Test.EnumEx.THIRD); 426 assert(s.valueEnum === suite.Test.EnumEx.THIRD);
427 arr = obj.methodArrayOfStructs(arr); 427 arr = obj.checkMethodArrayOfStructs(arr);
428 s = arr[0]; 428 s = arr[0];
429 assert(s != null); 429 assert(s != null);
430 assert(s.valueInt === 42); 430 assert(s.valueInt === 42);
@@ -433,9 +433,9 @@ startTest("method_array_of_structs", function() {
433 433
434startTest("list_in_list_out", function() { 434startTest("list_in_list_out", function() {
435 var obj = new TestObject(null); 435 var obj = new TestObject(null);
436 var newList = obj.methodListWith42(); 436 var newList = obj.checkMethodListWith42();
437 assert(newList != null); 437 assert(newList != null);
438 var lis = obj.methodListInListOut(newList); 438 var lis = obj.checkMethodListInListOut(newList);
439 assert(lis != null); 439 assert(lis != null);
440 // assert(lis == newList); // TODO: check same list pointer? 440 // assert(lis == newList); // TODO: check same list pointer?
441 assert(lis[0] === 42); 441 assert(lis[0] === 42);
@@ -444,80 +444,80 @@ startTest("list_in_list_out", function() {
444 444
445startTest("method_list_of_objects", function() { 445startTest("method_list_of_objects", function() {
446 var obj = new TestObject(null); 446 var obj = new TestObject(null);
447 var lis = obj.methodListOfObjects(null); 447 var lis = obj.checkMethodListOfObjects(null);
448 assert(lis != null); 448 assert(lis != null);
449 assert(lis[0] != null); 449 assert(lis[0] != null);
450 lis = obj.methodListOfObjects(lis); 450 lis = obj.checkMethodListOfObjects(lis);
451 assert(lis != null); 451 assert(lis != null);
452 var v = lis[0]; 452 var v = lis[0];
453 assert(v != null); 453 assert(v != null);
454 // assert(v == obj); // TODO: check if same Eo object pointer? 454 // assert(v == obj); // TODO: check if same Eo object pointer?
455 var expectedValue = 1234; 455 var expectedValue = 1234;
456 v.methodIntegralInA(expectedValue); 456 v.checkMethodIntegralInA(expectedValue);
457 var actualValue = v.methodIntegralOutA(); 457 var actualValue = v.checkMethodIntegralOutA();
458 assert(actualValue == expectedValue, actualValue + " == " + expectedValue); 458 assert(actualValue == expectedValue, actualValue + " == " + expectedValue);
459}); 459});
460 460
461// FIXME 461// FIXME
462// startTest("method_list_of_strings", function() { 462// startTest("method_list_of_strings", function() {
463// var obj = new TestObject(null); 463// var obj = new TestObject(null);
464// var lis = obj.methodListOfStrings(null); 464// var lis = obj.checkMethodListOfStrings(null);
465// assert(lis != null); 465// assert(lis != null);
466// assert(lis[0] === "foo"); 466// assert(lis[0] === "foo");
467// lis = obj.methodListOfStrings(lis); 467// lis = obj.checkMethodListOfStrings(lis);
468// assert(lis != null); 468// assert(lis != null);
469// assert(lis[0] === "foo"); 469// assert(lis[0] === "foo");
470// }); 470// });
471 471
472startTest("method_list_of_ints", function() { 472startTest("method_list_of_ints", function() {
473 var obj = new TestObject(null); 473 var obj = new TestObject(null);
474 var lis = obj.methodListOfInts(null); 474 var lis = obj.checkMethodListOfInts(null);
475 assert(lis != null); 475 assert(lis != null);
476 assert(lis[0] === 42); 476 assert(lis[0] === 42);
477 lis = obj.methodListOfInts(lis); 477 lis = obj.checkMethodListOfInts(lis);
478 assert(lis != null); 478 assert(lis != null);
479 assert(lis[0] === 42); 479 assert(lis[0] === 42);
480}); 480});
481 481
482startTest("method_list_of_bools", function() { 482startTest("method_list_of_bools", function() {
483 var obj = new TestObject(null); 483 var obj = new TestObject(null);
484 var lis = obj.methodListOfBools(null); 484 var lis = obj.checkMethodListOfBools(null);
485 assert(lis != null); 485 assert(lis != null);
486 assert(lis[0] === true); 486 assert(lis[0] === true);
487 lis = obj.methodListOfBools(lis); 487 lis = obj.checkMethodListOfBools(lis);
488 assert(lis != null); 488 assert(lis != null);
489 assert(lis[0] === true); 489 assert(lis[0] === true);
490}); 490});
491 491
492startTest("method_list_of_doubles", function() { 492startTest("method_list_of_doubles", function() {
493 var obj = new TestObject(null); 493 var obj = new TestObject(null);
494 var lis = obj.methodListOfDoubles(null); 494 var lis = obj.checkMethodListOfDoubles(null);
495 assert(lis != null); 495 assert(lis != null);
496 assert(lis[0] === 42.0); 496 assert(lis[0] === 42.0);
497 lis = obj.methodListOfDoubles(lis); 497 lis = obj.checkMethodListOfDoubles(lis);
498 assert(lis != null); 498 assert(lis != null);
499 assert(lis[0] === 42.0); 499 assert(lis[0] === 42.0);
500}); 500});
501 501
502startTest("method_list_of_enums", function() { 502startTest("method_list_of_enums", function() {
503 var obj = new TestObject(null); 503 var obj = new TestObject(null);
504 var lis = obj.methodListOfEnums(null); 504 var lis = obj.checkMethodListOfEnums(null);
505 assert(lis != null); 505 assert(lis != null);
506 assert(lis[0] === suite.Test.EnumEx.THIRD); 506 assert(lis[0] === suite.Test.EnumEx.THIRD);
507 lis = obj.methodListOfEnums(lis); 507 lis = obj.checkMethodListOfEnums(lis);
508 assert(lis != null); 508 assert(lis != null);
509 assert(lis[0] === suite.Test.EnumEx.THIRD); 509 assert(lis[0] === suite.Test.EnumEx.THIRD);
510}); 510});
511 511
512startTest("method_list_of_structs", function() { 512startTest("method_list_of_structs", function() {
513 var obj = new TestObject(null); 513 var obj = new TestObject(null);
514 var lis = obj.methodListOfStructs(null); 514 var lis = obj.checkMethodListOfStructs(null);
515 assert(lis != null); 515 assert(lis != null);
516 var s = lis[0]; 516 var s = lis[0];
517 assert(s != null); 517 assert(s != null);
518 assert(s.valueInt === 42); 518 assert(s.valueInt === 42);
519 assert(s.valueEnum === suite.Test.EnumEx.THIRD); 519 assert(s.valueEnum === suite.Test.EnumEx.THIRD);
520 lis = obj.methodListOfStructs(lis); 520 lis = obj.checkMethodListOfStructs(lis);
521 s = lis[0]; 521 s = lis[0];
522 assert(s != null); 522 assert(s != null);
523 assert(s.valueInt === 42); 523 assert(s.valueInt === 42);
@@ -526,79 +526,79 @@ startTest("method_list_of_structs", function() {
526 526
527startTest("method_accessor_of_objects", function() { 527startTest("method_accessor_of_objects", function() {
528 var obj = new TestObject(null); 528 var obj = new TestObject(null);
529 var acc = obj.methodAccessorOfObjects(null); 529 var acc = obj.checkMethodAccessorOfObjects(null);
530 assert(acc != null); 530 assert(acc != null);
531 assert(acc.get(0) != null); 531 assert(acc.get(0) != null);
532 acc = obj.methodAccessorOfObjects(acc); 532 acc = obj.checkMethodAccessorOfObjects(acc);
533 assert(acc != null); 533 assert(acc != null);
534 var v = acc.get(0); 534 var v = acc.get(0);
535 assert(v != null); 535 assert(v != null);
536 var expectedValue = 1234; 536 var expectedValue = 1234;
537 v.methodIntegralInA(expectedValue); 537 v.checkMethodIntegralInA(expectedValue);
538 var actualValue = v.methodIntegralOutA(); 538 var actualValue = v.checkMethodIntegralOutA();
539 assert(actualValue == expectedValue, actualValue + " == " + expectedValue); 539 assert(actualValue == expectedValue, actualValue + " == " + expectedValue);
540}); 540});
541 541
542// FIXME 542// FIXME
543// startTest("method_accessor_of_strings", function() { 543// startTest("method_accessor_of_strings", function() {
544// var obj = new TestObject(null); 544// var obj = new TestObject(null);
545// var acc = obj.methodAccessorOfStrings(null); 545// var acc = obj.checkMethodAccessorOfStrings(null);
546// assert(acc != null); 546// assert(acc != null);
547// assert(acc.get(0) === "foo"); 547// assert(acc.get(0) === "foo");
548// acc = obj.methodAccessorOfStrings(acc); 548// acc = obj.checkMethodAccessorOfStrings(acc);
549// assert(acc != null); 549// assert(acc != null);
550// assert(acc.get(0) === "foo"); 550// assert(acc.get(0) === "foo");
551// }); 551// });
552 552
553startTest("method_accessor_of_ints", function() { 553startTest("method_accessor_of_ints", function() {
554 var obj = new TestObject(null); 554 var obj = new TestObject(null);
555 var acc = obj.methodAccessorOfInts(null); 555 var acc = obj.checkMethodAccessorOfInts(null);
556 assert(acc != null); 556 assert(acc != null);
557 assert(acc.get(0) === 42); 557 assert(acc.get(0) === 42);
558 acc = obj.methodAccessorOfInts(acc); 558 acc = obj.checkMethodAccessorOfInts(acc);
559 assert(acc != null); 559 assert(acc != null);
560 assert(acc.get(0) === 42); 560 assert(acc.get(0) === 42);
561}); 561});
562 562
563startTest("method_accessor_of_bools", function() { 563startTest("method_accessor_of_bools", function() {
564 var obj = new TestObject(null); 564 var obj = new TestObject(null);
565 var acc = obj.methodAccessorOfBools(null); 565 var acc = obj.checkMethodAccessorOfBools(null);
566 assert(acc != null); 566 assert(acc != null);
567 assert(acc.get(0) === true); 567 assert(acc.get(0) === true);
568 acc = obj.methodAccessorOfBools(acc); 568 acc = obj.checkMethodAccessorOfBools(acc);
569 assert(acc != null); 569 assert(acc != null);
570 assert(acc.get(0) === true); 570 assert(acc.get(0) === true);
571}); 571});
572 572
573startTest("method_accessor_of_doubles", function() { 573startTest("method_accessor_of_doubles", function() {
574 var obj = new TestObject(null); 574 var obj = new TestObject(null);
575 var acc = obj.methodAccessorOfDoubles(null); 575 var acc = obj.checkMethodAccessorOfDoubles(null);
576 assert(acc != null); 576 assert(acc != null);
577 assert(acc.get(0) === 42.0); 577 assert(acc.get(0) === 42.0);
578 acc = obj.methodAccessorOfDoubles(acc); 578 acc = obj.checkMethodAccessorOfDoubles(acc);
579 assert(acc != null); 579 assert(acc != null);
580 assert(acc.get(0) === 42.0); 580 assert(acc.get(0) === 42.0);
581}); 581});
582 582
583startTest("method_accessor_of_enums", function() { 583startTest("method_accessor_of_enums", function() {
584 var obj = new TestObject(null); 584 var obj = new TestObject(null);
585 var acc = obj.methodAccessorOfEnums(null); 585 var acc = obj.checkMethodAccessorOfEnums(null);
586 assert(acc != null); 586 assert(acc != null);
587 assert(acc.get(0) === suite.Test.EnumEx.THIRD); 587 assert(acc.get(0) === suite.Test.EnumEx.THIRD);
588 acc = obj.methodAccessorOfEnums(acc); 588 acc = obj.checkMethodAccessorOfEnums(acc);
589 assert(acc != null); 589 assert(acc != null);
590 assert(acc.get(0) === suite.Test.EnumEx.THIRD); 590 assert(acc.get(0) === suite.Test.EnumEx.THIRD);
591}); 591});
592 592
593startTest("method_accessor_of_structs", function() { 593startTest("method_accessor_of_structs", function() {
594 var obj = new TestObject(null); 594 var obj = new TestObject(null);
595 var acc = obj.methodAccessorOfStructs(null); 595 var acc = obj.checkMethodAccessorOfStructs(null);
596 assert(acc != null); 596 assert(acc != null);
597 var s = acc.get(0); 597 var s = acc.get(0);
598 assert(s != null); 598 assert(s != null);
599 assert(s.valueInt === 42); 599 assert(s.valueInt === 42);
600 assert(s.valueEnum === suite.Test.EnumEx.THIRD); 600 assert(s.valueEnum === suite.Test.EnumEx.THIRD);
601 acc = obj.methodAccessorOfStructs(acc); 601 acc = obj.checkMethodAccessorOfStructs(acc);
602 assert(acc != null); 602 assert(acc != null);
603 s = acc.get(0); 603 s = acc.get(0);
604 assert(s != null); 604 assert(s != null);
@@ -611,12 +611,12 @@ startTest("method_accessor_of_structs", function() {
611// FIXME 611// FIXME
612// startTest("method_array_of_arrays_of_ints", function() { 612// startTest("method_array_of_arrays_of_ints", function() {
613// var obj = new TestObject(null); 613// var obj = new TestObject(null);
614// var arr = obj.methodArrayOfArraysOfInts(null); 614// var arr = obj.checkMethodArrayOfArraysOfInts(null);
615// assert(arr != null); 615// assert(arr != null);
616// var a = arr[0]; 616// var a = arr[0];
617// assert(a != null); 617// assert(a != null);
618// assert(a[0] === 42); 618// assert(a[0] === 42);
619// arr = obj.methodArrayOfArraysOfInts(arr); 619// arr = obj.checkMethodArrayOfArraysOfInts(arr);
620// assert(arr != null); 620// assert(arr != null);
621// a = arr[0]; 621// a = arr[0];
622// assert(a != null); 622// assert(a != null);
@@ -626,12 +626,12 @@ startTest("method_accessor_of_structs", function() {
626// FIXME 626// FIXME
627// startTest("method_list_of_lists_of_ints", function() { 627// startTest("method_list_of_lists_of_ints", function() {
628// var obj = new TestObject(null); 628// var obj = new TestObject(null);
629// var lis = obj.methodListOfListsOfInts(null); 629// var lis = obj.checkMethodListOfListsOfInts(null);
630// assert(lis != null); 630// assert(lis != null);
631// var l = lis[0]; 631// var l = lis[0];
632// assert(l != null); 632// assert(l != null);
633// assert(l[0] === 42); 633// assert(l[0] === 42);
634// lis = obj.methodListOfListsOfInts(lis); 634// lis = obj.checkMethodListOfListsOfInts(lis);
635// assert(lis != null); 635// assert(lis != null);
636// l = lis[0]; 636// l = lis[0];
637// assert(l != null); 637// assert(l != null);
@@ -641,12 +641,12 @@ startTest("method_accessor_of_structs", function() {
641// FIXME 641// FIXME
642// startTest("method_array_of_lists_of_ints", function() { 642// startTest("method_array_of_lists_of_ints", function() {
643// var obj = new TestObject(null); 643// var obj = new TestObject(null);
644// var arr = obj.methodArrayOfListsOfInts(null); 644// var arr = obj.checkMethodArrayOfListsOfInts(null);
645// assert(arr != null); 645// assert(arr != null);
646// var l = arr[0]; 646// var l = arr[0];
647// assert(l != null); 647// assert(l != null);
648// assert(l[0] === 42); 648// assert(l[0] === 42);
649// arr = obj.methodArrayOfListsOfInts(arr); 649// arr = obj.checkMethodArrayOfListsOfInts(arr);
650// assert(arr != null); 650// assert(arr != null);
651// l = arr[0]; 651// l = arr[0];
652// assert(l != null); 652// assert(l != null);
@@ -656,12 +656,12 @@ startTest("method_accessor_of_structs", function() {
656// FIXME 656// FIXME
657// startTest("method_list_of_arrays_of_ints", function() { 657// startTest("method_list_of_arrays_of_ints", function() {
658// var obj = new TestObject(null); 658// var obj = new TestObject(null);
659// var lis = obj.methodListOfArraysOfInts(null); 659// var lis = obj.checkMethodListOfArraysOfInts(null);
660// assert(lis != null); 660// assert(lis != null);
661// var a = lis[0]; 661// var a = lis[0];
662// assert(a != null); 662// assert(a != null);
663// assert(a[0] === 42); 663// assert(a[0] === 42);
664// lis = obj.methodListOfArraysOfInts(lis); 664// lis = obj.checkMethodListOfArraysOfInts(lis);
665// assert(lis != null); 665// assert(lis != null);
666// a = lis[0]; 666// a = lis[0];
667// assert(a != null); 667// assert(a != null);
diff --git a/src/tests/eolian_js/eolian_js_test_test_object_impl.c b/src/tests/eolian_js/eolian_js_test_test_object_impl.c
index 89e9d47..aecfbbf 100644
--- a/src/tests/eolian_js/eolian_js_test_test_object_impl.c
+++ b/src/tests/eolian_js/eolian_js_test_test_object_impl.c
@@ -27,6 +27,7 @@ EOLIAN static Eo_Base *
27_test_object_eo_base_constructor(Eo* obj, Test_Object_Data *pd) 27_test_object_eo_base_constructor(Eo* obj, Test_Object_Data *pd)
28{ 28{
29 fprintf(stdout, "_test_object_eo_base_constructor\n"); 29 fprintf(stdout, "_test_object_eo_base_constructor\n");
30 fflush(stdout);
30 31
31 pd->a = 0; 32 pd->a = 0;
32 return eo_constructor(eo_super(obj, MY_CLASS)); 33 return eo_constructor(eo_super(obj, MY_CLASS));
@@ -36,6 +37,7 @@ EOLIAN static Eo *
36_test_object_eo_base_finalize(Eo *obj, Test_Object_Data *pd EINA_UNUSED) 37_test_object_eo_base_finalize(Eo *obj, Test_Object_Data *pd EINA_UNUSED)
37{ 38{
38 fprintf(stdout, "_test_object_eo_base_finalize\n"); 39 fprintf(stdout, "_test_object_eo_base_finalize\n");
40 fflush(stdout);
39 41
40 return eo_finalize(eo_super(obj, MY_CLASS)); 42 return eo_finalize(eo_super(obj, MY_CLASS));
41} 43}
@@ -44,54 +46,60 @@ EOLIAN static void
44_test_object_eo_base_destructor(Eo* obj, Test_Object_Data *pd EINA_UNUSED) 46_test_object_eo_base_destructor(Eo* obj, Test_Object_Data *pd EINA_UNUSED)
45{ 47{
46 fprintf(stdout, "_test_object_eo_base_destructor\n"); 48 fprintf(stdout, "_test_object_eo_base_destructor\n");
49 fflush(stdout);
47 eo_destructor(eo_super(obj, MY_CLASS)); 50 eo_destructor(eo_super(obj, MY_CLASS));
48} 51}
49 52
50 53
51EOLIAN static void 54EOLIAN static void
52_test_object_method_integral_in_a(Eo* obj EINA_UNUSED, 55_test_object_method_integral_in_a_check(Eo* obj EINA_UNUSED,
53 Test_Object_Data *pd, 56 Test_Object_Data *pd,
54 int a) 57 int a)
55{ 58{
56 fprintf(stdout, "_test_object_method_integral_in_a(%d)\n", a); 59 fprintf(stdout, "_test_object_method_integral_in_a_check(%d)\n", a);
60 fflush(stdout);
57 pd->a = a; 61 pd->a = a;
58} 62}
59 63
60EOLIAN static void 64EOLIAN static void
61_test_object_method_integral_out_a(Eo* obj EINA_UNUSED, 65_test_object_method_integral_out_a_check(Eo* obj EINA_UNUSED,
62 Test_Object_Data *pd, 66 Test_Object_Data *pd,
63 int *a) 67 int *a)
64{ 68{
65 fprintf(stdout, "_test_object_method_integral_out_a(%p)\n", a); 69 fprintf(stdout, "_test_object_method_integral_out_a_check(%p)\n", a);
70 fflush(stdout);
66 *a = pd->a; 71 *a = pd->a;
67} 72}
68 73
69EOLIAN static void 74EOLIAN static void
70_test_object_method_integral_inout(Eo* obj EINA_UNUSED, 75_test_object_method_integral_inout_check(Eo* obj EINA_UNUSED,
71 Test_Object_Data *pd EINA_UNUSED, 76 Test_Object_Data *pd EINA_UNUSED,
72 int *a) 77 int *a)
73{ 78{
74 fprintf(stdout, "_test_object_method_integral_inout(%d [%p])\n", *a, a); 79 fprintf(stdout, "_test_object_method_integral_inout_check(%d [%p])\n", *a, a);
80 fflush(stdout);
75 *a = -(*a); 81 *a = -(*a);
76} 82}
77 83
78EOLIAN static int 84EOLIAN static int
79_test_object_method_integral_return_a(Eo* obj EINA_UNUSED, 85_test_object_method_integral_return_a_check(Eo* obj EINA_UNUSED,
80 Test_Object_Data *pd) 86 Test_Object_Data *pd)
81{ 87{
82 fprintf(stdout, "_test_object_method_integral_return_a()\n"); 88 fprintf(stdout, "_test_object_method_integral_return_a_check()\n");
89 fflush(stdout);
83 return pd->a; 90 return pd->a;
84} 91}
85 92
86EOLIAN static Eina_Bool 93EOLIAN static Eina_Bool
87_test_object_method_div_mod(Eo* obj EINA_UNUSED, 94_test_object_method_div_mod_check(Eo* obj EINA_UNUSED,
88 Test_Object_Data *pd EINA_UNUSED, 95 Test_Object_Data *pd EINA_UNUSED,
89 int a, 96 int a,
90 int b, 97 int b,
91 int *quotient, 98 int *quotient,
92 int *remainder) 99 int *remainder)
93{ 100{
94 fprintf(stdout, "_test_object_method_div_mod(%d, %d, %p, %p)\n", a, b, quotient, remainder); 101 fprintf(stdout, "_test_object_method_div_mod_check(%d, %d, %p, %p)\n", a, b, quotient, remainder);
102 fflush(stdout);
95 if (0 == b) return EINA_FALSE; 103 if (0 == b) return EINA_FALSE;
96 *quotient = a / b; 104 *quotient = a / b;
97 *remainder = a % b; 105 *remainder = a % b;
@@ -99,31 +107,34 @@ _test_object_method_div_mod(Eo* obj EINA_UNUSED,
99} 107}
100 108
101EOLIAN static Eina_Bool 109EOLIAN static Eina_Bool
102_test_object_method_and(Eo* obj EINA_UNUSED, 110_test_object_method_and_check(Eo* obj EINA_UNUSED,
103 Test_Object_Data *pd EINA_UNUSED, 111 Test_Object_Data *pd EINA_UNUSED,
104 Eina_Bool a, 112 Eina_Bool a,
105 Eina_Bool b) 113 Eina_Bool b)
106{ 114{
107 fprintf(stdout, "_test_object_method_and(%d, %d)\n", a, b); 115 fprintf(stdout, "_test_object_method_and_check(%d, %d)\n", a, b);
116 fflush(stdout);
108 return a && b; 117 return a && b;
109} 118}
110 119
111EOLIAN static double 120EOLIAN static double
112_test_object_method_modf(Eo* obj EINA_UNUSED, 121_test_object_method_modf_check(Eo* obj EINA_UNUSED,
113 Test_Object_Data *pd EINA_UNUSED, 122 Test_Object_Data *pd EINA_UNUSED,
114 double x, 123 double x,
115 double *int_part) 124 double *int_part)
116{ 125{
117 fprintf(stdout, "_test_object_method_modf(%f, %p)\n", x, int_part); 126 fprintf(stdout, "_test_object_method_modf_check(%f, %p)\n", x, int_part);
127 fflush(stdout);
118 return modf(x, int_part); 128 return modf(x, int_part);
119} 129}
120 130
121EOLIAN static void 131EOLIAN static void
122_test_object_method_uppercase(Eo* obj EINA_UNUSED, 132_test_object_method_uppercase_check(Eo* obj EINA_UNUSED,
123 Test_Object_Data *pd EINA_UNUSED, 133 Test_Object_Data *pd EINA_UNUSED,
124 char **str) 134 char **str)
125{ 135{
126 fprintf(stdout, "_test_object_method_uppercase('%s')\n", *str); 136 fprintf(stdout, "_test_object_method_uppercase_check('%s')\n", *str);
137 fflush(stdout);
127 if (!*str) return; 138 if (!*str) return;
128 139
129 char *p = *str; 140 char *p = *str;
@@ -135,45 +146,50 @@ _test_object_method_uppercase(Eo* obj EINA_UNUSED,
135} 146}
136 147
137EOLIAN static Eina_Bool 148EOLIAN static Eina_Bool
138_test_object_method_in_null(Eo* obj EINA_UNUSED, 149_test_object_method_in_null_check(Eo* obj EINA_UNUSED,
139 Test_Object_Data *pd EINA_UNUSED, 150 Test_Object_Data *pd EINA_UNUSED,
140 char *a) 151 char *a)
141{ 152{
142 fprintf(stdout, "_test_object_method_in_null(%p)\n", a); 153 fprintf(stdout, "_test_object_method_in_null_check(%p)\n", a);
154 fflush(stdout);
143 return NULL == a; 155 return NULL == a;
144} 156}
145 157
146EOLIAN static Eina_Bool 158EOLIAN static Eina_Bool
147_test_object_method_out_null(Eo* obj EINA_UNUSED, 159_test_object_method_out_null_check(Eo* obj EINA_UNUSED,
148 Test_Object_Data *pd EINA_UNUSED, 160 Test_Object_Data *pd EINA_UNUSED,
149 char **a) 161 char **a)
150{ 162{
151 fprintf(stdout, "_test_object_method_out_null(%p)\n", a); 163 fprintf(stdout, "_test_object_method_out_null_check(%p)\n", a);
164 fflush(stdout);
152 *a = NULL; 165 *a = NULL;
153 return EINA_TRUE; 166 return EINA_TRUE;
154} 167}
155 168
156EOLIAN static Eina_Bool 169EOLIAN static Eina_Bool
157_test_object_method_inout_null(Eo* obj EINA_UNUSED, 170_test_object_method_inout_null_check(Eo* obj EINA_UNUSED,
158 Test_Object_Data *pd EINA_UNUSED, 171 Test_Object_Data *pd EINA_UNUSED,
159 char **a) 172 char **a)
160{ 173{
161 fprintf(stdout, "_test_object_method_inout_null(%p)\n", a); 174 fprintf(stdout, "_test_object_method_inout_null_check(%p)\n", a);
175 fflush(stdout);
162 return NULL == *a; 176 return NULL == *a;
163} 177}
164 178
165EOLIAN static char * 179EOLIAN static char *
166_test_object_method_return_null(Eo* obj EINA_UNUSED, 180_test_object_method_return_null_check(Eo* obj EINA_UNUSED,
167 Test_Object_Data *pd EINA_UNUSED) 181 Test_Object_Data *pd EINA_UNUSED)
168{ 182{
169 fprintf(stdout, "_test_object_method_return_null()\n"); 183 fprintf(stdout, "_test_object_method_return_null_check()\n");
184 fflush(stdout);
170 return NULL; 185 return NULL;
171} 186}
172 187
173EOLIAN static void 188EOLIAN static void
174_test_object_call_event(Eo* obj, Test_Object_Data *pd EINA_UNUSED) 189_test_object_event_emit(Eo* obj, Test_Object_Data *pd EINA_UNUSED)
175{ 190{
176 fprintf(stderr, "_test_object_event_call()\n"); fflush(stderr); 191 fprintf(stdout, "_test_object_event_emit()\n");
192 fflush(stdout);
177 static Test_Struct_Ex s = {42, TEST_ENUM_EX_THIRD}; 193 static Test_Struct_Ex s = {42, TEST_ENUM_EX_THIRD};
178 eo_event_callback_call(obj, TEST_OBJECT_EVENT_TEST, NULL); 194 eo_event_callback_call(obj, TEST_OBJECT_EVENT_TEST, NULL);
179 eo_event_callback_call(obj, TEST_OBJECT_EVENT_TEST_STRUCTARG, &s); 195 eo_event_callback_call(obj, TEST_OBJECT_EVENT_TEST_STRUCTARG, &s);
@@ -181,13 +197,14 @@ _test_object_call_event(Eo* obj, Test_Object_Data *pd EINA_UNUSED)
181} 197}
182 198
183EOLIAN static char * 199EOLIAN static char *
184_test_object_method_null(Eo* obj EINA_UNUSED, 200_test_object_method_null_check(Eo* obj EINA_UNUSED,
185 Test_Object_Data *pd EINA_UNUSED, 201 Test_Object_Data *pd EINA_UNUSED,
186 char *in, 202 char *in,
187 char **out, 203 char **out,
188 char **inout) 204 char **inout)
189{ 205{
190 fprintf(stdout, "_test_object_method_null(%p, %p, %p)\n", in, out, inout); 206 fprintf(stdout, "_test_object_method_null_check(%p, %p, %p)\n", in, out, inout);
207 fflush(stdout);
191 assert(!in); 208 assert(!in);
192 *out = NULL; 209 *out = NULL;
193 *inout = NULL; 210 *inout = NULL;
@@ -197,20 +214,22 @@ _test_object_method_null(Eo* obj EINA_UNUSED,
197// Arrays // 214// Arrays //
198 215
199EOLIAN static int 216EOLIAN static int
200_test_object_method_array_at(Eo* obj EINA_UNUSED, 217_test_object_method_array_at_check(Eo* obj EINA_UNUSED,
201 Test_Object_Data *pd EINA_UNUSED, 218 Test_Object_Data *pd EINA_UNUSED,
202 Eina_Array *array, 219 Eina_Array *array,
203 int index) 220 int index)
204{ 221{
205 fprintf(stdout, "_test_object_method_array_at(%p, %d)\n", array, index); 222 fprintf(stdout, "_test_object_method_array_at_check(%p, %d)\n", array, index);
223 fflush(stdout);
206 return *((int*)eina_array_data_get(array, index)); 224 return *((int*)eina_array_data_get(array, index));
207} 225}
208 226
209EOLIAN static Eina_Array * 227EOLIAN static Eina_Array *
210_test_object_method_array_with_42(Eo* obj EINA_UNUSED, 228_test_object_method_array_with_42_check(Eo* obj EINA_UNUSED,
211 Test_Object_Data *pd EINA_UNUSED) 229 Test_Object_Data *pd EINA_UNUSED)
212{ 230{
213 fprintf(stdout, "_test_object_method_array_with_42()\n"); 231 fprintf(stdout, "_test_object_method_array_with_42_check()\n");
232 fflush(stdout);
214 Eina_Array *arr = eina_array_new(2); 233 Eina_Array *arr = eina_array_new(2);
215 int* n = malloc(sizeof(int)); 234 int* n = malloc(sizeof(int));
216 *n = 42; 235 *n = 42;
@@ -219,21 +238,23 @@ _test_object_method_array_with_42(Eo* obj EINA_UNUSED,
219} 238}
220 239
221EOLIAN static void 240EOLIAN static void
222_test_object_method_array_in_array_out(Eo* obj EINA_UNUSED, 241_test_object_method_array_in_array_out_check(Eo* obj EINA_UNUSED,
223 Test_Object_Data *pd EINA_UNUSED, 242 Test_Object_Data *pd EINA_UNUSED,
224 Eina_Array *a_in, 243 Eina_Array *a_in,
225 Eina_Array **a_out) 244 Eina_Array **a_out)
226{ 245{
227 fprintf(stdout, "_test_object_method_array_in_array_out(%p, %p)\n", a_in, a_out); 246 fprintf(stdout, "_test_object_method_array_in_array_out_check(%p, %p)\n", a_in, a_out);
247 fflush(stdout);
228 *a_out = a_in; 248 *a_out = a_in;
229} 249}
230 250
231EOLIAN static Eina_Array * 251EOLIAN static Eina_Array *
232_test_object_method_array_of_objects(Eo* obj, 252_test_object_method_array_of_objects_check(Eo* obj,
233 Test_Object_Data *pd EINA_UNUSED, 253 Test_Object_Data *pd EINA_UNUSED,
234 Eina_Array *a_in) 254 Eina_Array *a_in)
235{ 255{
236 fprintf(stdout, "_test_object_method_array_of_objects(%p)\n", a_in); 256 fprintf(stdout, "_test_object_method_array_of_objects_check(%p)\n", a_in);
257 fflush(stdout);
237 if (a_in) return a_in; 258 if (a_in) return a_in;
238 Eina_Array *arr = eina_array_new(2); 259 Eina_Array *arr = eina_array_new(2);
239 eina_array_push(arr, obj); 260 eina_array_push(arr, obj);
@@ -242,11 +263,12 @@ _test_object_method_array_of_objects(Eo* obj,
242 263
243 264
244EOLIAN static Eina_Array * 265EOLIAN static Eina_Array *
245_test_object_method_array_of_strings(Eo* obj EINA_UNUSED, 266_test_object_method_array_of_strings_check(Eo* obj EINA_UNUSED,
246 Test_Object_Data *pd EINA_UNUSED, 267 Test_Object_Data *pd EINA_UNUSED,
247 Eina_Array *a_in) 268 Eina_Array *a_in)
248{ 269{
249 fprintf(stdout, "_test_object_method_array_of_strings(%p)\n", a_in); 270 fprintf(stdout, "_test_object_method_array_of_strings_check(%p)\n", a_in);
271 fflush(stdout);
250 if (a_in) return a_in; 272 if (a_in) return a_in;
251 Eina_Array *arr = eina_array_new(2); 273 Eina_Array *arr = eina_array_new(2);
252 const char* v = "foo"; 274 const char* v = "foo";
@@ -256,11 +278,12 @@ _test_object_method_array_of_strings(Eo* obj EINA_UNUSED,
256} 278}
257 279
258EOLIAN static Eina_Array * 280EOLIAN static Eina_Array *
259_test_object_method_array_of_ints(Eo* obj EINA_UNUSED, 281_test_object_method_array_of_ints_check(Eo* obj EINA_UNUSED,
260 Test_Object_Data *pd EINA_UNUSED, 282 Test_Object_Data *pd EINA_UNUSED,
261 Eina_Array *a_in) 283 Eina_Array *a_in)
262{ 284{
263 fprintf(stdout, "_test_object_method_array_of_ints(%p)\n", a_in); 285 fprintf(stdout, "_test_object_method_array_of_ints_check(%p)\n", a_in);
286 fflush(stdout);
264 if (a_in) return a_in; 287 if (a_in) return a_in;
265 int *v = malloc(sizeof(int)); 288 int *v = malloc(sizeof(int));
266 *v = 42; 289 *v = 42;
@@ -270,11 +293,12 @@ _test_object_method_array_of_ints(Eo* obj EINA_UNUSED,
270} 293}
271 294
272EOLIAN static Eina_Array * 295EOLIAN static Eina_Array *
273_test_object_method_array_of_bools(Eo* obj EINA_UNUSED, 296_test_object_method_array_of_bools_check(Eo* obj EINA_UNUSED,
274 Test_Object_Data *pd EINA_UNUSED, 297 Test_Object_Data *pd EINA_UNUSED,
275 Eina_Array *a_in) 298 Eina_Array *a_in)
276{ 299{
277 fprintf(stdout, "_test_object_method_array_of_bools(%p)\n", a_in); 300 fprintf(stdout, "_test_object_method_array_of_bools_check(%p)\n", a_in);
301 fflush(stdout);
278 if (a_in) return a_in; 302 if (a_in) return a_in;
279 Eina_Bool *v = malloc(sizeof(Eina_Bool)); 303 Eina_Bool *v = malloc(sizeof(Eina_Bool));
280 *v = EINA_TRUE; 304 *v = EINA_TRUE;
@@ -284,11 +308,12 @@ _test_object_method_array_of_bools(Eo* obj EINA_UNUSED,
284} 308}
285 309
286EOLIAN static Eina_Array * 310EOLIAN static Eina_Array *
287_test_object_method_array_of_doubles(Eo* obj EINA_UNUSED, 311_test_object_method_array_of_doubles_check(Eo* obj EINA_UNUSED,
288 Test_Object_Data *pd EINA_UNUSED, 312 Test_Object_Data *pd EINA_UNUSED,
289 Eina_Array *a_in) 313 Eina_Array *a_in)
290{ 314{
291 fprintf(stdout, "_test_object_method_array_of_doubles(%p)\n", a_in); 315 fprintf(stdout, "_test_object_method_array_of_doubles_check(%p)\n", a_in);
316 fflush(stdout);
292 if (a_in) return a_in; 317 if (a_in) return a_in;
293 double *v = malloc(sizeof(double)); 318 double *v = malloc(sizeof(double));
294 *v = 42; 319 *v = 42;
@@ -298,11 +323,12 @@ _test_object_method_array_of_doubles(Eo* obj EINA_UNUSED,
298} 323}
299 324
300EOLIAN static Eina_Array * 325EOLIAN static Eina_Array *
301_test_object_method_array_of_enums(Eo* obj EINA_UNUSED, 326_test_object_method_array_of_enums_check(Eo* obj EINA_UNUSED,
302 Test_Object_Data *pd EINA_UNUSED, 327 Test_Object_Data *pd EINA_UNUSED,
303 Eina_Array *a_in) 328 Eina_Array *a_in)
304{ 329{
305 fprintf(stdout, "_test_object_method_array_of_enums(%p)\n", a_in); 330 fprintf(stdout, "_test_object_method_array_of_enums_check(%p)\n", a_in);
331 fflush(stdout);
306 if (a_in) return a_in; 332 if (a_in) return a_in;
307 Test_Enum_Ex *v = malloc(sizeof(Test_Enum_Ex)); 333 Test_Enum_Ex *v = malloc(sizeof(Test_Enum_Ex));
308 *v = TEST_ENUM_EX_THIRD; 334 *v = TEST_ENUM_EX_THIRD;
@@ -312,11 +338,12 @@ _test_object_method_array_of_enums(Eo* obj EINA_UNUSED,
312} 338}
313 339
314EOLIAN static Eina_Array * 340EOLIAN static Eina_Array *
315_test_object_method_array_of_structs(Eo* obj EINA_UNUSED, 341_test_object_method_array_of_structs_check(Eo* obj EINA_UNUSED,
316 Test_Object_Data *pd EINA_UNUSED, 342 Test_Object_Data *pd EINA_UNUSED,
317 Eina_Array *a_in) 343 Eina_Array *a_in)
318{ 344{
319 fprintf(stdout, "_test_object_method_array_of_structs(%p)\n", a_in); 345 fprintf(stdout, "_test_object_method_array_of_structs_check(%p)\n", a_in);
346 fflush(stdout);
320 if (a_in) return a_in; 347 if (a_in) return a_in;
321 Test_Struct_Ex *v = malloc(sizeof(Test_Struct_Ex)); 348 Test_Struct_Ex *v = malloc(sizeof(Test_Struct_Ex));
322 v->value_int = 42; 349 v->value_int = 42;
@@ -327,11 +354,12 @@ _test_object_method_array_of_structs(Eo* obj EINA_UNUSED,
327} 354}
328 355
329EOLIAN static Eina_Array * 356EOLIAN static Eina_Array *
330_test_object_method_array_of_arrays_of_ints(Eo* obj EINA_UNUSED, 357_test_object_method_array_of_arrays_of_ints_check(Eo* obj EINA_UNUSED,
331 Test_Object_Data *pd EINA_UNUSED, 358 Test_Object_Data *pd EINA_UNUSED,
332 Eina_Array *a_in) 359 Eina_Array *a_in)
333{ 360{
334 fprintf(stdout, "_test_object_method_array_of_arrays_of_ints(%p)\n", a_in); 361 fprintf(stdout, "_test_object_method_array_of_arrays_of_ints_check(%p)\n", a_in);
362 fflush(stdout);
335 if (a_in) return a_in; 363 if (a_in) return a_in;
336 int *v = malloc(sizeof(int)); 364 int *v = malloc(sizeof(int));
337 *v = 42; 365 *v = 42;
@@ -345,52 +373,57 @@ _test_object_method_array_of_arrays_of_ints(Eo* obj EINA_UNUSED,
345// Lists // 373// Lists //
346 374
347EOLIAN static Eina_List * 375EOLIAN static Eina_List *
348_test_object_method_list_with_42(Eo* obj EINA_UNUSED, 376_test_object_method_list_with_42_check(Eo* obj EINA_UNUSED,
349 Test_Object_Data *pd EINA_UNUSED) 377 Test_Object_Data *pd EINA_UNUSED)
350{ 378{
351 fprintf(stdout, "_test_object_method_list_with_42()\n"); 379 fprintf(stdout, "_test_object_method_list_with_42_check()\n");
380 fflush(stdout);
352 int* n = malloc(sizeof(int)); 381 int* n = malloc(sizeof(int));
353 *n = 42; 382 *n = 42;
354 return eina_list_append(NULL, n); 383 return eina_list_append(NULL, n);
355} 384}
356 385
357EOLIAN static void 386EOLIAN static void
358_test_object_method_list_in_list_out(Eo* obj EINA_UNUSED, 387_test_object_method_list_in_list_out_check(Eo* obj EINA_UNUSED,
359 Test_Object_Data *pd EINA_UNUSED, 388 Test_Object_Data *pd EINA_UNUSED,
360 Eina_List *l_in, 389 Eina_List *l_in,
361 Eina_List **l_out) 390 Eina_List **l_out)
362{ 391{
363 fprintf(stdout, "_test_object_method_list_in_list_out(%p , %p)\n", l_in, l_out); 392 fprintf(stdout, "_test_object_method_list_in_list_out_check(%p , %p)\n", l_in, l_out);
393 fflush(stdout);
364 *l_out = l_in; 394 *l_out = l_in;
365} 395}
366 396
367EOLIAN static Eina_List * 397EOLIAN static Eina_List *
368_test_object_method_list_of_objects(Eo* obj, 398_test_object_method_list_of_objects_check(Eo* obj,
369 Test_Object_Data *pd EINA_UNUSED, 399 Test_Object_Data *pd EINA_UNUSED,
370 Eina_List *l_in) 400 Eina_List *l_in)
371{ 401{
372 fprintf(stdout, "_test_object_method_list_of_objects(%p)\n", l_in); 402 fprintf(stdout, "_test_object_method_list_of_objects_check(%p)\n", l_in);
403 fflush(stdout);
373 if (l_in) return l_in; 404 if (l_in) return l_in;
374 return eina_list_append(NULL, obj); 405 return eina_list_append(NULL, obj);
375} 406}
376 407
377 408
378EOLIAN static Eina_List * 409EOLIAN static Eina_List *
379_test_object_method_list_of_strings(Eo* obj EINA_UNUSED, 410_test_object_method_list_of_strings_check(Eo* obj EINA_UNUSED,
380 Test_Object_Data *pd EINA_UNUSED, 411 Test_Object_Data *pd EINA_UNUSED,
381 Eina_List *l_in) 412 Eina_List *l_in)
382{ 413{
383 fprintf(stdout, "_test_object_method_list_of_strings(%p)\n", l_in); 414 fprintf(stdout, "_test_object_method_list_of_strings_check(%p)\n", l_in);
415 fflush(stdout);
384 if (l_in) return l_in; 416 if (l_in) return l_in;
385 return eina_list_append(NULL, "foo"); 417 return eina_list_append(NULL, "foo");
386} 418}
387 419
388EOLIAN static Eina_List * 420EOLIAN static Eina_List *
389_test_object_method_list_of_ints(Eo* obj EINA_UNUSED, 421_test_object_method_list_of_ints_check(Eo* obj EINA_UNUSED,
390 Test_Object_Data *pd EINA_UNUSED, 422 Test_Object_Data *pd EINA_UNUSED,
391 Eina_List *l_in) 423 Eina_List *l_in)
392{ 424{
393 fprintf(stdout, "_test_object_method_list_of_ints(%p)\n", l_in); 425 fprintf(stdout, "_test_object_method_list_of_ints_check(%p)\n", l_in);
426 fflush(stdout);
394 if (l_in) return l_in; 427 if (l_in) return l_in;
395 int *v = malloc(sizeof(int)); 428 int *v = malloc(sizeof(int));
396 *v = 42; 429 *v = 42;
@@ -398,11 +431,12 @@ _test_object_method_list_of_ints(Eo* obj EINA_UNUSED,
398} 431}
399 432
400EOLIAN static Eina_List * 433EOLIAN static Eina_List *
401_test_object_method_list_of_bools(Eo* obj EINA_UNUSED, 434_test_object_method_list_of_bools_check(Eo* obj EINA_UNUSED,
402 Test_Object_Data *pd EINA_UNUSED, 435 Test_Object_Data *pd EINA_UNUSED,
403 Eina_List *l_in) 436 Eina_List *l_in)
404{ 437{
405 fprintf(stdout, "_test_object_method_list_of_bools(%p)\n", l_in); 438 fprintf(stdout, "_test_object_method_list_of_bools_check(%p)\n", l_in);
439 fflush(stdout);
406 if (l_in) return l_in; 440 if (l_in) return l_in;
407 Eina_Bool *v = malloc(sizeof(Eina_Bool)); 441 Eina_Bool *v = malloc(sizeof(Eina_Bool));
408 *v = EINA_TRUE; 442 *v = EINA_TRUE;
@@ -410,11 +444,12 @@ _test_object_method_list_of_bools(Eo* obj EINA_UNUSED,
410} 444}
411 445
412EOLIAN static Eina_List * 446EOLIAN static Eina_List *
413_test_object_method_list_of_doubles(Eo* obj EINA_UNUSED, 447_test_object_method_list_of_doubles_check(Eo* obj EINA_UNUSED,
414 Test_Object_Data *pd EINA_UNUSED, 448 Test_Object_Data *pd EINA_UNUSED,
415 Eina_List *l_in) 449 Eina_List *l_in)
416{ 450{
417 fprintf(stdout, "_test_object_method_list_of_doubles(%p)\n", l_in); 451 fprintf(stdout, "_test_object_method_list_of_doubles_check(%p)\n", l_in);
452 fflush(stdout);
418 if (l_in) return l_in; 453 if (l_in) return l_in;
419 double *v = malloc(sizeof(double)); 454 double *v = malloc(sizeof(double));
420 *v = 42; 455 *v = 42;
@@ -422,11 +457,12 @@ _test_object_method_list_of_doubles(Eo* obj EINA_UNUSED,
422} 457}
423 458
424EOLIAN static Eina_List * 459EOLIAN static Eina_List *
425_test_object_method_list_of_enums(Eo* obj EINA_UNUSED, 460_test_object_method_list_of_enums_check(Eo* obj EINA_UNUSED,
426 Test_Object_Data *pd EINA_UNUSED, 461 Test_Object_Data *pd EINA_UNUSED,
427 Eina_List *l_in) 462 Eina_List *l_in)
428{ 463{
429 fprintf(stdout, "_test_object_method_list_of_enums(%p)\n", l_in); 464 fprintf(stdout, "_test_object_method_list_of_enums_check(%p)\n", l_in);
465 fflush(stdout);
430 if (l_in) return l_in; 466 if (l_in) return l_in;
431 Test_Enum_Ex *v = malloc(sizeof(Test_Enum_Ex)); 467 Test_Enum_Ex *v = malloc(sizeof(Test_Enum_Ex));
432 *v = TEST_ENUM_EX_THIRD; 468 *v = TEST_ENUM_EX_THIRD;
@@ -434,11 +470,12 @@ _test_object_method_list_of_enums(Eo* obj EINA_UNUSED,
434} 470}
435 471
436EOLIAN static Eina_List * 472EOLIAN static Eina_List *
437_test_object_method_list_of_structs(Eo* obj EINA_UNUSED, 473_test_object_method_list_of_structs_check(Eo* obj EINA_UNUSED,
438 Test_Object_Data *pd EINA_UNUSED, 474 Test_Object_Data *pd EINA_UNUSED,
439 Eina_List *l_in) 475 Eina_List *l_in)
440{ 476{
441 fprintf(stdout, "_test_object_method_list_of_structs(%p)\n", l_in); 477 fprintf(stdout, "_test_object_method_list_of_structs_check(%p)\n", l_in);
478 fflush(stdout);
442 if (l_in) return l_in; 479 if (l_in) return l_in;
443 Test_Struct_Ex *v = malloc(sizeof(Test_Struct_Ex)); 480 Test_Struct_Ex *v = malloc(sizeof(Test_Struct_Ex));
444 v->value_int = 42; 481 v->value_int = 42;
@@ -449,11 +486,12 @@ _test_object_method_list_of_structs(Eo* obj EINA_UNUSED,
449// Accessors // 486// Accessors //
450 487
451EOLIAN static Eina_Accessor * 488EOLIAN static Eina_Accessor *
452_test_object_method_accessor_of_objects(Eo* obj, 489_test_object_method_accessor_of_objects_check(Eo* obj,
453 Test_Object_Data *pd EINA_UNUSED, 490 Test_Object_Data *pd EINA_UNUSED,
454 Eina_Accessor *a_in) 491 Eina_Accessor *a_in)
455{ 492{
456 fprintf(stdout, "_test_object_method_accessor_of_objects(%p)\n", a_in); 493 fprintf(stdout, "_test_object_method_accessor_of_objects_check(%p)\n", a_in);
494 fflush(stdout);
457 if (a_in) return a_in; 495 if (a_in) return a_in;
458 Eina_Array *arr = eina_array_new(2); 496 Eina_Array *arr = eina_array_new(2);
459 eina_array_push(arr, obj); 497 eina_array_push(arr, obj);
@@ -461,11 +499,12 @@ _test_object_method_accessor_of_objects(Eo* obj,
461} 499}
462 500
463EOLIAN static Eina_Accessor * 501EOLIAN static Eina_Accessor *
464_test_object_method_accessor_of_strings(Eo* obj EINA_UNUSED, 502_test_object_method_accessor_of_strings_check(Eo* obj EINA_UNUSED,
465 Test_Object_Data *pd EINA_UNUSED, 503 Test_Object_Data *pd EINA_UNUSED,
466 Eina_Accessor *a_in) 504 Eina_Accessor *a_in)
467{ 505{
468 fprintf(stdout, "_test_object_method_accessor_of_strings(%p)\n", a_in); 506 fprintf(stdout, "_test_object_method_accessor_of_strings_check(%p)\n", a_in);
507 fflush(stdout);
469 if (a_in) return a_in; 508 if (a_in) return a_in;
470 Eina_Array *arr = eina_array_new(2); 509 Eina_Array *arr = eina_array_new(2);
471 eina_array_push(arr, "foo"); 510 eina_array_push(arr, "foo");
@@ -473,11 +512,12 @@ _test_object_method_accessor_of_strings(Eo* obj EINA_UNUSED,
473} 512}
474 513
475EOLIAN static Eina_Accessor * 514EOLIAN static Eina_Accessor *
476_test_object_method_accessor_of_ints(Eo* obj EINA_UNUSED, 515_test_object_method_accessor_of_ints_check(Eo* obj EINA_UNUSED,
477 Test_Object_Data *pd EINA_UNUSED, 516 Test_Object_Data *pd EINA_UNUSED,
478 Eina_Accessor *a_in) 517 Eina_Accessor *a_in)
479{ 518{
480 fprintf(stdout, "_test_object_method_accessor_of_ints(%p)\n", a_in); 519 fprintf(stdout, "_test_object_method_accessor_of_ints_check(%p)\n", a_in);
520 fflush(stdout);
481 if (a_in) return a_in; 521 if (a_in) return a_in;
482 int *v = malloc(sizeof(int)); 522 int *v = malloc(sizeof(int));
483 *v = 42; 523 *v = 42;
@@ -487,11 +527,12 @@ _test_object_method_accessor_of_ints(Eo* obj EINA_UNUSED,
487} 527}
488 528
489EOLIAN static Eina_Accessor * 529EOLIAN static Eina_Accessor *
490_test_object_method_accessor_of_bools(Eo* obj EINA_UNUSED, 530_test_object_method_accessor_of_bools_check(Eo* obj EINA_UNUSED,
491 Test_Object_Data *pd EINA_UNUSED, 531 Test_Object_Data *pd EINA_UNUSED,
492 Eina_Accessor *a_in) 532 Eina_Accessor *a_in)
493{ 533{
494 fprintf(stdout, "_test_object_method_accessor_of_bools(%p)\n", a_in); 534 fprintf(stdout, "_test_object_method_accessor_of_bools_check(%p)\n", a_in);
535 fflush(stdout);
495 if (a_in) return a_in; 536 if (a_in) return a_in;
496 Eina_Bool *v = malloc(sizeof(Eina_Bool)); 537 Eina_Bool *v = malloc(sizeof(Eina_Bool));
497 *v = EINA_TRUE; 538 *v = EINA_TRUE;
@@ -501,11 +542,12 @@ _test_object_method_accessor_of_bools(Eo* obj EINA_UNUSED,
501} 542}
502 543
503EOLIAN static Eina_Accessor * 544EOLIAN static Eina_Accessor *
504_test_object_method_accessor_of_doubles(Eo* obj EINA_UNUSED, 545_test_object_method_accessor_of_doubles_check(Eo* obj EINA_UNUSED,
505 Test_Object_Data *pd EINA_UNUSED, 546 Test_Object_Data *pd EINA_UNUSED,
506 Eina_Accessor *a_in) 547 Eina_Accessor *a_in)
507{ 548{
508 fprintf(stdout, "_test_object_method_accessor_of_doubles(%p)\n", a_in); 549 fprintf(stdout, "_test_object_method_accessor_of_doubles_check(%p)\n", a_in);
550 fflush(stdout);
509 if (a_in) return a_in; 551 if (a_in) return a_in;
510 double *v = malloc(sizeof(double)); 552 double *v = malloc(sizeof(double));
511 *v = 42.0; 553 *v = 42.0;
@@ -515,11 +557,12 @@ _test_object_method_accessor_of_doubles(Eo* obj EINA_UNUSED,
515} 557}
516 558
517EOLIAN static Eina_Accessor * 559EOLIAN static Eina_Accessor *
518_test_object_method_accessor_of_enums(Eo* obj EINA_UNUSED, 560_test_object_method_accessor_of_enums_check(Eo* obj EINA_UNUSED,
519 Test_Object_Data *pd EINA_UNUSED, 561 Test_Object_Data *pd EINA_UNUSED,
520 Eina_Accessor *a_in) 562 Eina_Accessor *a_in)
521{ 563{
522 fprintf(stdout, "_test_object_method_accessor_of_enums(%p)\n", a_in); 564 fprintf(stdout, "_test_object_method_accessor_of_enums_check(%p)\n", a_in);
565 fflush(stdout);
523 if (a_in) return a_in; 566 if (a_in) return a_in;
524 Test_Enum_Ex *v = malloc(sizeof(Test_Enum_Ex)); 567 Test_Enum_Ex *v = malloc(sizeof(Test_Enum_Ex));
525 *v = TEST_ENUM_EX_THIRD; 568 *v = TEST_ENUM_EX_THIRD;
@@ -529,11 +572,12 @@ _test_object_method_accessor_of_enums(Eo* obj EINA_UNUSED,
529} 572}
530 573
531EOLIAN static Eina_Accessor * 574EOLIAN static Eina_Accessor *
532_test_object_method_accessor_of_structs(Eo* obj EINA_UNUSED, 575_test_object_method_accessor_of_structs_check(Eo* obj EINA_UNUSED,
533 Test_Object_Data *pd EINA_UNUSED, 576 Test_Object_Data *pd EINA_UNUSED,
534 Eina_Accessor *a_in) 577 Eina_Accessor *a_in)
535{ 578{
536 fprintf(stdout, "_test_object_method_accessor_of_structs(%p)\n", a_in); 579 fprintf(stdout, "_test_object_method_accessor_of_structs_check(%p)\n", a_in);
580 fflush(stdout);
537 if (a_in) return a_in; 581 if (a_in) return a_in;
538 Test_Struct_Ex *v = malloc(sizeof(Test_Struct_Ex)); 582 Test_Struct_Ex *v = malloc(sizeof(Test_Struct_Ex));
539 v->value_int = 42; 583 v->value_int = 42;
@@ -546,11 +590,12 @@ _test_object_method_accessor_of_structs(Eo* obj EINA_UNUSED,
546// Combinations of complex types 590// Combinations of complex types
547 591
548EOLIAN static Eina_List * 592EOLIAN static Eina_List *
549_test_object_method_list_of_lists_of_ints(Eo* obj EINA_UNUSED, 593_test_object_method_list_of_lists_of_ints_check(Eo* obj EINA_UNUSED,
550 Test_Object_Data *pd EINA_UNUSED, 594 Test_Object_Data *pd EINA_UNUSED,
551 Eina_List *l_in) 595 Eina_List *l_in)
552{ 596{
553 fprintf(stdout, "_test_object_method_list_of_lists_of_ints(%p)\n", l_in); 597 fprintf(stdout, "_test_object_method_list_of_lists_of_ints_check(%p)\n", l_in);
598 fflush(stdout);
554 if (l_in) return l_in; 599 if (l_in) return l_in;
555 int *v = malloc(sizeof(int)); 600 int *v = malloc(sizeof(int));
556 *v = 42; 601 *v = 42;
@@ -558,11 +603,12 @@ _test_object_method_list_of_lists_of_ints(Eo* obj EINA_UNUSED,
558} 603}
559 604
560EOLIAN static Eina_Array * 605EOLIAN static Eina_Array *
561_test_object_method_array_of_lists_of_ints(Eo* obj EINA_UNUSED, 606_test_object_method_array_of_lists_of_ints_check(Eo* obj EINA_UNUSED,
562 Test_Object_Data *pd EINA_UNUSED, 607 Test_Object_Data *pd EINA_UNUSED,
563 Eina_Array *a_in) 608 Eina_Array *a_in)
564{ 609{
565 fprintf(stdout, "_test_object_method_array_of_lists_of_ints(%p)\n", a_in); 610 fprintf(stdout, "_test_object_method_array_of_lists_of_ints_check(%p)\n", a_in);
611 fflush(stdout);
566 if (a_in) return a_in; 612 if (a_in) return a_in;
567 int *v = malloc(sizeof(int)); 613 int *v = malloc(sizeof(int));
568 *v = 42; 614 *v = 42;
@@ -572,11 +618,12 @@ _test_object_method_array_of_lists_of_ints(Eo* obj EINA_UNUSED,
572} 618}
573 619
574EOLIAN static Eina_List * 620EOLIAN static Eina_List *
575_test_object_method_list_of_arrays_of_ints(Eo* obj EINA_UNUSED, 621_test_object_method_list_of_arrays_of_ints_check(Eo* obj EINA_UNUSED,
576 Test_Object_Data *pd EINA_UNUSED, 622 Test_Object_Data *pd EINA_UNUSED,
577 Eina_List *l_in) 623 Eina_List *l_in)
578{ 624{
579 fprintf(stdout, "_test_object_method_list_of_arrays_of_ints(%p)\n", l_in); 625 fprintf(stdout, "_test_object_method_list_of_arrays_of_ints_check(%p)\n", l_in);
626 fflush(stdout);
580 if (l_in) return l_in; 627 if (l_in) return l_in;
581 int *v = malloc(sizeof(int)); 628 int *v = malloc(sizeof(int));
582 *v = 42; 629 *v = 42;
@@ -586,35 +633,40 @@ _test_object_method_list_of_arrays_of_ints(Eo* obj EINA_UNUSED,
586} 633}
587 634
588EOLIAN static const Eina_List * 635EOLIAN static const Eina_List *
589_test_object_method_list_with_opaque_elements(Eo* obj EINA_UNUSED, 636_test_object_method_list_with_opaque_elements_check(Eo* obj EINA_UNUSED,
590 Test_Object_Data *pd EINA_UNUSED) 637 Test_Object_Data *pd EINA_UNUSED)
591{ 638{
592 fprintf(stdout, "_test_object_method_list_with_opaque_elements()\n"); 639 fprintf(stdout, "_test_object_method_list_with_opaque_elements_check()\n");
640 fflush(stdout);
593 return NULL; 641 return NULL;
594} 642}
595 643
596EOLIAN static Test_Enum_Ex 644EOLIAN static Test_Enum_Ex
597_test_object_method_in_enum_return_enum(Eo* obj EINA_UNUSED, 645_test_object_method_in_enum_return_enum_check(Eo* obj EINA_UNUSED,
598 Test_Object_Data *pd EINA_UNUSED, 646 Test_Object_Data *pd EINA_UNUSED,
599 Test_Enum_Ex e) 647 Test_Enum_Ex e)
600{ 648{
601 fprintf(stdout, "_test_object_method_in_enum_return_enum(%d)\n", e); 649 fprintf(stdout, "_test_object_method_in_enum_return_enum_check(%d)\n", e);
650 fflush(stdout);
602 return e; 651 return e;
603} 652}
604 653
605EOLIAN static Test_Struct_Ex * 654EOLIAN static Test_Struct_Ex *
606_test_object_method_in_struct_return_struct(Eo* obj EINA_UNUSED, 655_test_object_method_in_struct_return_struct_check(Eo* obj EINA_UNUSED,
607 Test_Object_Data *pd EINA_UNUSED, 656 Test_Object_Data *pd EINA_UNUSED,
608 Test_Struct_Ex *s) 657 Test_Struct_Ex *s)
609{ 658{
610 fprintf(stdout, "_test_object_method_in_struct_return_struct()\n"); 659 fprintf(stdout, "_test_object_method_in_struct_return_struct_check(%p)\n", s);
660 fflush(stdout);
611 return s; 661 return s;
612} 662}
613 663
614EOLIAN static void 664EOLIAN static void
615_test_object_event_repeated_event_name(Eo* obj EINA_UNUSED, 665_test_object_event_repeated_event_name(Eo* obj EINA_UNUSED,
616 Test_Object_Data *pd EINA_UNUSED) 666 Test_Object_Data *pd EINA_UNUSED)
617{ 667{
668 fprintf(stdout, "_test_object_event_repeated_event_name()\n");
669 fflush(stdout);
618} 670}
619 671
620#include <test_object.eo.c> 672#include <test_object.eo.c>
diff --git a/src/tests/eolian_js/test_object.eo b/src/tests/eolian_js/test_object.eo
index c292c24..81043fe 100644
--- a/src/tests/eolian_js/test_object.eo
+++ b/src/tests/eolian_js/test_object.eo
@@ -13,23 +13,23 @@ struct Test.Struct_Ex {
13class Test.Object (Eo.Base) { 13class Test.Object (Eo.Base) {
14 legacy_prefix: null; 14 legacy_prefix: null;
15 methods { 15 methods {
16 method_integral_in_a { 16 method_integral_in_a_check {
17 [[ tests integral in ]] 17 [[ tests integral in ]]
18 params { a: int; } 18 params { a: int; }
19 } 19 }
20 method_integral_out_a { 20 method_integral_out_a_check {
21 [[ tests integral out ]] 21 [[ tests integral out ]]
22 params { @out a: int; } 22 params { @out a: int; }
23 } 23 }
24 method_integral_inout { 24 method_integral_inout_check {
25 [[ tests integral inout ]] 25 [[ tests integral inout ]]
26 params { @inout a: int; } 26 params { @inout a: int; }
27 } 27 }
28 method_integral_return_a { 28 method_integral_return_a_check {
29 [[ tests integral result ]] 29 [[ tests integral result ]]
30 return: int; 30 return: int;
31 } 31 }
32 method_div_mod { 32 method_div_mod_check {
33 [[ tests mixed in, outs and result ]] 33 [[ tests mixed in, outs and result ]]
34 params { 34 params {
35 a: int; 35 a: int;
@@ -39,7 +39,7 @@ class Test.Object (Eo.Base) {
39 } 39 }
40 return: bool; 40 return: bool;
41 } 41 }
42 method_and { 42 method_and_check {
43 [[ tests boolean ]] 43 [[ tests boolean ]]
44 params { 44 params {
45 a: bool; 45 a: bool;
@@ -47,7 +47,7 @@ class Test.Object (Eo.Base) {
47 } 47 }
48 return: bool; 48 return: bool;
49 } 49 }
50 method_modf { 50 method_modf_check {
51 [[ tests floating point ]] 51 [[ tests floating point ]]
52 params { 52 params {
53 a: double; 53 a: double;
@@ -55,38 +55,38 @@ class Test.Object (Eo.Base) {
55 } 55 }
56 return: double; 56 return: double;
57 } 57 }
58 method_uppercase { 58 method_uppercase_check {
59 [[ tests string ]] 59 [[ tests string ]]
60 params { 60 params {
61 @inout str: char*; 61 @inout str: char*;
62 } 62 }
63 } 63 }
64 method_in_null { 64 method_in_null_check {
65 [[ tests null input ]] 65 [[ tests null input ]]
66 params { 66 params {
67 a: char*; 67 a: char*;
68 } 68 }
69 return: bool; 69 return: bool;
70 } 70 }
71 method_out_null { 71 method_out_null_check {
72 [[ tests null output ]] 72 [[ tests null output ]]
73 params { 73 params {
74 @out a: char*; 74 @out a: char*;
75 } 75 }
76 return: bool; 76 return: bool;
77 } 77 }
78 method_inout_null { 78 method_inout_null_check {
79 [[ tests null output ]] 79 [[ tests null output ]]
80 params { 80 params {
81 @inout a: char*; 81 @inout a: char*;
82 } 82 }
83 return: bool; 83 return: bool;
84 } 84 }
85 method_return_null { 85 method_return_null_check {
86 [[ tests null return ]] 86 [[ tests null return ]]
87 return: char*; 87 return: char*;
88 } 88 }
89 method_null { 89 method_null_check {
90 [[ tests null values ]] 90 [[ tests null values ]]
91 params { 91 params {
92 in: char*; 92 in: char*;
@@ -95,7 +95,7 @@ class Test.Object (Eo.Base) {
95 } 95 }
96 return: char*; 96 return: char*;
97 } 97 }
98 method_array_at { 98 method_array_at_check {
99 [[ tests array ]] 99 [[ tests array ]]
100 params { 100 params {
101 array: array<int>*; 101 array: array<int>*;
@@ -103,190 +103,190 @@ class Test.Object (Eo.Base) {
103 } 103 }
104 return: int; 104 return: int;
105 } 105 }
106 method_array_with_42 { 106 method_array_with_42_check {
107 [[ tests parameters ]] 107 [[ tests parameters ]]
108 return: free(own(array<int> *), eina_array_free) @warn_unused; 108 return: free(own(array<int> *), eina_array_free) @warn_unused;
109 } 109 }
110 method_array_in_array_out { 110 method_array_in_array_out_check {
111 [[ tests parameters ]] 111 [[ tests parameters ]]
112 params { 112 params {
113 @in a_in: array<int> *; 113 @in a_in: array<int> *;
114 @out a_out: array<int> *; 114 @out a_out: array<int> *;
115 } 115 }
116 } 116 }
117 method_array_of_objects { 117 method_array_of_objects_check {
118 params { 118 params {
119 @in a_in: array<Test.Object *> *; 119 @in a_in: array<Test.Object *> *;
120 } 120 }
121 return: array<Test.Object *> *; 121 return: array<Test.Object *> *;
122 } 122 }
123 method_array_of_strings { 123 method_array_of_strings_check {
124 params { 124 params {
125 @in a_in: array<const(char) *> *; 125 @in a_in: array<const(char) *> *;
126 } 126 }
127 return: array<const(char) *> *; 127 return: array<const(char) *> *;
128 } 128 }
129 method_array_of_ints { 129 method_array_of_ints_check {
130 params { 130 params {
131 @in a_in: array<int> *; 131 @in a_in: array<int> *;
132 } 132 }
133 return: array<int> *; 133 return: array<int> *;
134 } 134 }
135 method_array_of_bools { 135 method_array_of_bools_check {
136 params { 136 params {
137 @in a_in: array<bool> *; 137 @in a_in: array<bool> *;
138 } 138 }
139 return: array<bool> *; 139 return: array<bool> *;
140 } 140 }
141 method_array_of_doubles { 141 method_array_of_doubles_check {
142 params { 142 params {
143 @in a_in: array<double> *; 143 @in a_in: array<double> *;
144 } 144 }
145 return: array<double> *; 145 return: array<double> *;
146 } 146 }
147 method_array_of_enums { 147 method_array_of_enums_check {
148 params { 148 params {
149 @in a_in: array<Test.Enum_Ex> *; 149 @in a_in: array<Test.Enum_Ex> *;
150 } 150 }
151 return: array<Test.Enum_Ex> *; 151 return: array<Test.Enum_Ex> *;
152 } 152 }
153 method_array_of_structs { 153 method_array_of_structs_check {
154 params { 154 params {
155 @in a_in: array<Test.Struct_Ex> *; 155 @in a_in: array<Test.Struct_Ex> *;
156 } 156 }
157 return: array<Test.Struct_Ex> *; 157 return: array<Test.Struct_Ex> *;
158 } 158 }
159 method_list_with_42 { 159 method_list_with_42_check {
160 [[ tests parameters ]] 160 [[ tests parameters ]]
161 return: free(own(list<int> *), eina_list_free) @warn_unused; 161 return: free(own(list<int> *), eina_list_free) @warn_unused;
162 } 162 }
163 method_list_in_list_out { 163 method_list_in_list_out_check {
164 [[ tests parameters ]] 164 [[ tests parameters ]]
165 params { 165 params {
166 @in l_in: list<int> *; 166 @in l_in: list<int> *;
167 @out l_out: list<int> *; 167 @out l_out: list<int> *;
168 } 168 }
169 } 169 }
170 method_list_of_objects { 170 method_list_of_objects_check {
171 params { 171 params {
172 @in l_in: list<Test.Object *> *; 172 @in l_in: list<Test.Object *> *;
173 } 173 }
174 return: list<Test.Object *> *; 174 return: list<Test.Object *> *;
175 } 175 }
176 method_list_of_strings { 176 method_list_of_strings_check {
177 params { 177 params {
178 @in l_in: list<const(char) *> *; 178 @in l_in: list<const(char) *> *;
179 } 179 }
180 return: list<const(char) *> *; 180 return: list<const(char) *> *;
181 } 181 }
182 method_list_of_ints { 182 method_list_of_ints_check {
183 params { 183 params {
184 @in l_in: list<int> *; 184 @in l_in: list<int> *;
185 } 185 }
186 return: list<int> *; 186 return: list<int> *;
187 } 187 }
188 method_list_of_bools { 188 method_list_of_bools_check {
189 params { 189 params {
190 @in l_in: list<bool> *; 190 @in l_in: list<bool> *;
191 } 191 }
192 return: list<bool> *; 192 return: list<bool> *;
193 } 193 }
194 method_list_of_doubles { 194 method_list_of_doubles_check {
195 params { 195 params {
196 @in l_in: list<double> *; 196 @in l_in: list<double> *;
197 } 197 }
198 return: list<double> *; 198 return: list<double> *;
199 } 199 }
200 method_list_of_enums { 200 method_list_of_enums_check {
201 params { 201 params {
202 @in l_in: list<Test.Enum_Ex> *; 202 @in l_in: list<Test.Enum_Ex> *;
203 } 203 }
204 return: list<Test.Enum_Ex> *; 204 return: list<Test.Enum_Ex> *;
205 } 205 }
206 method_list_of_structs { 206 method_list_of_structs_check {
207 params { 207 params {
208 @in l_in: list<Test.Struct_Ex> *; 208 @in l_in: list<Test.Struct_Ex> *;
209 } 209 }
210 return: list<Test.Struct_Ex> *; 210 return: list<Test.Struct_Ex> *;
211 } 211 }
212 method_accessor_of_objects { 212 method_accessor_of_objects_check {
213 params { 213 params {
214 @in a_in: accessor<Test.Object *> *; 214 @in a_in: accessor<Test.Object *> *;
215 } 215 }
216 return: accessor<Test.Object *> *; 216 return: accessor<Test.Object *> *;
217 } 217 }
218 method_accessor_of_strings { 218 method_accessor_of_strings_check {
219 params { 219 params {
220 @in a_in: accessor<const(char) *> *; 220 @in a_in: accessor<const(char) *> *;
221 } 221 }
222 return: accessor<const(char) *> *; 222 return: accessor<const(char) *> *;
223 } 223 }
224 method_accessor_of_ints { 224 method_accessor_of_ints_check {
225 params { 225 params {
226 @in a_in: accessor<int> *; 226 @in a_in: accessor<int> *;
227 } 227 }
228 return: accessor<int> *; 228 return: accessor<int> *;
229 } 229 }
230 method_accessor_of_bools { 230 method_accessor_of_bools_check {
231 params { 231 params {
232 @in a_in: accessor<bool> *; 232 @in a_in: accessor<bool> *;
233 } 233 }
234 return: accessor<bool> *; 234 return: accessor<bool> *;
235 } 235 }
236 method_accessor_of_doubles { 236 method_accessor_of_doubles_check {
237 params { 237 params {
238 @in a_in: accessor<double> *; 238 @in a_in: accessor<double> *;
239 } 239 }
240 return: accessor<double> *; 240 return: accessor<double> *;
241 } 241 }
242 method_accessor_of_enums { 242 method_accessor_of_enums_check {
243 params { 243 params {
244 @in a_in: accessor<Test.Enum_Ex> *; 244 @in a_in: accessor<Test.Enum_Ex> *;
245 } 245 }
246 return: accessor<Test.Enum_Ex> *; 246 return: accessor<Test.Enum_Ex> *;
247 } 247 }
248 method_accessor_of_structs { 248 method_accessor_of_structs_check {
249 params { 249 params {
250 @in a_in: accessor<Test.Struct_Ex> *; 250 @in a_in: accessor<Test.Struct_Ex> *;
251 } 251 }
252 return: accessor<Test.Struct_Ex> *; 252 return: accessor<Test.Struct_Ex> *;
253 } 253 }
254 method_array_of_arrays_of_ints { 254 method_array_of_arrays_of_ints_check {
255 params { 255 params {
256 @in a_in: array<array<int> *> *; 256 @in a_in: array<array<int> *> *;
257 } 257 }
258 return: array<array<int> *> *; 258 return: array<array<int> *> *;
259 } 259 }
260 method_list_of_lists_of_ints { 260 method_list_of_lists_of_ints_check {
261 params { 261 params {
262 @in l_in: list<list<int> *> *; 262 @in l_in: list<list<int> *> *;
263 } 263 }
264 return: list<list<int> *> *; 264 return: list<list<int> *> *;
265 } 265 }
266 method_array_of_lists_of_ints { 266 method_array_of_lists_of_ints_check {
267 params { 267 params {
268 @in a_in: array<list<int> *> *; 268 @in a_in: array<list<int> *> *;
269 } 269 }
270 return: array<list<int> *> *; 270 return: array<list<int> *> *;
271 } 271 }
272 method_list_of_arrays_of_ints { 272 method_list_of_arrays_of_ints_check {
273 params { 273 params {
274 @in l_in: list<array<int> *> *; 274 @in l_in: list<array<int> *> *;
275 } 275 }
276 return: list<array<int> *> *; 276 return: list<array<int> *> *;
277 } 277 }
278 method_list_with_opaque_elements { 278 method_list_with_opaque_elements_check {
279 return: const(list<Elm.Calendar.Mark*>)*; 279 return: const(list<Elm.Calendar.Mark*>)*;
280 } 280 }
281 method_in_enum_return_enum { 281 method_in_enum_return_enum_check {
282 params { e: Test.Enum_Ex; } 282 params { e: Test.Enum_Ex; }
283 return: Test.Enum_Ex; 283 return: Test.Enum_Ex;
284 } 284 }
285 method_in_struct_return_struct { 285 method_in_struct_return_struct_check {
286 params { e: Test.Struct_Ex *; } 286 params { e: Test.Struct_Ex *; }
287 return: Test.Struct_Ex *; 287 return: Test.Struct_Ex *;
288 } 288 }
289 call_event { 289 event_emit {
290 } 290 }
291 event_repeated_event_name { 291 event_repeated_event_name {
292 } 292 }