--- /dev/null
+//\r
+// Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+//\r
+// Licensed under the Apache License, Version 2.0 (the License);\r
+// you may not use this file except in compliance with the License.\r
+// You may obtain a copy of the License at\r
+//\r
+// http://www.apache.org/licenses/LICENSE-2.0\r
+//\r
+// Unless required by applicable law or agreed to in writing, software\r
+// distributed under the License is distributed on an "AS IS" BASIS,\r
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+// See the License for the specific language governing permissions and\r
+// limitations under the License.\r
+//\r
+\r
+#include "ITs-base-utils-common.h"\r
+\r
+/** @addtogroup itc-base-utils\r
+* @ingroup itc\r
+* @{\r
+*/\r
+/**\r
+* @function ITs_base_utils_uidna_startup\r
+* @description Called before each test\r
+* @parameter NA\r
+* @return NA\r
+*/\r
+void ITs_base_utils_uidna_startup(void)\r
+{\r
+ struct stat stBuff;\r
+ if ( stat(ERR_LOG, &stBuff) == 0 )\r
+ {\r
+ remove(ERR_LOG);\r
+ }\r
+#if DEBUG\r
+ FPRINTF("\\n[Line : %d][%s] TEST SUIT start-up: ITs_Base_Utils_p\\n", __LINE__, API_NAMESPACE);\r
+#endif\r
+ int nRet = i18n_uidna_create(I18N_UIDNA_DEFAULT, &h_uidna);\r
+ if (nRet != I18N_ERROR_NONE)\r
+ {\r
+ g_bBaseUtilsInitFlag = false;\r
+ FPRINTF("\\n[Line : %d][%s] i18n_uidna_create failed with error code %s\\n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRet));\r
+ }\r
+ else if(h_uidna == NULL)\r
+ {\r
+ FPRINTF("\\n[Line : %d][%s] h_uidna is null\\n", __LINE__, API_NAMESPACE);\r
+ g_bBaseUtilsInitFlag = false;\r
+ }\r
+ else\r
+ {\r
+ g_bBaseUtilsInitFlag = true;\r
+ }\r
+ return;\r
+}\r
+/**\r
+* @function ITs_base_utils_uidna_cleanup\r
+* @description Called after each test\r
+* @parameter NA\r
+* @return NA\r
+*/\r
+void ITs_base_utils_uidna_cleanup(void)\r
+{\r
+#if DEBUG\r
+ FPRINTF("\\n[Line : %d][%s] TEST SUIT clean-up: ITs_Base_Utils_p\\n", __LINE__, API_NAMESPACE);\r
+#endif\r
+\r
+ int nRet = -1;\r
+ if(h_uidna != NULL)\r
+ {\r
+ nRet = i18n_uidna_destroy(h_uidna);\r
+ if(nRet != I18N_ERROR_NONE)\r
+ {\r
+ FPRINTF("\\n[Line : %d][%s] i18n_uidna_destroy failed with error code %s\\n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRet)); \r
+ }\r
+ h_uidna = NULL;\r
+ }\r
+ g_bBaseUtilsInitFlag = false;\r
+ return;\r
+}\r
+/*\r
+ * @testcase ITc_i18n_uidna_label_to_ascii_p\r
+ * @since_tizen 6.0\r
+ * @author SRID(mohit.m)\r
+ * @reviewer SRID(shobhit.v)\r
+ * @type auto\r
+ * @scenario calls the api based on code\r
+ * @apitarget i18n_uidna_label_to_ascii\r
+ * @apicovered 18n_uidna_create, i18n_uidna_label_to_ascii, i18n_uidna_destroy, i18n_uidna_info_destroy\r
+ * @passcase I18N_ERROR_NONE returned by i18n_uidna_label_to_ascii\r
+ * @failcase I18N_ERROR_NONE not returned by i18n_uidna_label_to_ascii\r
+ * @precondition NA\r
+ * @postcondition NA\r
+ */\r
+int ITc_i18n_uidna_label_to_ascii_p(void)\r
+{\r
+ START_TEST;\r
+\r
+ int nRet = -1;\r
+ i18n_uchar dest[I18N_UCHAR_CAPACITY];\r
+ i18n_uidna_info_h h_info = NULL;\r
+ int32_t length = -1;\r
+ int32_t expected_length = 4;\r
+ static const i18n_uchar fA_sharps16[] = { 0x66, 0x41, 0xdf, 0 };\r
+\r
+ //Target API\r
+ nRet = i18n_uidna_label_to_ascii(h_uidna, fA_sharps16, -1, dest, I18N_UCHAR_CAPACITY, &h_info, &length);\r
+ PRINT_RESULT(I18N_ERROR_NONE, nRet, "i18n_uidna_label_to_ascii", BaseUtilsGetError(nRet));\r
+ CHECK_HANDLE(h_info, "i18n_uidna_label_to_ascii");\r
+ PRINT_RESULT_CLEANUP(length, expected_length, "i18n_uidna_label_to_ascii", "obtained length and expected length are not same", i18n_uidna_info_destroy(h_info));\r
+\r
+ nRet = i18n_uidna_info_destroy(h_info);\r
+ PRINT_RESULT_NORETURN(I18N_ERROR_NONE, nRet, "i18n_uidna_info_destroy", BaseUtilsGetError(nRet));\r
+\r
+ return 0;\r
+}\r
+/*\r
+ * @testcase ITc_i18n_uidna_label_to_unicode_p\r
+ * @since_tizen 6.0\r
+ * @author SRID(mohit.m)\r
+ * @reviewer SRID(shobhit.v)\r
+ * @type auto\r
+ * @scenario calls the api based on code\r
+ * @apitarget i18n_uidna_label_to_unicode\r
+ * @apicovered 18n_uidna_create, i18n_uidna_label_to_unicode, i18n_uidna_destroy, i18n_uidna_info_destroy\r
+ * @passcase I18N_ERROR_NONE returned by i18n_uidna_label_to_unicode\r
+ * @failcase I18N_ERROR_NONE not returned by i18n_uidna_label_to_unicode\r
+ * @precondition NA\r
+ * @postcondition NA\r
+ */\r
+int ITc_i18n_uidna_label_to_unicode_p(void)\r
+{\r
+ START_TEST;\r
+\r
+ int nRet = -1;\r
+ i18n_uchar dest[I18N_UCHAR_CAPACITY];\r
+ i18n_uidna_info_h h_info = NULL;\r
+ int32_t length = -1;\r
+ int32_t expected_length = 4;\r
+ static const i18n_uchar fA_sharps16[] = { 0x66, 0x41, 0xdf, 0 };\r
+\r
+ //Target API\r
+ nRet = i18n_uidna_label_to_unicode(h_uidna, fA_sharps16, i18n_ustring_get_length(fA_sharps16), dest, I18N_UCHAR_CAPACITY, &h_info, &length);\r
+ PRINT_RESULT(I18N_ERROR_NONE, nRet, "i18n_uidna_label_to_unicode", BaseUtilsGetError(nRet));\r
+ CHECK_HANDLE(h_info, "i18n_uidna_label_to_unicode");\r
+ PRINT_RESULT_CLEANUP(length, expected_length, "i18n_uidna_label_to_ascii", "obtained length and expected length are not same", i18n_uidna_info_destroy(h_info));\r
+\r
+ nRet = i18n_uidna_info_destroy(h_info);\r
+ PRINT_RESULT_NORETURN(I18N_ERROR_NONE, nRet, "i18n_uidna_info_destroy", BaseUtilsGetError(nRet));\r
+\r
+ return 0;\r
+\r
+}\r
+/*\r
+ * @testcase ITc_i18n_uidna_name_to_ascii_p\r
+ * @since_tizen 6.0\r
+ * @author SRID(mohit.m)\r
+ * @reviewer SRID(shobhit.v)\r
+ * @type auto\r
+ * @scenario calls the api based on code\r
+ * @apitarget i18n_uidna_name_to_ascii\r
+ * @apicovered 18n_uidna_create, i18n_uidna_name_to_ascii, i18n_uidna_destroy, i18n_uidna_info_destroy\r
+ * @passcase I18N_ERROR_NONE returned by i18n_uidna_name_to_ascii\r
+ * @failcase I18N_ERROR_NONE not returned by i18n_uidna_name_to_ascii\r
+ * @precondition NA\r
+ * @postcondition NA\r
+ */\r
+int ITc_i18n_uidna_name_to_ascii_p(void)\r
+{\r
+ START_TEST;\r
+\r
+ int nRet = -1;\r
+ i18n_uchar dest[I18N_UCHAR_CAPACITY];\r
+ i18n_uidna_info_h h_info = NULL;\r
+ int32_t length = -1;\r
+ int32_t expected_length = 4;\r
+ static const i18n_uchar fA_sharps16[] = { 0x66, 0x41, 0xdf, 0 };\r
+\r
+ //Target API\r
+ nRet = i18n_uidna_name_to_ascii(h_uidna, fA_sharps16, i18n_ustring_get_length(fA_sharps16), dest, I18N_UCHAR_CAPACITY, &h_info, &length);\r
+ PRINT_RESULT(I18N_ERROR_NONE, nRet, "i18n_uidna_name_to_ascii", BaseUtilsGetError(nRet));\r
+ CHECK_HANDLE(h_info, "i18n_uidna_name_to_ascii");\r
+ PRINT_RESULT_CLEANUP(length, expected_length, "i18n_uidna_name_to_ascii", "obtained length and expected length are not same", i18n_uidna_info_destroy(h_info));\r
+\r
+ nRet = i18n_uidna_info_destroy(h_info);\r
+ PRINT_RESULT_NORETURN(I18N_ERROR_NONE, nRet, "i18n_uidna_info_destroy", BaseUtilsGetError(nRet));\r
+\r
+ return 0;\r
+\r
+}\r
+/*\r
+ * @testcase ITc_i18n_uidna_name_to_unicode_p\r
+ * @since_tizen 6.0\r
+ * @author SRID(mohit.m)\r
+ * @reviewer SRID(shobhit.v)\r
+ * @type auto\r
+ * @scenario calls the api based on code\r
+ * @apitarget i18n_uidna_name_to_unicode\r
+ * @apicovered 18n_uidna_create, i18n_uidna_name_to_unicode, i18n_uidna_destroy, i18n_uidna_info_destroy\r
+ * @passcase I18N_ERROR_NONE returned by i18n_uidna_name_to_unicode\r
+ * @failcase I18N_ERROR_NONE not returned by i18n_uidna_name_to_unicode\r
+ * @precondition NA\r
+ * @postcondition NA\r
+ */\r
+int ITc_i18n_uidna_name_to_unicode_p(void)\r
+{\r
+ START_TEST;\r
+\r
+ int nRet = -1;\r
+ i18n_uchar dest[I18N_UCHAR_CAPACITY];\r
+ i18n_uidna_info_h h_info = NULL;\r
+ int32_t length = -1;\r
+ int32_t expected_length = 4;\r
+ static const i18n_uchar fA_sharps16[] = { 0x66, 0x41, 0xdf, 0 };\r
+\r
+ //Target API\r
+ nRet = i18n_uidna_name_to_unicode(h_uidna, fA_sharps16, -1, dest, I18N_UCHAR_CAPACITY, &h_info, &length);\r
+ PRINT_RESULT(I18N_ERROR_NONE, nRet, "i18n_uidna_name_to_unicode", BaseUtilsGetError(nRet));\r
+ CHECK_HANDLE(h_info, "i18n_uidna_name_to_unicode");\r
+ PRINT_RESULT_CLEANUP(length, expected_length, "i18n_uidna_name_to_unicode", "obtained length and expected length are not same", i18n_uidna_info_destroy(h_info));\r
+\r
+ nRet = i18n_uidna_info_destroy(h_info);\r
+ PRINT_RESULT_NORETURN(I18N_ERROR_NONE, nRet, "i18n_uidna_info_destroy", BaseUtilsGetError(nRet));\r
+\r
+ return 0;\r
+}\r
+/*\r
+ * @testcase ITc_i18n_uidna_label_to_ascii_UTF8_p\r
+ * @since_tizen 6.0\r
+ * @author SRID(mohit.m)\r
+ * @reviewer SRID(shobhit.v)\r
+ * @type auto\r
+ * @scenario calls the api based on code\r
+ * @apitarget i18n_uidna_label_to_ascii_UTF8\r
+ * @apicovered 18n_uidna_create, i18n_uidna_label_to_ascii_UTF8, i18n_uidna_destroy, i18n_uidna_info_destroy\r
+ * @passcase I18N_ERROR_NONE returned by i18n_uidna_label_to_ascii_UTF8\r
+ * @failcase I18N_ERROR_NONE not returned by i18n_uidna_label_to_ascii_UTF8\r
+ * @precondition NA\r
+ * @postcondition NA\r
+ */\r
+int ITc_i18n_uidna_label_to_ascii_UTF8_p(void)\r
+{\r
+ START_TEST;\r
+\r
+ int nRet = -1;\r
+ char dest[I18N_UCHAR_CAPACITY];\r
+ i18n_uidna_info_h h_info = NULL;\r
+ int32_t length = -1;\r
+ int32_t expected_length = 4;\r
+ static const char fA_sharps8[] = { 0x66, 0x41, (char)0xc3, (char)0x9f, 0 };\r
+\r
+ //Target API\r
+ nRet = i18n_uidna_label_to_ascii_UTF8(h_uidna, fA_sharps8, -1, dest, I18N_UCHAR_CAPACITY, &h_info, &length);\r
+ PRINT_RESULT(I18N_ERROR_NONE, nRet, "i18n_uidna_label_to_ascii_UTF8", BaseUtilsGetError(nRet));\r
+ CHECK_HANDLE(h_info, "i18n_uidna_label_to_ascii_UTF8");\r
+ PRINT_RESULT_CLEANUP(length, expected_length, "i18n_uidna_label_to_ascii_UTF8", "obtained length and expected length are not same", i18n_uidna_info_destroy(h_info));\r
+\r
+ nRet = i18n_uidna_info_destroy(h_info);\r
+ PRINT_RESULT_NORETURN(I18N_ERROR_NONE, nRet, "i18n_uidna_info_destroy", BaseUtilsGetError(nRet));\r
+\r
+ return 0;\r
+}\r
+/*\r
+ * @testcase ITc_i18n_uidna_label_to_unicode_UTF8_p\r
+ * @since_tizen 6.0\r
+ * @author SRID(mohit.m)\r
+ * @reviewer SRID(shobhit.v)\r
+ * @type auto\r
+ * @scenario calls the api based on code\r
+ * @apitarget i18n_uidna_label_to_unicode_UTF8\r
+ * @apicovered i18n_uidna_create, i18n_uidna_label_to_unicode_UTF8, i18n_uidna_destroy, i18n_uidna_info_destroy\r
+ * @passcase I18N_ERROR_NONE returned by i18n_uidna_label_to_unicode_UTF8\r
+ * @failcase I18N_ERROR_NONE not returned by i18n_uidna_label_to_unicode_UTF8\r
+ * @precondition NA\r
+ * @postcondition NA\r
+ */\r
+int ITc_i18n_uidna_label_to_unicode_UTF8_p(void)\r
+{\r
+ START_TEST;\r
+\r
+ int nRet = -1;\r
+ char dest[I18N_UCHAR_CAPACITY];\r
+ i18n_uidna_info_h h_info = NULL;\r
+ int32_t length = -1;\r
+ int32_t expected_length = 4;\r
+ static const char fA_sharps8[] = { 0x66, 0x41, (char)0xc3, (char)0x9f, 0 };\r
+\r
+ //Target API\r
+ nRet = i18n_uidna_label_to_unicode_UTF8(h_uidna, fA_sharps8, (int32_t)strlen(fA_sharps8), dest, I18N_UCHAR_CAPACITY, &h_info, &length);\r
+ PRINT_RESULT(I18N_ERROR_NONE, nRet, "i18n_uidna_label_to_unicode_UTF8", BaseUtilsGetError(nRet));\r
+ CHECK_HANDLE(h_info, "i18n_uidna_label_to_unicode_UTF8");\r
+ PRINT_RESULT_CLEANUP(length, expected_length, "i18n_uidna_label_to_unicode_UTF8", "obtained length and expected length are not same", i18n_uidna_info_destroy(h_info));\r
+\r
+ nRet = i18n_uidna_info_destroy(h_info);\r
+ PRINT_RESULT_NORETURN(I18N_ERROR_NONE, nRet, "i18n_uidna_info_destroy", BaseUtilsGetError(nRet));\r
+\r
+ return 0;\r
+}\r
+/*\r
+ * @testcase ITc_i18n_uidna_name_to_ascii_UTF8_p\r
+ * @since_tizen 6.0\r
+ * @author SRID(mohit.m)\r
+ * @reviewer SRID(shobhit.v)\r
+ * @type auto\r
+ * @scenario calls the api based on code\r
+ * @apitarget i18n_uidna_name_to_ascii_UTF8\r
+ * @apicovered i18n_uidna_create, i18n_uidna_name_to_ascii_UTF8, i18n_uidna_destroy, i18n_uidna_info_destroy\r
+ * @passcase I18N_ERROR_NONE returned by i18n_uidna_name_to_ascii_UTF8\r
+ * @failcase I18N_ERROR_NONE not returned by i18n_uidna_name_to_ascii_UTF8\r
+ * @precondition NA\r
+ * @postcondition NA\r
+ */\r
+int ITc_i18n_uidna_name_to_ascii_UTF8_p(void)\r
+{\r
+ START_TEST;\r
+\r
+ int nRet = -1;\r
+ char dest[I18N_UCHAR_CAPACITY];\r
+ i18n_uidna_info_h h_info = NULL;\r
+ int32_t length = -1;\r
+ int32_t expected_length = 4;\r
+ static const char fA_sharps8[] = { 0x66, 0x41, (char)0xc3, (char)0x9f, 0 };\r
+\r
+ //Target API\r
+ nRet = i18n_uidna_name_to_ascii_UTF8(h_uidna, fA_sharps8, (int32_t)strlen(fA_sharps8), dest, I18N_UCHAR_CAPACITY, &h_info, &length);\r
+ PRINT_RESULT(I18N_ERROR_NONE, nRet, "i18n_uidna_name_to_ascii_UTF8", BaseUtilsGetError(nRet));\r
+ CHECK_HANDLE(h_info, "i18n_uidna_name_to_ascii_UTF8");\r
+ PRINT_RESULT_CLEANUP(length, expected_length, "i18n_uidna_name_to_ascii_UTF8", "obtained length and expected length are not same", i18n_uidna_info_destroy(h_info));\r
+ nRet = i18n_uidna_info_destroy(h_info);\r
+ PRINT_RESULT_NORETURN(I18N_ERROR_NONE, nRet, "i18n_uidna_info_destroy", BaseUtilsGetError(nRet));\r
+\r
+ return 0;\r
+}\r
+/*\r
+ * @testcase ITc_i18n_uidna_name_to_unicode_UTF8_p\r
+ * @since_tizen 6.0\r
+ * @author SRID(mohit.m)\r
+ * @reviewer SRID(shobhit.v)\r
+ * @type auto\r
+ * @scenario calls the api based on code\r
+ * @apitarget i18n_uidna_name_to_unicode_UTF8\r
+ * @apicovered i18n_uidna_create, i18n_uidna_name_to_unicode_UTF8, i18n_uidna_destroy, i18n_uidna_info_destroy\r
+ * @passcase I18N_ERROR_NONE returned by i18n_uidna_name_to_unicode_UTF8\r
+ * @failcase I18N_ERROR_NONE not returned by i18n_uidna_name_to_unicode_UTF8\r
+ * @precondition NA\r
+ * @postcondition NA\r
+ */\r
+int ITc_i18n_uidna_name_to_unicode_UTF8_p(void)\r
+{\r
+ START_TEST;\r
+\r
+ int nRet = -1;\r
+ char dest[I18N_UCHAR_CAPACITY];\r
+ i18n_uidna_info_h h_info = NULL;\r
+ int32_t length = -1;\r
+ int32_t expected_length = 4;\r
+ static const char fA_sharps8[] = { 0x66, 0x41, (char)0xc3, (char)0x9f, 0 };\r
+\r
+ //Target API\r
+ nRet = i18n_uidna_name_to_unicode_UTF8(h_uidna, fA_sharps8, -1, dest, I18N_UCHAR_CAPACITY, &h_info, &length);\r
+ PRINT_RESULT(I18N_ERROR_NONE, nRet, "i18n_uidna_name_to_unicode_UTF8", BaseUtilsGetError(nRet));\r
+ CHECK_HANDLE(h_info, "i18n_uidna_name_to_unicode_UTF8");\r
+ PRINT_RESULT_CLEANUP(length, expected_length, "i18n_uidna_name_to_unicode_UTF8", "obtained length and expected length are not same", i18n_uidna_info_destroy(h_info));\r
+\r
+ nRet = i18n_uidna_info_destroy(h_info);\r
+ PRINT_RESULT_NORETURN(I18N_ERROR_NONE, nRet, "i18n_uidna_info_destroy", BaseUtilsGetError(nRet));\r
+\r
+ return 0;\r
+}\r
+/*\r
+ * @testcase ITc_i18n_uidna_info_get_is_trans_different_p\r
+ * @since_tizen 6.0\r
+ * @author SRID(mohit.m)\r
+ * @reviewer SRID(shobhit.v)\r
+ * @type auto\r
+ * @scenario calls the api based on code\r
+ * @apitarget i18n_uidna_info_get_is_trans_different\r
+ * @apicovered i18n_uidna_create, i18n_uidna_name_to_unicode_UTF8, i18n_uidna_destroy, i18n_uidna_info_destroy, i18n_uidna_info_get_is_trans_different\r
+ * @passcase I18N_ERROR_NONE returned by i18n_uidna_info_get_is_trans_different\r
+ * @failcase I18N_ERROR_NONE not returned by i18n_uidna_info_get_is_trans_different\r
+ * @precondition NA\r
+ * @postcondition NA\r
+ */\r
+int ITc_i18n_uidna_info_get_is_trans_different_p(void)\r
+{\r
+ START_TEST;\r
+\r
+ int nRet = -1;\r
+ char dest[I18N_UCHAR_CAPACITY];\r
+ i18n_uidna_info_h h_info = NULL;\r
+ int32_t length = -1;\r
+ int32_t expected_length = 4;\r
+ i18n_ubool is_trans_different = false;\r
+ static const char fA_sharps8[] = { 0x66, 0x41, (char)0xc3, (char)0x9f, 0 };\r
+\r
+ nRet = i18n_uidna_name_to_unicode_UTF8(h_uidna, fA_sharps8, -1, dest, I18N_UCHAR_CAPACITY, &h_info, &length);\r
+ PRINT_RESULT(I18N_ERROR_NONE, nRet, "i18n_uidna_name_to_unicode_UTF8", BaseUtilsGetError(nRet));\r
+ CHECK_HANDLE(h_info, "i18n_uidna_name_to_unicode_UTF8");\r
+ PRINT_RESULT_CLEANUP(length, expected_length, "i18n_uidna_name_to_unicode_UTF8", "obtained length and expected length are not same", i18n_uidna_info_destroy(h_info));\r
+\r
+ //Target API\r
+ nRet = i18n_uidna_info_get_is_trans_different(h_info, &is_trans_different);\r
+ PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRet, "i18n_uidna_info_get_is_trans_different", BaseUtilsGetError(nRet), i18n_uidna_info_destroy(h_info));\r
+ PRINT_RESULT_CLEANUP(true, is_trans_different, "i18n_uidna_info_get_is_trans_different", "obtained result is not correct", i18n_uidna_info_destroy(h_info));\r
+\r
+ nRet = i18n_uidna_info_destroy(h_info);\r
+ PRINT_RESULT_NORETURN(I18N_ERROR_NONE, nRet, "i18n_uidna_info_destroy", BaseUtilsGetError(nRet));\r
+\r
+ return 0;\r
+}\r
+/*\r
+ * @testcase ITc_i18n_uidna_info_get_errors_p\r
+ * @since_tizen 6.0\r
+ * @author SRID(mohit.m)\r
+ * @reviewer SRID(shobhit.v)\r
+ * @type auto\r
+ * @scenario calls the api based on code\r
+ * @apitarget i18n_uidna_info_get_errors\r
+ * @apicovered i18n_uidna_create, i18n_uidna_name_to_unicode_UTF8, i18n_uidna_info_get_errors, i18n_uidna_destroy, i18n_uidna_info_destroy\r
+ * @passcase I18N_ERROR_NONE returned by i18n_uidna_info_get_errors\r
+ * @failcase I18N_ERROR_NONE not returned by i18n_uidna_info_get_errors\r
+ * @precondition NA\r
+ * @postcondition NA\r
+ */\r
+int ITc_i18n_uidna_info_get_errors_p(void)\r
+{\r
+ START_TEST;\r
+\r
+ int nRet = -1;\r
+ char dest[I18N_UCHAR_CAPACITY];\r
+ i18n_uidna_info_h h_info = NULL;\r
+ int32_t length = -1;\r
+ int32_t expected_length = 4;\r
+ uint32_t errors;\r
+ static const char fA_sharps8[] = { 0x66, 0x41, (char)0xc3, (char)0x9f, 0 };\r
+\r
+ nRet = i18n_uidna_name_to_unicode_UTF8(h_uidna, fA_sharps8, -1, dest, I18N_UCHAR_CAPACITY, &h_info, &length);\r
+ PRINT_RESULT(I18N_ERROR_NONE, nRet, "i18n_uidna_name_to_unicode_UTF8", BaseUtilsGetError(nRet));\r
+ CHECK_HANDLE(h_info, "i18n_uidna_name_to_unicode_UTF8");\r
+ PRINT_RESULT_CLEANUP(length, expected_length, "i18n_uidna_name_to_unicode_UTF8", "obtained length and expected length are not same", i18n_uidna_info_destroy(h_info));\r
+\r
+ //Target API\r
+ nRet = i18n_uidna_info_get_errors(h_info, &errors);\r
+ PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRet, "i18n_uidna_name_to_unicode_UTF8", BaseUtilsGetError(nRet), i18n_uidna_info_destroy(h_info));\r
+\r
+ nRet = i18n_uidna_info_destroy(h_info);\r
+ PRINT_RESULT_NORETURN(I18N_ERROR_NONE, nRet, "i18n_uidna_info_destroy", BaseUtilsGetError(nRet));\r
+\r
+ return 0;\r
+}\r
+/*\r
+ * @testcase ITc_i18n_uidna_info_destroy_p\r
+ * @since_tizen 6.0\r
+ * @author SRID(mohit.m)\r
+ * @reviewer SRID(shobhit.v)\r
+ * @type auto\r
+ * @scenario calls the api based on code\r
+ * @apitarget i18n_uidna_info_destroy\r
+ * @apicovered i18n_uidna_create, i18n_uidna_name_to_unicode_UTF8, i18n_uidna_info_destroy\r
+ * @passcase I18N_ERROR_NONE returned by i18n_uidna_info_destroy\r
+ * @failcase I18N_ERROR_NONE not returned by i18n_uidna_info_destroy\r
+ * @precondition NA\r
+ * @postcondition NA\r
+ */\r
+int ITc_i18n_uidna_info_destroy_p(void)\r
+{\r
+ START_TEST;\r
+\r
+ int nRet = -1;\r
+ char dest[I18N_UCHAR_CAPACITY];\r
+ i18n_uidna_info_h h_info = NULL;\r
+ int32_t length = -1;\r
+ static const char fA_sharps8[] = { 0x66, 0x41, (char)0xc3, (char)0x9f, 0 };\r
+\r
+ nRet = i18n_uidna_name_to_unicode_UTF8(h_uidna, fA_sharps8, -1, dest, I18N_UCHAR_CAPACITY, &h_info, &length);\r
+ PRINT_RESULT(I18N_ERROR_NONE, nRet, "i18n_uidna_name_to_unicode_UTF8", BaseUtilsGetError(nRet));\r
+ CHECK_HANDLE(h_info, "i18n_uidna_name_to_unicode_UTF8");\r
+\r
+ //Target API\r
+ nRet = i18n_uidna_info_destroy(h_info);\r
+ PRINT_RESULT(I18N_ERROR_NONE, nRet, "i18n_uidna_info_destroy", BaseUtilsGetError(nRet));\r
+\r
+ return 0;\r
+}\r