utc-capi-base-utils-measure-unit.c
utc-capi-base-utils-measure.c
utc-capi-base-utils-measure-format.c
+ utc-capi-base-utils-format.c
)
PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
extern void utc_capi_base_utils_measure_cleanup(void);
extern void utc_capi_base_utils_measure_format_startup(void);
extern void utc_capi_base_utils_measure_format_cleanup(void);
+extern void utc_capi_base_utils_format_startup(void);
+extern void utc_capi_base_utils_format_cleanup(void);
extern int utc_capi_base_utils_i18n_ustring_get_length_p(void);
extern int utc_capi_base_utils_i18n_ustring_get_length_n(void);
extern int utc_capi_base_utils_i18n_measure_format_create_p3(void);
extern int utc_capi_base_utils_i18n_measure_format_create_n(void);
extern int utc_capi_base_utils_i18n_measure_format_create_n2(void);
+extern int utc_capi_base_utils_i18n_format_get_locale_p(void);
+extern int utc_capi_base_utils_i18n_format_get_locale_n(void);
+extern int utc_capi_base_utils_i18n_format_get_locale_n2(void);
+extern int utc_capi_base_utils_i18n_format_get_locale_n3(void);
+extern int utc_capi_base_utils_i18n_format_get_locale_n4(void);
+extern int utc_capi_base_utils_i18n_format_parse_object_p(void);
+extern int utc_capi_base_utils_i18n_format_parse_object_n(void);
+extern int utc_capi_base_utils_i18n_format_parse_object_n2(void);
+extern int utc_capi_base_utils_i18n_format_parse_object_n3(void);
+extern int utc_capi_base_utils_i18n_format_format_p(void);
+extern int utc_capi_base_utils_i18n_format_format_n(void);
+extern int utc_capi_base_utils_i18n_format_format_n2(void);
+extern int utc_capi_base_utils_i18n_format_format_n3(void);
+extern int utc_capi_base_utils_i18n_format_clone_p(void);
+extern int utc_capi_base_utils_i18n_format_clone_n(void);
+extern int utc_capi_base_utils_i18n_format_clone_n2(void);
+extern int utc_capi_base_utils_i18n_format_destroy_p(void);
+extern int utc_capi_base_utils_i18n_format_destroy_n(void);
testcase tc_array[] = {
{"utc_capi_base_utils_i18n_ustring_get_length_p", utc_capi_base_utils_i18n_ustring_get_length_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
{"utc_capi_base_utils_i18n_measure_format_create_p3", utc_capi_base_utils_i18n_measure_format_create_p3, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
{"utc_capi_base_utils_i18n_measure_format_create_n", utc_capi_base_utils_i18n_measure_format_create_n, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
{"utc_capi_base_utils_i18n_measure_format_create_n2", utc_capi_base_utils_i18n_measure_format_create_n2, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_get_locale_p", utc_capi_base_utils_i18n_format_get_locale_p, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_get_locale_n", utc_capi_base_utils_i18n_format_get_locale_n, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_get_locale_n2", utc_capi_base_utils_i18n_format_get_locale_n2, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_get_locale_n3", utc_capi_base_utils_i18n_format_get_locale_n3, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_get_locale_n4", utc_capi_base_utils_i18n_format_get_locale_n4, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_parse_object_p", utc_capi_base_utils_i18n_format_parse_object_p, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_parse_object_n", utc_capi_base_utils_i18n_format_parse_object_n, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_parse_object_n2", utc_capi_base_utils_i18n_format_parse_object_n2, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_parse_object_n3", utc_capi_base_utils_i18n_format_parse_object_n3, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_format_p", utc_capi_base_utils_i18n_format_format_p, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_format_n", utc_capi_base_utils_i18n_format_format_n, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_format_n2", utc_capi_base_utils_i18n_format_format_n2, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_format_n3", utc_capi_base_utils_i18n_format_format_n3, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_clone_p", utc_capi_base_utils_i18n_format_clone_p, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_clone_n", utc_capi_base_utils_i18n_format_clone_n, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_clone_n2", utc_capi_base_utils_i18n_format_clone_n2, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_destroy_p", utc_capi_base_utils_i18n_format_destroy_p, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_destroy_n", utc_capi_base_utils_i18n_format_destroy_n, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
{NULL, NULL}
};
extern void utc_capi_base_utils_measure_cleanup(void);
extern void utc_capi_base_utils_measure_format_startup(void);
extern void utc_capi_base_utils_measure_format_cleanup(void);
+extern void utc_capi_base_utils_format_startup(void);
+extern void utc_capi_base_utils_format_cleanup(void);
extern int utc_capi_base_utils_i18n_ustring_get_length_p(void);
extern int utc_capi_base_utils_i18n_ustring_get_length_n(void);
extern int utc_capi_base_utils_i18n_measure_format_create_p3(void);
extern int utc_capi_base_utils_i18n_measure_format_create_n(void);
extern int utc_capi_base_utils_i18n_measure_format_create_n2(void);
+extern int utc_capi_base_utils_i18n_format_get_locale_p(void);
+extern int utc_capi_base_utils_i18n_format_get_locale_n(void);
+extern int utc_capi_base_utils_i18n_format_get_locale_n2(void);
+extern int utc_capi_base_utils_i18n_format_parse_object_p(void);
+extern int utc_capi_base_utils_i18n_format_parse_object_n(void);
+extern int utc_capi_base_utils_i18n_format_parse_object_n2(void);
+extern int utc_capi_base_utils_i18n_format_parse_object_n3(void);
+extern int utc_capi_base_utils_i18n_format_format_p(void);
+extern int utc_capi_base_utils_i18n_format_format_n(void);
+extern int utc_capi_base_utils_i18n_format_format_n2(void);
+extern int utc_capi_base_utils_i18n_format_format_n3(void);
+extern int utc_capi_base_utils_i18n_format_clone_p(void);
+extern int utc_capi_base_utils_i18n_format_clone_n(void);
+extern int utc_capi_base_utils_i18n_format_clone_n2(void);
+extern int utc_capi_base_utils_i18n_format_destroy_p(void);
+extern int utc_capi_base_utils_i18n_format_destroy_n(void);
testcase tc_array[] = {
{"utc_capi_base_utils_i18n_ustring_get_length_p", utc_capi_base_utils_i18n_ustring_get_length_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
{"utc_capi_base_utils_i18n_formattable_create_with_udate_n2",utc_capi_base_utils_i18n_formattable_create_with_udate_n2,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_create_default_p",utc_capi_base_utils_i18n_formattable_create_default_p,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_create_default_n",utc_capi_base_utils_i18n_formattable_create_default_n,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
- {"utc_capi_base_utils_i18n_measure_unit_create_teaspoon_p", utc_capi_base_utils_i18n_measure_unit_create_teaspoon_p, utc_capi_base_utils_measure_unit_startup, utc_capi_base_utils_measure_unit_cleanup},
+ {"utc_capi_base_utils_i18n_measure_unit_create_teaspoon_p", utc_capi_base_utils_i18n_measure_unit_create_teaspoon_p, utc_capi_base_utils_measure_unit_startup, utc_capi_base_utils_measure_unit_cleanup},
{"utc_capi_base_utils_i18n_measure_unit_create_teaspoon_n", utc_capi_base_utils_i18n_measure_unit_create_teaspoon_n, utc_capi_base_utils_measure_unit_startup, utc_capi_base_utils_measure_unit_cleanup},
{"utc_capi_base_utils_i18n_measure_unit_create_tablespoon_p", utc_capi_base_utils_i18n_measure_unit_create_tablespoon_p, utc_capi_base_utils_measure_unit_startup, utc_capi_base_utils_measure_unit_cleanup},
{"utc_capi_base_utils_i18n_measure_unit_create_tablespoon_n", utc_capi_base_utils_i18n_measure_unit_create_tablespoon_n, utc_capi_base_utils_measure_unit_startup, utc_capi_base_utils_measure_unit_cleanup},
{"utc_capi_base_utils_i18n_measure_format_create_p3", utc_capi_base_utils_i18n_measure_format_create_p3, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
{"utc_capi_base_utils_i18n_measure_format_create_n", utc_capi_base_utils_i18n_measure_format_create_n, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
{"utc_capi_base_utils_i18n_measure_format_create_n2", utc_capi_base_utils_i18n_measure_format_create_n2, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_get_locale_p", utc_capi_base_utils_i18n_format_get_locale_p, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_get_locale_n", utc_capi_base_utils_i18n_format_get_locale_n, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_get_locale_n2", utc_capi_base_utils_i18n_format_get_locale_n2, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_parse_object_p", utc_capi_base_utils_i18n_format_parse_object_p, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_parse_object_n", utc_capi_base_utils_i18n_format_parse_object_n, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_parse_object_n2", utc_capi_base_utils_i18n_format_parse_object_n2, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_parse_object_n3", utc_capi_base_utils_i18n_format_parse_object_n3, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_format_p", utc_capi_base_utils_i18n_format_format_p, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_format_n", utc_capi_base_utils_i18n_format_format_n, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_format_n2", utc_capi_base_utils_i18n_format_format_n2, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_format_n3", utc_capi_base_utils_i18n_format_format_n3, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_clone_p", utc_capi_base_utils_i18n_format_clone_p, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_clone_n", utc_capi_base_utils_i18n_format_clone_n, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_clone_n2", utc_capi_base_utils_i18n_format_clone_n2, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_destroy_p", utc_capi_base_utils_i18n_format_destroy_p, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
+ {"utc_capi_base_utils_i18n_format_destroy_n", utc_capi_base_utils_i18n_format_destroy_n, utc_capi_base_utils_format_startup, utc_capi_base_utils_format_cleanup},
{NULL, NULL}
};
--- /dev/null
+#include "assert.h"
+#include <utils_i18n.h>
+#include <string.h>
+
+static i18n_format_h format = NULL;
+
+/**
+ * @function utc_capi_base_utils_format_startup
+ * @description Called before each test
+ * @parameter NA
+ * @return NA
+ */
+void utc_capi_base_utils_format_startup(void)
+{
+ i18n_measure_format_h measure_format = NULL;
+ i18n_measure_format_create_currency_format(&measure_format);
+
+ i18n_measure_format_clone(measure_format, &format);
+
+ i18n_measure_format_destroy(measure_format);
+}
+
+/**
+ * @function utc_capi_base_utils_format_cleanup
+ * @description Called after each test
+ * @parameter NA
+ * @return NA
+ */
+void utc_capi_base_utils_format_cleanup(void)
+{
+ if (format != NULL) {
+ i18n_format_destroy(format);
+ format = NULL;
+ }
+}
+
+/**
+ * @testcase utc_capi_base_utils_i18n_format_get_locale_p
+ * @since_tizen 3.0
+ * @description Calls i18n_format_get_locale and checks whether function succeeded.
+ */
+int utc_capi_base_utils_i18n_format_get_locale_p(void)
+{
+ assert_neq(format, NULL);
+
+ i18n_uloc_data_locale_type_e type = I18N_ULOC_ACTUAL_LOCALE;
+
+ const char *language = NULL;
+ const char *country = NULL;
+
+ int ret = i18n_format_get_locale(format, type, &language, &country);
+
+ assert_eq(ret, I18N_ERROR_NONE);
+ assert_neq(language, NULL);
+ assert_neq(country, NULL);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_capi_base_utils_i18n_format_get_locale_n
+ * @since_tizen 3.0
+ * @description Calls i18n_format_get_locale passing invalid format and checks for
+ * an invalid parameter error code.
+ */
+int utc_capi_base_utils_i18n_format_get_locale_n(void)
+{
+ i18n_uloc_data_locale_type_e type = I18N_ULOC_ACTUAL_LOCALE;
+
+ const char *language = NULL;
+ const char *country = NULL;
+
+ int ret = i18n_format_get_locale(NULL, type, &language, &country);
+ assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_capi_base_utils_i18n_format_get_locale_n2
+ * @since_tizen 3.0
+ * @description Calls i18n_format_get_locale passing invalid type and checks for
+ * an invalid parameter error code.
+ */
+int utc_capi_base_utils_i18n_format_get_locale_n2(void)
+{
+ assert_neq(format, NULL);
+
+ i18n_uloc_data_locale_type_e type = I18N_ULOC_ACTUAL_LOCALE - 1; // Invalid parameter
+
+ const char *language = NULL;
+ const char *country = NULL;
+
+ int ret = i18n_format_get_locale(format, type, &language, &country);
+ assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_capi_base_utils_i18n_format_get_locale_n3
+ * @since_tizen 3.0
+ * @description Calls i18n_format_get_locale passing invalid language and checks for
+ * an invalid parameter error code.
+ */
+int utc_capi_base_utils_i18n_format_get_locale_n3(void)
+{
+ assert_neq(format, NULL);
+
+ i18n_uloc_data_locale_type_e type = I18N_ULOC_ACTUAL_LOCALE;
+
+ const char *country = NULL;
+
+ int ret = i18n_format_get_locale(format, type, NULL, &country);
+ assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_capi_base_utils_i18n_format_get_locale_n4
+ * @since_tizen 3.0
+ * @description Calls i18n_format_get_locale passing invalid country and checks for
+ * an invalid parameter error code.
+ */
+int utc_capi_base_utils_i18n_format_get_locale_n4(void)
+{
+ assert_neq(format, NULL);
+
+ i18n_uloc_data_locale_type_e type = I18N_ULOC_ACTUAL_LOCALE;
+
+ const char *language = NULL;
+
+ int ret = i18n_format_get_locale(format, type, &language, NULL);
+ assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_capi_base_utils_i18n_format_parse_object_p
+ * @since_tizen 3.0
+ * @description Calls i18n_format_parse_object and checks whether function succeeded.
+ */
+int utc_capi_base_utils_i18n_format_parse_object_p(void)
+{
+ assert_neq(format, NULL);
+
+ const char *source = "$1,234.56";
+
+ i18n_formattable_h result = NULL;
+
+ int ret = i18n_format_parse_object(format, source, &result);
+
+ assert_eq(ret, I18N_ERROR_NONE);
+ assert_neq(result, NULL);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_capi_base_utils_i18n_format_parse_object_n
+ * @since_tizen 3.0
+ * @description Calls i18n_format_parse_object passing invalid format and checks for
+ * an invalid parameter error code.
+ */
+int utc_capi_base_utils_i18n_format_parse_object_n(void)
+{
+ const char *source = "$1,234.56";
+
+ i18n_formattable_h result = NULL;
+
+ int ret = i18n_format_parse_object(NULL, source, &result);
+
+ assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+ assert_eq(result, NULL);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_capi_base_utils_i18n_format_parse_object_n2
+ * @since_tizen 3.0
+ * @description Calls i18n_format_parse_object passing invalid source and checks for
+ * an invalid parameter error code.
+ */
+int utc_capi_base_utils_i18n_format_parse_object_n2(void)
+{
+ assert_neq(format, NULL);
+
+ i18n_formattable_h result = NULL;
+
+ int ret = i18n_format_parse_object(format, NULL, &result);
+
+ assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+ assert_eq(result, NULL);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_capi_base_utils_i18n_format_parse_object_n3
+ * @since_tizen 3.0
+ * @description Calls i18n_format_parse_object passing invalid result and checks for
+ * an invalid parameter error code.
+ */
+int utc_capi_base_utils_i18n_format_parse_object_n3(void)
+{
+ assert_neq(format, NULL);
+
+ const char *source = "$1,234.56";
+
+ int ret = i18n_format_parse_object(format, source, NULL);
+
+ assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_capi_base_utils_i18n_format_format_p
+ * @since_tizen 3.0
+ * @description Calls i18n_format_format and checks whether function succeeded.
+ */
+int utc_capi_base_utils_i18n_format_format_p(void)
+{
+ double double_to_set = 13.0;
+ i18n_formattable_h formattable = NULL;
+ int ret = i18n_formattable_create_with_double(double_to_set, &formattable);
+ assert_eq(ret, I18N_ERROR_NONE);
+ assert_neq(formattable, NULL);
+
+ char *append_to = "Price: ";
+
+ ret = i18n_format_format(format, formattable, &append_to);
+
+ i18n_formattable_destroy(formattable);
+
+ assert_eq(ret, I18N_ERROR_NONE);
+ assert_eq(strcmp(append_to, "Price: $13.00"), 0);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_capi_base_utils_i18n_format_format_n
+ * @since_tizen 3.0
+ * @description Calls i18n_format_format passing invalid format and checks for an
+ * invalid parameter error code.
+ */
+int utc_capi_base_utils_i18n_format_format_n(void)
+{
+ double double_to_set = 13.0;
+ i18n_formattable_h formattable = NULL;
+ int ret = i18n_formattable_create_with_double(double_to_set, &formattable);
+ assert_eq(ret, I18N_ERROR_NONE);
+ assert_neq(formattable, NULL);
+
+ char *append_to = "Price: ";
+
+ ret = i18n_format_format(NULL, formattable, &append_to);
+
+ i18n_formattable_destroy(formattable);
+
+ assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_capi_base_utils_i18n_format_format_n2
+ * @since_tizen 3.0
+ * @description Calls i18n_format_format passing invalid formattable and checks for
+ * an invalid parameter error code.
+ */
+int utc_capi_base_utils_i18n_format_format_n2(void)
+{
+ assert_neq(format, NULL);
+
+ char *append_to = "Price: ";
+
+ int ret = i18n_format_format(format, NULL, &append_to);
+
+ assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_capi_base_utils_i18n_format_format_n3
+ * @since_tizen 3.0
+ * @description Calls i18n_format_format passing invalid append_to and checks for an
+ * invalid parameter error code.
+ */
+int utc_capi_base_utils_i18n_format_format_n3(void)
+{
+ assert_neq(format, NULL);
+
+ double double_to_set = 13.0;
+ i18n_formattable_h formattable = NULL;
+ int ret = i18n_formattable_create_with_double(double_to_set, &formattable);
+ assert_eq(ret, I18N_ERROR_NONE);
+ assert_neq(formattable, NULL);
+
+ ret = i18n_format_format(format, formattable, NULL);
+
+ i18n_formattable_destroy(formattable);
+
+ assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_capi_base_utils_i18n_format_clone_p
+ * @since_tizen 3.0
+ * @description Calls i18n_format_clone and checks whether function succeeded.
+ */
+int utc_capi_base_utils_i18n_format_clone_p(void)
+{
+ assert_neq(format, NULL);
+
+ i18n_format_h clone = NULL;
+
+ int ret = i18n_format_clone(format, &clone);
+
+ assert_eq(ret, I18N_ERROR_NONE);
+ assert_neq(clone, NULL);
+
+ i18n_format_destroy(clone);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_capi_base_utils_i18n_format_clone_n
+ * @since_tizen 3.0
+ * @description Calls i18n_format_clone passing invalid format and checks for an
+ * invalid parameter error code.
+ */
+int utc_capi_base_utils_i18n_format_clone_n(void)
+{
+ i18n_format_h clone = NULL;
+
+ int ret = i18n_format_clone(NULL, &clone);
+
+ assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+ assert_eq(clone, NULL);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_capi_base_utils_i18n_format_clone_n2
+ * @since_tizen 3.0
+ * @description Calls i18n_format_clone passing invalid clone and checks for an
+ * invalid parameter error code.
+ */
+int utc_capi_base_utils_i18n_format_clone_n2(void)
+{
+ assert_neq(format, NULL);
+
+ int ret = i18n_format_clone(format, NULL);
+
+ assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_capi_base_utils_i18n_format_destroy_p
+ * @since_tizen 3.0
+ * @description Calls i18n_format_destroy and checks whether function succeeded.
+ */
+int utc_capi_base_utils_i18n_format_destroy_p(void)
+{
+ assert_neq(format, NULL);
+
+ int ret = i18n_format_destroy(format);
+
+ assert_eq(ret, I18N_ERROR_NONE);
+ format = NULL;
+
+ return 0;
+}
+
+/**
+ * @testcase utc_capi_base_utils_i18n_format_destroy_n
+ * @since_tizen 3.0
+ * @description Calls i18n_format_destroy passing invalid format and checks for an
+ * invalid parameter error code.
+ */
+int utc_capi_base_utils_i18n_format_destroy_n(void)
+{
+ int ret = i18n_format_destroy(NULL);
+
+ assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+ return 0;
+}