summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-09-04 16:01:01 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-09-04 16:27:54 +0200
commit8b49bdb830b8c7b921712ed467f89aa8d6e6ca3f (patch)
tree6ea6059bbc616cb66bb8454198c5694eec50364e /src/tests
parentd7397aca4d0149af775c169e43ad60b555063487 (diff)
eolian tests: use new c_type APIs
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/eolian/eolian_parsing.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c
index c6e5c85df8..c35d10b1a7 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -425,7 +425,7 @@ EFL_START_TEST(eolian_complex_type)
425 /* Properties return type */ 425 /* Properties return type */
426 fail_if(!(fid = eolian_class_function_by_name_get(class, "a", EOLIAN_PROPERTY))); 426 fail_if(!(fid = eolian_class_function_by_name_get(class, "a", EOLIAN_PROPERTY)));
427 fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_PROP_SET))); 427 fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_PROP_SET)));
428 fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_RETURN))); 428 fail_if(!(type_name = eolian_function_return_c_type_get(fid, EOLIAN_PROP_SET)));
429 fail_if(!eolian_function_return_is_move(fid, EOLIAN_PROP_SET)); 429 fail_if(!eolian_function_return_is_move(fid, EOLIAN_PROP_SET));
430 fail_if(eolian_type_builtin_type_get(type) != EOLIAN_TYPE_BUILTIN_LIST); 430 fail_if(eolian_type_builtin_type_get(type) != EOLIAN_TYPE_BUILTIN_LIST);
431 fail_if(strcmp(type_name, "Eina_List *")); 431 fail_if(strcmp(type_name, "Eina_List *"));
@@ -450,7 +450,7 @@ EFL_START_TEST(eolian_complex_type)
450 eina_iterator_free(iter); 450 eina_iterator_free(iter);
451 fail_if(strcmp(eolian_parameter_name_get(param), "value")); 451 fail_if(strcmp(eolian_parameter_name_get(param), "value"));
452 fail_if(!(type = eolian_parameter_type_get(param))); 452 fail_if(!(type = eolian_parameter_type_get(param)));
453 fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_PARAM))); 453 fail_if(!(type_name = eolian_parameter_c_type_get(param, EINA_FALSE)));
454 fail_if(!eolian_parameter_is_move(param)); 454 fail_if(!eolian_parameter_is_move(param));
455 fail_if(strcmp(type_name, "Eina_List *")); 455 fail_if(strcmp(type_name, "Eina_List *"));
456 eina_stringshare_del(type_name); 456 eina_stringshare_del(type_name);
@@ -464,7 +464,7 @@ EFL_START_TEST(eolian_complex_type)
464 /* Methods return type */ 464 /* Methods return type */
465 fail_if(!(fid = eolian_class_function_by_name_get(class, "foo", EOLIAN_METHOD))); 465 fail_if(!(fid = eolian_class_function_by_name_get(class, "foo", EOLIAN_METHOD)));
466 fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_METHOD))); 466 fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_METHOD)));
467 fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_RETURN))); 467 fail_if(!(type_name = eolian_function_return_c_type_get(fid, EOLIAN_METHOD)));
468 fail_if(!eolian_function_return_is_move(fid, EOLIAN_METHOD)); 468 fail_if(!eolian_function_return_is_move(fid, EOLIAN_METHOD));
469 fail_if(strcmp(type_name, "Eina_List *")); 469 fail_if(strcmp(type_name, "Eina_List *"));
470 eina_stringshare_del(type_name); 470 eina_stringshare_del(type_name);
@@ -481,7 +481,7 @@ EFL_START_TEST(eolian_complex_type)
481 fail_if(!(eina_iterator_next(iter, (void**)&param))); 481 fail_if(!(eina_iterator_next(iter, (void**)&param)));
482 fail_if(strcmp(eolian_parameter_name_get(param), "buf")); 482 fail_if(strcmp(eolian_parameter_name_get(param), "buf"));
483 fail_if(!(type = eolian_parameter_type_get(param))); 483 fail_if(!(type = eolian_parameter_type_get(param)));
484 fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_PARAM))); 484 fail_if(!(type_name = eolian_parameter_c_type_get(param, EINA_FALSE)));
485 fail_if(!eolian_parameter_is_move(param)); 485 fail_if(!eolian_parameter_is_move(param));
486 fail_if(eolian_type_builtin_type_get(type) != EOLIAN_TYPE_BUILTIN_MSTRING); 486 fail_if(eolian_type_builtin_type_get(type) != EOLIAN_TYPE_BUILTIN_MSTRING);
487 fail_if(strcmp(type_name, "char *")); 487 fail_if(strcmp(type_name, "char *"));
@@ -490,7 +490,7 @@ EFL_START_TEST(eolian_complex_type)
490 fail_if(!(eina_iterator_next(iter, (void**)&param))); 490 fail_if(!(eina_iterator_next(iter, (void**)&param)));
491 fail_if(strcmp(eolian_parameter_name_get(param), "sl")); 491 fail_if(strcmp(eolian_parameter_name_get(param), "sl"));
492 fail_if(!(type = eolian_parameter_type_get(param))); 492 fail_if(!(type = eolian_parameter_type_get(param)));
493 fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_PARAM))); 493 fail_if(!(type_name = eolian_parameter_c_type_get(param, EINA_FALSE)));
494 fail_if(eolian_parameter_is_move(param)); 494 fail_if(eolian_parameter_is_move(param));
495 fail_if(eolian_type_builtin_type_get(type) != EOLIAN_TYPE_BUILTIN_SLICE); 495 fail_if(eolian_type_builtin_type_get(type) != EOLIAN_TYPE_BUILTIN_SLICE);
496 fail_if(strcmp(type_name, "Eina_Slice")); 496 fail_if(strcmp(type_name, "Eina_Slice"));
@@ -619,7 +619,7 @@ EFL_START_TEST(eolian_simple_parsing)
619 /* Function return */ 619 /* Function return */
620 tp = eolian_function_return_type_get(fid, EOLIAN_METHOD); 620 tp = eolian_function_return_type_get(fid, EOLIAN_METHOD);
621 fail_if(!tp); 621 fail_if(!tp);
622 string = eolian_type_c_type_get(tp, EOLIAN_C_TYPE_RETURN); 622 string = eolian_function_return_c_type_get(fid, EOLIAN_METHOD);
623 fail_if(!string); 623 fail_if(!string);
624 fail_if(strcmp(string, "char *")); 624 fail_if(strcmp(string, "char *"));
625 eina_stringshare_del(string); 625 eina_stringshare_del(string);
@@ -701,7 +701,7 @@ EFL_START_TEST(eolian_struct)
701 fail_if(!(field = eolian_typedecl_struct_field_get(tdl, "something"))); 701 fail_if(!(field = eolian_typedecl_struct_field_get(tdl, "something")));
702 fail_if(!(ftype = eolian_typedecl_struct_field_type_get(field))); 702 fail_if(!(ftype = eolian_typedecl_struct_field_type_get(field)));
703 fail_if(eolian_type_is_ptr(ftype)); 703 fail_if(eolian_type_is_ptr(ftype));
704 fail_if(!(type_name = eolian_type_c_type_get(ftype, EOLIAN_C_TYPE_DEFAULT))); 704 fail_if(!(type_name = eolian_typedecl_struct_field_c_type_get(field)));
705 fail_if(strcmp(type_name, "const char *")); 705 fail_if(strcmp(type_name, "const char *"));
706 eina_stringshare_del(type_name); 706 eina_stringshare_del(type_name);
707 707
@@ -1348,20 +1348,20 @@ EFL_START_TEST(eolian_function_types)
1348 fail_if(strcmp(eolian_function_name_get(fid), "SimpleFunc")); 1348 fail_if(strcmp(eolian_function_name_get(fid), "SimpleFunc"));
1349 1349
1350 fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_FUNCTION_POINTER))); // void is null_return_type? 1350 fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_FUNCTION_POINTER))); // void is null_return_type?
1351 fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_RETURN))); 1351 fail_if(!(type_name = eolian_function_return_c_type_get(fid, EOLIAN_FUNCTION_POINTER)));
1352 fail_if(strcmp(type_name, "const char *")); 1352 fail_if(strcmp(type_name, "const char *"));
1353 fail_if(!(iter = (eolian_function_parameters_get(fid)))); 1353 fail_if(!(iter = (eolian_function_parameters_get(fid))));
1354 1354
1355 fail_if(!(eina_iterator_next(iter, (void**)&param))); 1355 fail_if(!(eina_iterator_next(iter, (void**)&param)));
1356 fail_if(strcmp(eolian_parameter_name_get(param), "a")); 1356 fail_if(strcmp(eolian_parameter_name_get(param), "a"));
1357 fail_if(!(type = eolian_parameter_type_get(param))); 1357 fail_if(!(type = eolian_parameter_type_get(param)));
1358 fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_PARAM))); 1358 fail_if(!(type_name = eolian_parameter_c_type_get(param, EINA_FALSE)));
1359 fail_if(strcmp(type_name, "int")); 1359 fail_if(strcmp(type_name, "int"));
1360 1360
1361 fail_if(!(eina_iterator_next(iter, (void**)&param))); 1361 fail_if(!(eina_iterator_next(iter, (void**)&param)));
1362 fail_if(strcmp(eolian_parameter_name_get(param), "b")); 1362 fail_if(strcmp(eolian_parameter_name_get(param), "b"));
1363 fail_if(!(type = eolian_parameter_type_get(param))); 1363 fail_if(!(type = eolian_parameter_type_get(param)));
1364 fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_PARAM))); 1364 fail_if(!(type_name = eolian_parameter_c_type_get(param, EINA_FALSE)));
1365 fail_if(strcmp(type_name, "double")); 1365 fail_if(strcmp(type_name, "double"));
1366 1366
1367 fail_if(eina_iterator_next(iter, &dummy)); 1367 fail_if(eina_iterator_next(iter, &dummy));
@@ -1374,7 +1374,7 @@ EFL_START_TEST(eolian_function_types)
1374 fail_if(eolian_function_type_get(fid) != EOLIAN_FUNCTION_POINTER); 1374 fail_if(eolian_function_type_get(fid) != EOLIAN_FUNCTION_POINTER);
1375 1375
1376 fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_FUNCTION_POINTER))); 1376 fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_FUNCTION_POINTER)));
1377 fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_RETURN))); 1377 fail_if(!(type_name = eolian_function_return_c_type_get(fid, EOLIAN_FUNCTION_POINTER)));
1378 fail_if(strcmp(type_name, "double")); 1378 fail_if(strcmp(type_name, "double"));
1379 fail_if(!(iter = (eolian_function_parameters_get(fid)))); 1379 fail_if(!(iter = (eolian_function_parameters_get(fid))));
1380 1380
@@ -1384,7 +1384,7 @@ EFL_START_TEST(eolian_function_types)
1384 fail_if(!(type = eolian_parameter_type_get(param))); 1384 fail_if(!(type = eolian_parameter_type_get(param)));
1385 fail_if(eolian_parameter_direction_get(param) != EOLIAN_IN_PARAM); 1385 fail_if(eolian_parameter_direction_get(param) != EOLIAN_IN_PARAM);
1386 fail_if(eolian_parameter_is_move(param)); 1386 fail_if(eolian_parameter_is_move(param));
1387 fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_PARAM))); 1387 fail_if(!(type_name = eolian_parameter_c_type_get(param, EINA_FALSE)));
1388 fail_if(strcmp(type_name, "const char *")); 1388 fail_if(strcmp(type_name, "const char *"));
1389 1389
1390 /*out own string */ 1390 /*out own string */
@@ -1393,7 +1393,7 @@ EFL_START_TEST(eolian_function_types)
1393 fail_if(eolian_parameter_direction_get(param) != EOLIAN_OUT_PARAM); 1393 fail_if(eolian_parameter_direction_get(param) != EOLIAN_OUT_PARAM);
1394 fail_if(!(type = eolian_parameter_type_get(param))); 1394 fail_if(!(type = eolian_parameter_type_get(param)));
1395 fail_if(!eolian_parameter_is_move(param)); 1395 fail_if(!eolian_parameter_is_move(param));
1396 fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_PARAM))); 1396 fail_if(!(type_name = eolian_parameter_c_type_get(param, EINA_FALSE)));
1397 fail_if(strcmp(type_name, "char *")); 1397 fail_if(strcmp(type_name, "char *"));
1398 1398
1399 fail_if(eina_iterator_next(iter, &dummy)); 1399 fail_if(eina_iterator_next(iter, &dummy));