forked from enlightenment/efl
eolian tests: use new c_type APIs
This commit is contained in:
parent
d7397aca4d
commit
8b49bdb830
|
@ -425,7 +425,7 @@ EFL_START_TEST(eolian_complex_type)
|
||||||
/* Properties return type */
|
/* Properties return type */
|
||||||
fail_if(!(fid = eolian_class_function_by_name_get(class, "a", EOLIAN_PROPERTY)));
|
fail_if(!(fid = eolian_class_function_by_name_get(class, "a", EOLIAN_PROPERTY)));
|
||||||
fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_PROP_SET)));
|
fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_PROP_SET)));
|
||||||
fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_RETURN)));
|
fail_if(!(type_name = eolian_function_return_c_type_get(fid, EOLIAN_PROP_SET)));
|
||||||
fail_if(!eolian_function_return_is_move(fid, EOLIAN_PROP_SET));
|
fail_if(!eolian_function_return_is_move(fid, EOLIAN_PROP_SET));
|
||||||
fail_if(eolian_type_builtin_type_get(type) != EOLIAN_TYPE_BUILTIN_LIST);
|
fail_if(eolian_type_builtin_type_get(type) != EOLIAN_TYPE_BUILTIN_LIST);
|
||||||
fail_if(strcmp(type_name, "Eina_List *"));
|
fail_if(strcmp(type_name, "Eina_List *"));
|
||||||
|
@ -450,7 +450,7 @@ EFL_START_TEST(eolian_complex_type)
|
||||||
eina_iterator_free(iter);
|
eina_iterator_free(iter);
|
||||||
fail_if(strcmp(eolian_parameter_name_get(param), "value"));
|
fail_if(strcmp(eolian_parameter_name_get(param), "value"));
|
||||||
fail_if(!(type = eolian_parameter_type_get(param)));
|
fail_if(!(type = eolian_parameter_type_get(param)));
|
||||||
fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_PARAM)));
|
fail_if(!(type_name = eolian_parameter_c_type_get(param, EINA_FALSE)));
|
||||||
fail_if(!eolian_parameter_is_move(param));
|
fail_if(!eolian_parameter_is_move(param));
|
||||||
fail_if(strcmp(type_name, "Eina_List *"));
|
fail_if(strcmp(type_name, "Eina_List *"));
|
||||||
eina_stringshare_del(type_name);
|
eina_stringshare_del(type_name);
|
||||||
|
@ -464,7 +464,7 @@ EFL_START_TEST(eolian_complex_type)
|
||||||
/* Methods return type */
|
/* Methods return type */
|
||||||
fail_if(!(fid = eolian_class_function_by_name_get(class, "foo", EOLIAN_METHOD)));
|
fail_if(!(fid = eolian_class_function_by_name_get(class, "foo", EOLIAN_METHOD)));
|
||||||
fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_METHOD)));
|
fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_METHOD)));
|
||||||
fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_RETURN)));
|
fail_if(!(type_name = eolian_function_return_c_type_get(fid, EOLIAN_METHOD)));
|
||||||
fail_if(!eolian_function_return_is_move(fid, EOLIAN_METHOD));
|
fail_if(!eolian_function_return_is_move(fid, EOLIAN_METHOD));
|
||||||
fail_if(strcmp(type_name, "Eina_List *"));
|
fail_if(strcmp(type_name, "Eina_List *"));
|
||||||
eina_stringshare_del(type_name);
|
eina_stringshare_del(type_name);
|
||||||
|
@ -481,7 +481,7 @@ EFL_START_TEST(eolian_complex_type)
|
||||||
fail_if(!(eina_iterator_next(iter, (void**)¶m)));
|
fail_if(!(eina_iterator_next(iter, (void**)¶m)));
|
||||||
fail_if(strcmp(eolian_parameter_name_get(param), "buf"));
|
fail_if(strcmp(eolian_parameter_name_get(param), "buf"));
|
||||||
fail_if(!(type = eolian_parameter_type_get(param)));
|
fail_if(!(type = eolian_parameter_type_get(param)));
|
||||||
fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_PARAM)));
|
fail_if(!(type_name = eolian_parameter_c_type_get(param, EINA_FALSE)));
|
||||||
fail_if(!eolian_parameter_is_move(param));
|
fail_if(!eolian_parameter_is_move(param));
|
||||||
fail_if(eolian_type_builtin_type_get(type) != EOLIAN_TYPE_BUILTIN_MSTRING);
|
fail_if(eolian_type_builtin_type_get(type) != EOLIAN_TYPE_BUILTIN_MSTRING);
|
||||||
fail_if(strcmp(type_name, "char *"));
|
fail_if(strcmp(type_name, "char *"));
|
||||||
|
@ -490,7 +490,7 @@ EFL_START_TEST(eolian_complex_type)
|
||||||
fail_if(!(eina_iterator_next(iter, (void**)¶m)));
|
fail_if(!(eina_iterator_next(iter, (void**)¶m)));
|
||||||
fail_if(strcmp(eolian_parameter_name_get(param), "sl"));
|
fail_if(strcmp(eolian_parameter_name_get(param), "sl"));
|
||||||
fail_if(!(type = eolian_parameter_type_get(param)));
|
fail_if(!(type = eolian_parameter_type_get(param)));
|
||||||
fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_PARAM)));
|
fail_if(!(type_name = eolian_parameter_c_type_get(param, EINA_FALSE)));
|
||||||
fail_if(eolian_parameter_is_move(param));
|
fail_if(eolian_parameter_is_move(param));
|
||||||
fail_if(eolian_type_builtin_type_get(type) != EOLIAN_TYPE_BUILTIN_SLICE);
|
fail_if(eolian_type_builtin_type_get(type) != EOLIAN_TYPE_BUILTIN_SLICE);
|
||||||
fail_if(strcmp(type_name, "Eina_Slice"));
|
fail_if(strcmp(type_name, "Eina_Slice"));
|
||||||
|
@ -619,7 +619,7 @@ EFL_START_TEST(eolian_simple_parsing)
|
||||||
/* Function return */
|
/* Function return */
|
||||||
tp = eolian_function_return_type_get(fid, EOLIAN_METHOD);
|
tp = eolian_function_return_type_get(fid, EOLIAN_METHOD);
|
||||||
fail_if(!tp);
|
fail_if(!tp);
|
||||||
string = eolian_type_c_type_get(tp, EOLIAN_C_TYPE_RETURN);
|
string = eolian_function_return_c_type_get(fid, EOLIAN_METHOD);
|
||||||
fail_if(!string);
|
fail_if(!string);
|
||||||
fail_if(strcmp(string, "char *"));
|
fail_if(strcmp(string, "char *"));
|
||||||
eina_stringshare_del(string);
|
eina_stringshare_del(string);
|
||||||
|
@ -701,7 +701,7 @@ EFL_START_TEST(eolian_struct)
|
||||||
fail_if(!(field = eolian_typedecl_struct_field_get(tdl, "something")));
|
fail_if(!(field = eolian_typedecl_struct_field_get(tdl, "something")));
|
||||||
fail_if(!(ftype = eolian_typedecl_struct_field_type_get(field)));
|
fail_if(!(ftype = eolian_typedecl_struct_field_type_get(field)));
|
||||||
fail_if(eolian_type_is_ptr(ftype));
|
fail_if(eolian_type_is_ptr(ftype));
|
||||||
fail_if(!(type_name = eolian_type_c_type_get(ftype, EOLIAN_C_TYPE_DEFAULT)));
|
fail_if(!(type_name = eolian_typedecl_struct_field_c_type_get(field)));
|
||||||
fail_if(strcmp(type_name, "const char *"));
|
fail_if(strcmp(type_name, "const char *"));
|
||||||
eina_stringshare_del(type_name);
|
eina_stringshare_del(type_name);
|
||||||
|
|
||||||
|
@ -1348,20 +1348,20 @@ EFL_START_TEST(eolian_function_types)
|
||||||
fail_if(strcmp(eolian_function_name_get(fid), "SimpleFunc"));
|
fail_if(strcmp(eolian_function_name_get(fid), "SimpleFunc"));
|
||||||
|
|
||||||
fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_FUNCTION_POINTER))); // void is null_return_type?
|
fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_FUNCTION_POINTER))); // void is null_return_type?
|
||||||
fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_RETURN)));
|
fail_if(!(type_name = eolian_function_return_c_type_get(fid, EOLIAN_FUNCTION_POINTER)));
|
||||||
fail_if(strcmp(type_name, "const char *"));
|
fail_if(strcmp(type_name, "const char *"));
|
||||||
fail_if(!(iter = (eolian_function_parameters_get(fid))));
|
fail_if(!(iter = (eolian_function_parameters_get(fid))));
|
||||||
|
|
||||||
fail_if(!(eina_iterator_next(iter, (void**)¶m)));
|
fail_if(!(eina_iterator_next(iter, (void**)¶m)));
|
||||||
fail_if(strcmp(eolian_parameter_name_get(param), "a"));
|
fail_if(strcmp(eolian_parameter_name_get(param), "a"));
|
||||||
fail_if(!(type = eolian_parameter_type_get(param)));
|
fail_if(!(type = eolian_parameter_type_get(param)));
|
||||||
fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_PARAM)));
|
fail_if(!(type_name = eolian_parameter_c_type_get(param, EINA_FALSE)));
|
||||||
fail_if(strcmp(type_name, "int"));
|
fail_if(strcmp(type_name, "int"));
|
||||||
|
|
||||||
fail_if(!(eina_iterator_next(iter, (void**)¶m)));
|
fail_if(!(eina_iterator_next(iter, (void**)¶m)));
|
||||||
fail_if(strcmp(eolian_parameter_name_get(param), "b"));
|
fail_if(strcmp(eolian_parameter_name_get(param), "b"));
|
||||||
fail_if(!(type = eolian_parameter_type_get(param)));
|
fail_if(!(type = eolian_parameter_type_get(param)));
|
||||||
fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_PARAM)));
|
fail_if(!(type_name = eolian_parameter_c_type_get(param, EINA_FALSE)));
|
||||||
fail_if(strcmp(type_name, "double"));
|
fail_if(strcmp(type_name, "double"));
|
||||||
|
|
||||||
fail_if(eina_iterator_next(iter, &dummy));
|
fail_if(eina_iterator_next(iter, &dummy));
|
||||||
|
@ -1374,7 +1374,7 @@ EFL_START_TEST(eolian_function_types)
|
||||||
fail_if(eolian_function_type_get(fid) != EOLIAN_FUNCTION_POINTER);
|
fail_if(eolian_function_type_get(fid) != EOLIAN_FUNCTION_POINTER);
|
||||||
|
|
||||||
fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_FUNCTION_POINTER)));
|
fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_FUNCTION_POINTER)));
|
||||||
fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_RETURN)));
|
fail_if(!(type_name = eolian_function_return_c_type_get(fid, EOLIAN_FUNCTION_POINTER)));
|
||||||
fail_if(strcmp(type_name, "double"));
|
fail_if(strcmp(type_name, "double"));
|
||||||
fail_if(!(iter = (eolian_function_parameters_get(fid))));
|
fail_if(!(iter = (eolian_function_parameters_get(fid))));
|
||||||
|
|
||||||
|
@ -1384,7 +1384,7 @@ EFL_START_TEST(eolian_function_types)
|
||||||
fail_if(!(type = eolian_parameter_type_get(param)));
|
fail_if(!(type = eolian_parameter_type_get(param)));
|
||||||
fail_if(eolian_parameter_direction_get(param) != EOLIAN_IN_PARAM);
|
fail_if(eolian_parameter_direction_get(param) != EOLIAN_IN_PARAM);
|
||||||
fail_if(eolian_parameter_is_move(param));
|
fail_if(eolian_parameter_is_move(param));
|
||||||
fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_PARAM)));
|
fail_if(!(type_name = eolian_parameter_c_type_get(param, EINA_FALSE)));
|
||||||
fail_if(strcmp(type_name, "const char *"));
|
fail_if(strcmp(type_name, "const char *"));
|
||||||
|
|
||||||
/*out own string */
|
/*out own string */
|
||||||
|
@ -1393,7 +1393,7 @@ EFL_START_TEST(eolian_function_types)
|
||||||
fail_if(eolian_parameter_direction_get(param) != EOLIAN_OUT_PARAM);
|
fail_if(eolian_parameter_direction_get(param) != EOLIAN_OUT_PARAM);
|
||||||
fail_if(!(type = eolian_parameter_type_get(param)));
|
fail_if(!(type = eolian_parameter_type_get(param)));
|
||||||
fail_if(!eolian_parameter_is_move(param));
|
fail_if(!eolian_parameter_is_move(param));
|
||||||
fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_PARAM)));
|
fail_if(!(type_name = eolian_parameter_c_type_get(param, EINA_FALSE)));
|
||||||
fail_if(strcmp(type_name, "char *"));
|
fail_if(strcmp(type_name, "char *"));
|
||||||
|
|
||||||
fail_if(eina_iterator_next(iter, &dummy));
|
fail_if(eina_iterator_next(iter, &dummy));
|
||||||
|
|
Loading…
Reference in New Issue