return 0;
}
+
+//& type: auto
+//& purpose: Shapes Arabic text on a character basis
+/**
+* @testcase ITc_i18n_ushape_shape_arabic_p
+* @since_tizen 3.0
+* @author SRID(a.pandia1)
+* @reviewer SRID(nibha.sharma)
+* @type auto
+* @scenario Shapes Arabic text on a character basis
+* @apitarget i18n_ushape_shape_arabic
+* @apicovered i18n_ushape_shape_arabic
+* @passcase I18N_ERROR_NONE returned by i18n_ushape_shape_arabic
+* @failcase I18N_ERROR_NONE not returned by i18n_ushape_shape_arabic
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_i18n_ushape_shape_arabic_p(void)
+{
+ START_TEST;
+
+ i18n_uchar en_digits[] = {
+ 0x30, /* Unicode Digit Zero */
+ 0x31, /* Unicode Digit One */
+ 0x32, /* Unicode Digit Two */
+ 0x33, /* Unicode Digit Three */
+ 0x34, /* Unicode Digit Four */
+ 0x35, /* Unicode Digit Five */
+ 0x36, /* Unicode Digit Six */
+ 0x37, /* Unicode Digit Seven */
+ 0x38, /* Unicode Digit Eight */
+ 0x39, /* Unicode Digit Nine */
+ 0
+ };
+
+ //Target API
+
+ i18n_uchar dest[12];
+ int32_t nOutDestLen;
+ int32_t nSourceLen = sizeof(en_digits)/sizeof((en_digits)[0]);
+ int32_t nDestLen = sizeof(dest)/sizeof((dest)[0]);
+
+ int nRet = i18n_ushape_shape_arabic(en_digits, nSourceLen, I18N_USHAPE_DIGITS_NOOP, nDestLen, dest, &nOutDestLen);
+ PRINT_RESULT(I18N_ERROR_NONE, nRet, "i18n_ushape_shape_arabic", BaseUtilsGetError(nRet));
+ PRINT_RESULT(nSourceLen, nOutDestLen, "i18n_ushape_shape_arabic", "Length of source and destination mismatch");
+ memcmp(dest, en_digits, nOutDestLen*U_SIZEOF_UCHAR);
+
+ nRet = i18n_ushape_shape_arabic(en_digits, nSourceLen, I18N_USHAPE_DIGITS_EN2AN, nDestLen, dest, &nOutDestLen);
+ PRINT_RESULT(I18N_ERROR_NONE, nRet, "i18n_ushape_shape_arabic", BaseUtilsGetError(nRet));
+ PRINT_RESULT(nSourceLen, nOutDestLen, "i18n_ushape_shape_arabic", "Length of source and destination mismatch");
+ memcmp(dest, en_digits, nOutDestLen*U_SIZEOF_UCHAR);
+
+ nRet = i18n_ushape_shape_arabic(en_digits, nSourceLen, I18N_USHAPE_DIGITS_AN2EN, nDestLen, dest, &nOutDestLen);
+ PRINT_RESULT(I18N_ERROR_NONE, nRet, "i18n_ushape_shape_arabic", BaseUtilsGetError(nRet));
+ PRINT_RESULT(nSourceLen, nOutDestLen, "i18n_ushape_shape_arabic", "Length of source and destination mismatch");
+ memcmp(dest, en_digits, nOutDestLen*U_SIZEOF_UCHAR);
+
+ return 0;
+}
/** @} */
/** @} */
extern int ITc_i18n_ustring_from_UTF32_with_sub_p(void);
extern int ITc_i18n_ustring_to_UTF32_with_sub_p(void);
extern int ITc_i18n_ustring_to_title_new_p(void);
+extern int ITc_i18n_ushape_shape_arabic_p(void);
extern int ITc_i18n_alpha_idx_create_destroy_p(void);
extern int ITc_i18n_alpha_idx_add_labels_p(void);
{"ITc_i18n_ustring_from_UTF32_with_sub_p",ITc_i18n_ustring_from_UTF32_with_sub_p, ITs_base_utils_ustring_startup, ITs_base_utils_ustring_cleanup},
{"ITc_i18n_ustring_to_UTF32_with_sub_p",ITc_i18n_ustring_to_UTF32_with_sub_p, ITs_base_utils_ustring_startup, ITs_base_utils_ustring_cleanup},
{"ITc_i18n_ustring_to_title_new_p",ITc_i18n_ustring_to_title_new_p, ITs_base_utils_ustring_startup, ITs_base_utils_ustring_cleanup},
+ {"ITc_i18n_ushape_shape_arabic_p",ITc_i18n_ushape_shape_arabic_p, ITs_base_utils_ustring_startup, ITs_base_utils_ustring_cleanup},
{"ITc_i18n_alpha_idx_create_destroy_p",ITc_i18n_alpha_idx_create_destroy_p, ITs_base_utils_alpha_startup, ITs_base_utils_alpha_cleanup},
{"ITc_i18n_alpha_idx_add_labels_p",ITc_i18n_alpha_idx_add_labels_p, ITs_base_utils_alpha_startup, ITs_base_utils_alpha_cleanup},
extern int ITc_i18n_ustring_from_UTF32_with_sub_p(void);
extern int ITc_i18n_ustring_to_UTF32_with_sub_p(void);
extern int ITc_i18n_ustring_to_title_new_p(void);
+extern int ITc_i18n_ushape_shape_arabic_p(void);
extern int ITc_i18n_alpha_idx_create_destroy_p(void);
extern int ITc_i18n_alpha_idx_add_labels_p(void);
{"ITc_i18n_ustring_from_UTF32_with_sub_p",ITc_i18n_ustring_from_UTF32_with_sub_p, ITs_base_utils_ustring_startup, ITs_base_utils_ustring_cleanup},
{"ITc_i18n_ustring_to_UTF32_with_sub_p",ITc_i18n_ustring_to_UTF32_with_sub_p, ITs_base_utils_ustring_startup, ITs_base_utils_ustring_cleanup},
{"ITc_i18n_ustring_to_title_new_p",ITc_i18n_ustring_to_title_new_p, ITs_base_utils_ustring_startup, ITs_base_utils_ustring_cleanup},
-
+ {"ITc_i18n_ushape_shape_arabic_p",ITc_i18n_ushape_shape_arabic_p, ITs_base_utils_ustring_startup, ITs_base_utils_ustring_cleanup},
+
{"ITc_i18n_alpha_idx_create_destroy_p",ITc_i18n_alpha_idx_create_destroy_p, ITs_base_utils_alpha_startup, ITs_base_utils_alpha_cleanup},
{"ITc_i18n_alpha_idx_add_labels_p",ITc_i18n_alpha_idx_add_labels_p, ITs_base_utils_alpha_startup, ITs_base_utils_alpha_cleanup},
{"ITc_i18n_alpha_idx_add_record_p",ITc_i18n_alpha_idx_add_record_p, ITs_base_utils_alpha_startup, ITs_base_utils_alpha_cleanup},
{"ITc_i18n_format_format_with_field_position_p",ITc_i18n_format_format_with_field_position_p, ITs_base_utils_format_startup, ITs_base_utils_format_cleanup},
{"ITc_i18n_format_parse_object_p",ITc_i18n_format_parse_object_p, ITs_base_utils_format_startup, ITs_base_utils_format_cleanup},
{"ITc_i18n_format_parse_object_with_parse_position_p",ITc_i18n_format_parse_object_with_parse_position_p, ITs_base_utils_format_startup, ITs_base_utils_format_cleanup},
- {"ITc_i18n_format_get_locale_p",ITc_i18n_format_get_locale_p, ITs_base_utils_format_startup, ITs_base_utils_format_cleanup},
-
+ {"ITc_i18n_format_get_locale_p",ITc_i18n_format_get_locale_p, ITs_base_utils_format_startup, ITs_base_utils_format_cleanup},
{"ITc_i18n_measure_format_create_destroy_p",ITc_i18n_measure_format_create_destroy_p, ITs_base_utils_measure_format_startup, ITs_base_utils_measure_format_cleanup},
{"ITc_i18n_measure_format_clone_p",ITc_i18n_measure_format_clone_p, ITs_base_utils_measure_format_startup, ITs_base_utils_measure_format_cleanup},
{"ITc_i18n_measure_format_format_p",ITc_i18n_measure_format_format_p, ITs_base_utils_measure_format_startup, ITs_base_utils_measure_format_cleanup},
extern int ITc_i18n_ustring_from_UTF32_with_sub_p(void);
extern int ITc_i18n_ustring_to_UTF32_with_sub_p(void);
extern int ITc_i18n_ustring_to_title_new_p(void);
+extern int ITc_i18n_ushape_shape_arabic_p(void);
extern int ITc_i18n_utmscale_get_time_scale_value_p(void);
extern int ITc_i18n_utmscale_from_int64_p(void);
extern int ITc_i18n_utmscale_to_int64_p(void);
{"ITc_i18n_ustring_from_UTF32_with_sub_p", ITc_i18n_ustring_from_UTF32_with_sub_p, ITs_base_utils_ustring_startup, ITs_base_utils_ustring_cleanup},
{"ITc_i18n_ustring_to_UTF32_with_sub_p", ITc_i18n_ustring_to_UTF32_with_sub_p, ITs_base_utils_ustring_startup, ITs_base_utils_ustring_cleanup},
{"ITc_i18n_ustring_to_title_new_p", ITc_i18n_ustring_to_title_new_p, ITs_base_utils_ustring_startup, ITs_base_utils_ustring_cleanup},
- {NULL, NULL}
+ {"ITc_i18n_ushape_shape_arabic_p",ITc_i18n_ushape_shape_arabic_p, ITs_base_utils_ustring_startup, ITs_base_utils_ustring_cleanup},
+ {NULL, NULL}
};
#endif // __TCT_BASE_UTILS_NATIVE_H__