extern int utc_capi_base_utils_i18n_formattable_element_at_n2(void);
extern int utc_capi_base_utils_i18n_formattable_element_at_n3(void);
extern int utc_capi_base_utils_i18n_formattable_equal_p(void);
+extern int utc_capi_base_utils_i18n_formattable_equal_p2(void);
extern int utc_capi_base_utils_i18n_formattable_equal_n(void);
extern int utc_capi_base_utils_i18n_formattable_equal_n2(void);
extern int utc_capi_base_utils_i18n_formattable_equal_n3(void);
extern int utc_capi_base_utils_i18n_formattable_not_equal_p(void);
+extern int utc_capi_base_utils_i18n_formattable_not_equal_p2(void);
extern int utc_capi_base_utils_i18n_formattable_not_equal_n(void);
extern int utc_capi_base_utils_i18n_formattable_not_equal_n2(void);
extern int utc_capi_base_utils_i18n_formattable_not_equal_n3(void);
extern int utc_capi_base_utils_i18n_formattable_is_numeric_p(void);
+extern int utc_capi_base_utils_i18n_formattable_is_numeric_p2(void);
extern int utc_capi_base_utils_i18n_formattable_is_numeric_n(void);
extern int utc_capi_base_utils_i18n_formattable_is_numeric_n2(void);
extern int utc_capi_base_utils_i18n_formattable_get_type_p(void);
extern int utc_capi_base_utils_i18n_formattable_create_with_double_n(void);
extern int utc_capi_base_utils_i18n_formattable_create_with_udate_p(void);
extern int utc_capi_base_utils_i18n_formattable_create_with_udate_n(void);
-extern int utc_capi_base_utils_i18n_formattable_create_with_udate_n2(void);
extern int utc_capi_base_utils_i18n_formattable_create_default_p(void);
extern int utc_capi_base_utils_i18n_formattable_create_default_n(void);
extern int utc_capi_base_utils_i18n_measure_unit_create_teaspoon_p(void);
extern int utc_capi_base_utils_i18n_measure_format_format_n2(void);
extern int utc_capi_base_utils_i18n_measure_format_format_n3(void);
extern int utc_capi_base_utils_i18n_measure_format_format_n4(void);
-extern int utc_capi_base_utils_i18n_measure_format_parse_object_p(void);
-extern int utc_capi_base_utils_i18n_measure_format_parse_object_n(void);
-extern int utc_capi_base_utils_i18n_measure_format_parse_object_n2(void);
-extern int utc_capi_base_utils_i18n_measure_format_parse_object_n3(void);
-extern int utc_capi_base_utils_i18n_measure_format_parse_object_n4(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);
{"utc_capi_base_utils_i18n_formattable_element_at_n2",utc_capi_base_utils_i18n_formattable_element_at_n2,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_element_at_n3",utc_capi_base_utils_i18n_formattable_element_at_n3,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_equal_p",utc_capi_base_utils_i18n_formattable_equal_p,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
+ {"utc_capi_base_utils_i18n_formattable_equal_p2",utc_capi_base_utils_i18n_formattable_equal_p2,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_equal_n",utc_capi_base_utils_i18n_formattable_equal_n,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_equal_n2",utc_capi_base_utils_i18n_formattable_equal_n2,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_equal_n3",utc_capi_base_utils_i18n_formattable_equal_n3,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_not_equal_p",utc_capi_base_utils_i18n_formattable_not_equal_p,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
+ {"utc_capi_base_utils_i18n_formattable_not_equal_p2",utc_capi_base_utils_i18n_formattable_not_equal_p2,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_not_equal_n",utc_capi_base_utils_i18n_formattable_not_equal_n,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_not_equal_n2",utc_capi_base_utils_i18n_formattable_not_equal_n2,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_not_equal_n3",utc_capi_base_utils_i18n_formattable_not_equal_n3,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_is_numeric_p",utc_capi_base_utils_i18n_formattable_is_numeric_p,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
+ {"utc_capi_base_utils_i18n_formattable_is_numeric_p2",utc_capi_base_utils_i18n_formattable_is_numeric_p2,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_is_numeric_n",utc_capi_base_utils_i18n_formattable_is_numeric_n,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_is_numeric_n2",utc_capi_base_utils_i18n_formattable_is_numeric_n2,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_get_type_p",utc_capi_base_utils_i18n_formattable_get_type_p,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_create_with_double_n",utc_capi_base_utils_i18n_formattable_create_with_double_n,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_create_with_udate_p",utc_capi_base_utils_i18n_formattable_create_with_udate_p,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_create_with_udate_n",utc_capi_base_utils_i18n_formattable_create_with_udate_n,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_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_unit_clone_n2", utc_capi_base_utils_i18n_measure_unit_clone_n2, utc_capi_base_utils_measure_unit_startup, utc_capi_base_utils_measure_unit_cleanup},
{"utc_capi_base_utils_i18n_measure_unit_create_p", utc_capi_base_utils_i18n_measure_unit_create_p, utc_capi_base_utils_measure_unit_startup, utc_capi_base_utils_measure_unit_cleanup},
{"utc_capi_base_utils_i18n_measure_unit_create_n", utc_capi_base_utils_i18n_measure_unit_create_n, utc_capi_base_utils_measure_unit_startup, utc_capi_base_utils_measure_unit_cleanup},
+ {"utc_capi_base_utils_i18n_measure_create_p", utc_capi_base_utils_i18n_measure_create_p, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
+ {"utc_capi_base_utils_i18n_measure_create_n", utc_capi_base_utils_i18n_measure_create_n, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
+ {"utc_capi_base_utils_i18n_measure_destroy_p", utc_capi_base_utils_i18n_measure_destroy_p, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
+ {"utc_capi_base_utils_i18n_measure_destroy_n", utc_capi_base_utils_i18n_measure_destroy_n, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_get_unit_p", utc_capi_base_utils_i18n_measure_get_unit_p, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_get_unit_n", utc_capi_base_utils_i18n_measure_get_unit_n, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_get_unit_n2", utc_capi_base_utils_i18n_measure_get_unit_n2, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_get_number_p", utc_capi_base_utils_i18n_measure_get_number_p, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_get_number_n", utc_capi_base_utils_i18n_measure_get_number_n, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_get_number_n2", utc_capi_base_utils_i18n_measure_get_number_n2, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
- {"utc_capi_base_utils_i18n_measure_destroy_p", utc_capi_base_utils_i18n_measure_destroy_p, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
- {"utc_capi_base_utils_i18n_measure_destroy_n", utc_capi_base_utils_i18n_measure_destroy_n, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_clone_p", utc_capi_base_utils_i18n_measure_clone_p, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_clone_n", utc_capi_base_utils_i18n_measure_clone_n, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_clone_n2", utc_capi_base_utils_i18n_measure_clone_n2, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
- {"utc_capi_base_utils_i18n_measure_create_p", utc_capi_base_utils_i18n_measure_create_p, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
- {"utc_capi_base_utils_i18n_measure_create_n", utc_capi_base_utils_i18n_measure_create_n, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_format_create_currency_format_p", utc_capi_base_utils_i18n_measure_format_create_currency_format_p, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
{"utc_capi_base_utils_i18n_measure_format_create_currency_format_n", utc_capi_base_utils_i18n_measure_format_create_currency_format_n, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
{"utc_capi_base_utils_i18n_measure_format_create_currency_format_from_locale_p", utc_capi_base_utils_i18n_measure_format_create_currency_format_from_locale_p, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
{"utc_capi_base_utils_i18n_measure_format_format_n2", utc_capi_base_utils_i18n_measure_format_format_n2, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
{"utc_capi_base_utils_i18n_measure_format_format_n3", utc_capi_base_utils_i18n_measure_format_format_n3, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
{"utc_capi_base_utils_i18n_measure_format_format_n4", utc_capi_base_utils_i18n_measure_format_format_n4, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
- {"utc_capi_base_utils_i18n_measure_format_parse_object_p", utc_capi_base_utils_i18n_measure_format_parse_object_p, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
- {"utc_capi_base_utils_i18n_measure_format_parse_object_n", utc_capi_base_utils_i18n_measure_format_parse_object_n, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
- {"utc_capi_base_utils_i18n_measure_format_parse_object_n2", utc_capi_base_utils_i18n_measure_format_parse_object_n2, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
- {"utc_capi_base_utils_i18n_measure_format_parse_object_n3", utc_capi_base_utils_i18n_measure_format_parse_object_n3, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
- {"utc_capi_base_utils_i18n_measure_format_parse_object_n4", utc_capi_base_utils_i18n_measure_format_parse_object_n4, 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},
extern int utc_capi_base_utils_i18n_formattable_element_at_n2(void);
extern int utc_capi_base_utils_i18n_formattable_element_at_n3(void);
extern int utc_capi_base_utils_i18n_formattable_equal_p(void);
+extern int utc_capi_base_utils_i18n_formattable_equal_p2(void);
extern int utc_capi_base_utils_i18n_formattable_equal_n(void);
extern int utc_capi_base_utils_i18n_formattable_equal_n2(void);
extern int utc_capi_base_utils_i18n_formattable_equal_n3(void);
extern int utc_capi_base_utils_i18n_formattable_not_equal_p(void);
+extern int utc_capi_base_utils_i18n_formattable_not_equal_p2(void);
extern int utc_capi_base_utils_i18n_formattable_not_equal_n(void);
extern int utc_capi_base_utils_i18n_formattable_not_equal_n2(void);
extern int utc_capi_base_utils_i18n_formattable_not_equal_n3(void);
extern int utc_capi_base_utils_i18n_formattable_is_numeric_p(void);
+extern int utc_capi_base_utils_i18n_formattable_is_numeric_p2(void);
extern int utc_capi_base_utils_i18n_formattable_is_numeric_n(void);
extern int utc_capi_base_utils_i18n_formattable_is_numeric_n2(void);
extern int utc_capi_base_utils_i18n_formattable_get_type_p(void);
extern int utc_capi_base_utils_i18n_formattable_create_with_double_n(void);
extern int utc_capi_base_utils_i18n_formattable_create_with_udate_p(void);
extern int utc_capi_base_utils_i18n_formattable_create_with_udate_n(void);
-extern int utc_capi_base_utils_i18n_formattable_create_with_udate_n2(void);
extern int utc_capi_base_utils_i18n_formattable_create_default_p(void);
extern int utc_capi_base_utils_i18n_formattable_create_default_n(void);
extern int utc_capi_base_utils_i18n_measure_unit_create_teaspoon_p(void);
extern int utc_capi_base_utils_i18n_measure_format_format_n2(void);
extern int utc_capi_base_utils_i18n_measure_format_format_n3(void);
extern int utc_capi_base_utils_i18n_measure_format_format_n4(void);
-extern int utc_capi_base_utils_i18n_measure_format_parse_object_p(void);
-extern int utc_capi_base_utils_i18n_measure_format_parse_object_n(void);
-extern int utc_capi_base_utils_i18n_measure_format_parse_object_n2(void);
-extern int utc_capi_base_utils_i18n_measure_format_parse_object_n3(void);
-extern int utc_capi_base_utils_i18n_measure_format_parse_object_n4(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);
{"utc_capi_base_utils_i18n_formattable_element_at_n2",utc_capi_base_utils_i18n_formattable_element_at_n2,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_element_at_n3",utc_capi_base_utils_i18n_formattable_element_at_n3,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_equal_p",utc_capi_base_utils_i18n_formattable_equal_p,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
+ {"utc_capi_base_utils_i18n_formattable_equal_p2",utc_capi_base_utils_i18n_formattable_equal_p2,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_equal_n",utc_capi_base_utils_i18n_formattable_equal_n,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_equal_n2",utc_capi_base_utils_i18n_formattable_equal_n2,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_equal_n3",utc_capi_base_utils_i18n_formattable_equal_n3,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_not_equal_p",utc_capi_base_utils_i18n_formattable_not_equal_p,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
+ {"utc_capi_base_utils_i18n_formattable_not_equal_p2",utc_capi_base_utils_i18n_formattable_not_equal_p2,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_not_equal_n",utc_capi_base_utils_i18n_formattable_not_equal_n,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_not_equal_n2",utc_capi_base_utils_i18n_formattable_not_equal_n2,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_not_equal_n3",utc_capi_base_utils_i18n_formattable_not_equal_n3,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_is_numeric_p",utc_capi_base_utils_i18n_formattable_is_numeric_p,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
+ {"utc_capi_base_utils_i18n_formattable_is_numeric_p2",utc_capi_base_utils_i18n_formattable_is_numeric_p2,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_is_numeric_n",utc_capi_base_utils_i18n_formattable_is_numeric_n,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_is_numeric_n2",utc_capi_base_utils_i18n_formattable_is_numeric_n2,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_get_type_p",utc_capi_base_utils_i18n_formattable_get_type_p,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_create_with_double_n",utc_capi_base_utils_i18n_formattable_create_with_double_n,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_create_with_udate_p",utc_capi_base_utils_i18n_formattable_create_with_udate_p,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_cleanup },
{"utc_capi_base_utils_i18n_formattable_create_with_udate_n",utc_capi_base_utils_i18n_formattable_create_with_udate_n,utc_capi_base_utils_formattable_startup,utc_capi_base_utils_formattable_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_clone_n2", utc_capi_base_utils_i18n_measure_unit_clone_n2, utc_capi_base_utils_measure_unit_startup, utc_capi_base_utils_measure_unit_cleanup},
{"utc_capi_base_utils_i18n_measure_unit_create_p", utc_capi_base_utils_i18n_measure_unit_create_p, utc_capi_base_utils_measure_unit_startup, utc_capi_base_utils_measure_unit_cleanup},
{"utc_capi_base_utils_i18n_measure_unit_create_n", utc_capi_base_utils_i18n_measure_unit_create_n, utc_capi_base_utils_measure_unit_startup, utc_capi_base_utils_measure_unit_cleanup},
+ {"utc_capi_base_utils_i18n_measure_create_p", utc_capi_base_utils_i18n_measure_create_p, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
+ {"utc_capi_base_utils_i18n_measure_create_n", utc_capi_base_utils_i18n_measure_create_n, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
+ {"utc_capi_base_utils_i18n_measure_destroy_p", utc_capi_base_utils_i18n_measure_destroy_p, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
+ {"utc_capi_base_utils_i18n_measure_destroy_n", utc_capi_base_utils_i18n_measure_destroy_n, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_get_unit_p", utc_capi_base_utils_i18n_measure_get_unit_p, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_get_unit_n", utc_capi_base_utils_i18n_measure_get_unit_n, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_get_unit_n2", utc_capi_base_utils_i18n_measure_get_unit_n2, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_get_number_p", utc_capi_base_utils_i18n_measure_get_number_p, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_get_number_n", utc_capi_base_utils_i18n_measure_get_number_n, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_get_number_n2", utc_capi_base_utils_i18n_measure_get_number_n2, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
- {"utc_capi_base_utils_i18n_measure_destroy_p", utc_capi_base_utils_i18n_measure_destroy_p, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
- {"utc_capi_base_utils_i18n_measure_destroy_n", utc_capi_base_utils_i18n_measure_destroy_n, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_clone_p", utc_capi_base_utils_i18n_measure_clone_p, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_clone_n", utc_capi_base_utils_i18n_measure_clone_n, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_clone_n2", utc_capi_base_utils_i18n_measure_clone_n2, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
- {"utc_capi_base_utils_i18n_measure_create_p", utc_capi_base_utils_i18n_measure_create_p, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
- {"utc_capi_base_utils_i18n_measure_create_n", utc_capi_base_utils_i18n_measure_create_n, utc_capi_base_utils_measure_startup, utc_capi_base_utils_measure_cleanup},
{"utc_capi_base_utils_i18n_measure_format_create_currency_format_p", utc_capi_base_utils_i18n_measure_format_create_currency_format_p, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
{"utc_capi_base_utils_i18n_measure_format_create_currency_format_n", utc_capi_base_utils_i18n_measure_format_create_currency_format_n, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
{"utc_capi_base_utils_i18n_measure_format_create_currency_format_from_locale_p", utc_capi_base_utils_i18n_measure_format_create_currency_format_from_locale_p, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
{"utc_capi_base_utils_i18n_measure_format_format_n2", utc_capi_base_utils_i18n_measure_format_format_n2, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
{"utc_capi_base_utils_i18n_measure_format_format_n3", utc_capi_base_utils_i18n_measure_format_format_n3, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
{"utc_capi_base_utils_i18n_measure_format_format_n4", utc_capi_base_utils_i18n_measure_format_format_n4, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
- {"utc_capi_base_utils_i18n_measure_format_parse_object_p", utc_capi_base_utils_i18n_measure_format_parse_object_p, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
- {"utc_capi_base_utils_i18n_measure_format_parse_object_n", utc_capi_base_utils_i18n_measure_format_parse_object_n, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
- {"utc_capi_base_utils_i18n_measure_format_parse_object_n2", utc_capi_base_utils_i18n_measure_format_parse_object_n2, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
- {"utc_capi_base_utils_i18n_measure_format_parse_object_n3", utc_capi_base_utils_i18n_measure_format_parse_object_n3, utc_capi_base_utils_measure_format_startup, utc_capi_base_utils_measure_format_cleanup},
- {"utc_capi_base_utils_i18n_measure_format_parse_object_n4", utc_capi_base_utils_i18n_measure_format_parse_object_n4, 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},
}
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_set_end_index_p\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_set_end_index and checks whether function\r
- * succeeded.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_set_end_index_p
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_set_end_index and checks whether function
+ * succeeded.
*/
-int utc_capi_base_utils_i18n_field_position_set_end_index_p(void) {
-
+int utc_capi_base_utils_i18n_field_position_set_end_index_p(void)
+{
assert_neq(field_position, NULL);
assert_eq(ret, I18N_ERROR_NONE);
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_set_end_index_n\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_set_end_index passing invalid\r
- * field_position and checks for an invalid parameter error code.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_set_end_index_n
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_set_end_index passing invalid
+ * field_position and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_field_position_set_end_index_n(void) {
-
+int utc_capi_base_utils_i18n_field_position_set_end_index_n(void)
+{
int32_t end_index = 13;
ret = i18n_field_position_set_end_index(NULL, end_index);
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_set_begin_index_p\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_set_begin_index and checks whether\r
- * function succeeded.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_set_begin_index_p
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_set_begin_index and checks whether
+ * function succeeded.
*/
-int utc_capi_base_utils_i18n_field_position_set_begin_index_p(void) {
-
+int utc_capi_base_utils_i18n_field_position_set_begin_index_p(void)
+{
assert_neq(field_position, NULL);
assert_eq(ret, I18N_ERROR_NONE);
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_set_begin_index_n\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_set_begin_index passing invalid\r
- * field_position and checks for an invalid parameter error code.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_set_begin_index_n
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_set_begin_index passing invalid
+ * field_position and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_field_position_set_begin_index_n(void) {
-
+int utc_capi_base_utils_i18n_field_position_set_begin_index_n(void)
+{
int32_t begin_index = 10;
ret = i18n_field_position_set_begin_index(NULL, begin_index);
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_set_field_p\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_set_field and checks whether function\r
- * succeeded.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_set_field_p
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_set_field and checks whether function
+ * succeeded.
*/
-int utc_capi_base_utils_i18n_field_position_set_field_p(void) {
-
+int utc_capi_base_utils_i18n_field_position_set_field_p(void)
+{
assert_neq(field_position, NULL);
assert_eq(ret, I18N_ERROR_NONE);
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_set_field_n\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_set_field passing invalid field_position\r
- * and checks for an invalid parameter error code.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_set_field_n
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_set_field passing invalid field_position
+ * and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_field_position_set_field_n(void) {
-
+int utc_capi_base_utils_i18n_field_position_set_field_n(void)
+{
int32_t field = 0;
ret = i18n_field_position_set_field(NULL, field);
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_get_end_index_p\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_get_end_index and checks whether function\r
- * succeeded.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_get_end_index_p
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_get_end_index and checks whether function
+ * succeeded.
*/
-int utc_capi_base_utils_i18n_field_position_get_end_index_p(void) {
-
+int utc_capi_base_utils_i18n_field_position_get_end_index_p(void)
+{
assert_neq(field_position, NULL);
assert_eq(ret, I18N_ERROR_NONE);
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_get_end_index_n\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_get_end_index passing invalid\r
- * field_position and checks for an invalid parameter error code.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_get_end_index_n
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_get_end_index passing invalid
+ * field_position and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_field_position_get_end_index_n(void) {
-
+int utc_capi_base_utils_i18n_field_position_get_end_index_n(void)
+{
i18n_field_position_h field_position = NULL; // Invalid parameter
int32_t end_index;
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_get_end_index_n2\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_get_end_index passing invalid end_index\r
- * and checks for an invalid parameter error code.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_get_end_index_n2
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_get_end_index passing invalid end_index
+ * and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_field_position_get_end_index_n2(void) {
-
+int utc_capi_base_utils_i18n_field_position_get_end_index_n2(void)
+{
assert_neq(field_position, NULL);
assert_eq(ret, I18N_ERROR_NONE);
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_get_begin_index_p\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_get_begin_index and checks whether\r
- * function succeeded.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_get_begin_index_p
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_get_begin_index and checks whether
+ * function succeeded.
*/
-int utc_capi_base_utils_i18n_field_position_get_begin_index_p(void) {
-
+int utc_capi_base_utils_i18n_field_position_get_begin_index_p(void)
+{
assert_neq(field_position, NULL);
assert_eq(ret, I18N_ERROR_NONE);
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_get_begin_index_n\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_get_begin_index passing invalid\r
- * field_position and checks for an invalid parameter error code.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_get_begin_index_n
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_get_begin_index passing invalid
+ * field_position and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_field_position_get_begin_index_n(void) {
-
+int utc_capi_base_utils_i18n_field_position_get_begin_index_n(void)
+{
i18n_field_position_h field_position = NULL; // Invalid parameter
int32_t begin_index;
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_get_begin_index_n2\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_get_begin_index passing invalid\r
- * begin_index and checks for an invalid parameter error code.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_get_begin_index_n2
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_get_begin_index passing invalid
+ * begin_index and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_field_position_get_begin_index_n2(void) {
-
+int utc_capi_base_utils_i18n_field_position_get_begin_index_n2(void)
+{
assert_neq(field_position, NULL);
assert_eq(ret, I18N_ERROR_NONE);
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_get_field_p\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_get_field and checks whether function\r
- * succeeded.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_get_field_p
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_get_field and checks whether function
+ * succeeded.
*/
-int utc_capi_base_utils_i18n_field_position_get_field_p(void) {
-
+int utc_capi_base_utils_i18n_field_position_get_field_p(void)
+{
assert_neq(field_position, NULL);
assert_eq(ret, I18N_ERROR_NONE);
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_get_field_n\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_get_field passing invalid field_position\r
- * and checks for an invalid parameter error code.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_get_field_n
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_get_field passing invalid field_position
+ * and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_field_position_get_field_n(void) {
-
+int utc_capi_base_utils_i18n_field_position_get_field_n(void)
+{
i18n_field_position_h field_position = NULL; // Invalid parameter
int32_t field = NULL;
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_get_field_n2\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_get_field passing invalid field and checks\r
- * for an invalid parameter error code.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_get_field_n2
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_get_field passing invalid field and checks
+ * for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_field_position_get_field_n2(void) {
-
+int utc_capi_base_utils_i18n_field_position_get_field_n2(void)
+{
assert_neq(field_position, NULL);
assert_eq(ret, I18N_ERROR_NONE);
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_clone_p\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_clone and checks whether function succeeded.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_clone_p
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_clone and checks whether function succeeded.
*/
-int utc_capi_base_utils_i18n_field_position_clone_p(void) {
-
+int utc_capi_base_utils_i18n_field_position_clone_p(void)
+{
assert_neq(field_position, NULL);
assert_eq(ret, I18N_ERROR_NONE);
i18n_field_position_h clone = NULL;
- ret = i18n_field_position_clone(field_position, &clone);
+ int32_t begin_index = 10;
+ ret = i18n_field_position_set_begin_index(field_position, begin_index);
+ assert_eq(ret, I18N_ERROR_NONE);
+ int32_t field = 12;
+ ret = i18n_field_position_set_field(field_position, field);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ int32_t end_index = 15;
+ ret = i18n_field_position_set_end_index(field_position, end_index);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_field_position_clone(field_position, &clone);
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(clone, NULL);
+
+ int32_t ret_begin_index = -1;
+ ret = i18n_field_position_get_begin_index(clone, &ret_begin_index);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ int32_t ret_field = -1;
+ ret = i18n_field_position_get_field(clone, &ret_field);
assert_eq(ret, I18N_ERROR_NONE);
+ int32_t ret_end_index = -1;
+ ret = i18n_field_position_get_end_index(clone, &ret_end_index);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ assert_eq(ret_begin_index, begin_index);
+ assert_eq(ret_field, field);
+ assert_eq(ret_end_index, end_index);
+
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_clone_n\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_clone passing invalid field_position and\r
- * checks for an invalid parameter error code.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_clone_n
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_clone passing invalid field_position and
+ * checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_field_position_clone_n(void) {
-
+int utc_capi_base_utils_i18n_field_position_clone_n(void)
+{
i18n_field_position_h field_position = NULL; // Invalid parameter
i18n_field_position_h clone = NULL;
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_clone_n2\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_clone passing invalid clone and checks for\r
- * an invalid parameter error code.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_clone_n2
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_clone passing invalid clone and checks for
+ * an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_field_position_clone_n2(void) {
-
+int utc_capi_base_utils_i18n_field_position_clone_n2(void)
+{
assert_neq(field_position, NULL);
assert_eq(ret, I18N_ERROR_NONE);
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_destroy_p\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_destroy and checks whether function\r
- * succeeded.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_destroy_p
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_destroy and checks whether function
+ * succeeded.
*/
-int utc_capi_base_utils_i18n_field_position_destroy_p(void) {
-
+int utc_capi_base_utils_i18n_field_position_destroy_p(void)
+{
assert_neq(field_position, NULL);
assert_eq(ret, I18N_ERROR_NONE);
ret = i18n_field_position_destroy(field_position);
assert_eq(ret, I18N_ERROR_NONE);
+ field_position = NULL;
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_destroy_n\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_destroy passing invalid field_position and\r
- * checks for an invalid parameter error code.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_destroy_n
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_destroy passing invalid field_position and
+ * checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_field_position_destroy_n(void) {
-
+int utc_capi_base_utils_i18n_field_position_destroy_n(void)
+{
i18n_field_position_h field_position = NULL; // Invalid parameter
ret = i18n_field_position_destroy(field_position);
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_create_for_field_p\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_create_for_field and checks whether\r
- * function succeeded.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_create_for_field_p
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_create_for_field and checks whether
+ * function succeeded.
*/
-int utc_capi_base_utils_i18n_field_position_create_for_field_p(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_field_position_create_for_field_p(void)
+{
i18n_field_position_h field_position = NULL;
int32_t field = 13;
assert_neq(field_position, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ int32_t ret_field = -1;
+
+ ret = i18n_field_position_get_field(field_position, &ret_field);
+
+ i18n_field_position_destroy(field_position);
+ field_position = NULL;
+
+ assert_eq(ret, I18N_ERROR_NONE);
+ assert_eq(ret_field, field);
+
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_create_for_field_n\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_create_for_field passing invalid\r
- * field_position and checks for an invalid parameter error code.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_create_for_field_n
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_create_for_field passing invalid
+ * field_position and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_field_position_create_for_field_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_field_position_create_for_field_n(void)
+{
int32_t field = 0;
ret = i18n_field_position_create_for_field(field, NULL);
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_create_p\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_create and checks whether function\r
- * succeeded.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_create_p
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_create and checks whether function
+ * succeeded.
*/
-int utc_capi_base_utils_i18n_field_position_create_p(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_field_position_create_p(void)
+{
i18n_field_position_h field_position = NULL;
ret = i18n_field_position_create(&field_position);
assert_neq(field_position, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ i18n_field_position_destroy(field_position);
+ field_position = NULL;
+
return 0;
}
-/**\r
- * @testcase utc_capi_base_utils_i18n_field_position_create_n\r
- * @since_tizen 3.0\r
- * @description Calls i18n_field_position_create passing invalid field_position and\r
- * checks for an invalid parameter error code.\r
+/**
+ * @testcase utc_capi_base_utils_i18n_field_position_create_n
+ * @since_tizen 3.0
+ * @description Calls i18n_field_position_create passing invalid field_position and
+ * checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_field_position_create_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_field_position_create_n(void)
+{
ret = i18n_field_position_create(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
#include <string.h>
static i18n_format_h format = NULL;
+static int ret = I18N_ERROR_NONE;
/**
* @function utc_capi_base_utils_format_startup
void utc_capi_base_utils_format_startup(void)
{
i18n_measure_format_h measure_format = NULL;
- i18n_measure_format_create_currency_format(&measure_format);
+ const char *language = I18N_ULOCALE_ENGLISH;
+ const char *country = "US";
- i18n_measure_format_clone(measure_format, &format);
+ ret = i18n_measure_format_create_currency_format_from_locale(language, country, &measure_format);
+ if (ret == I18N_ERROR_NONE) {
+ ret = i18n_measure_format_clone(measure_format, &format);
- i18n_measure_format_destroy(measure_format);
+ i18n_measure_format_destroy(measure_format);
+ }
}
/**
*/
int utc_capi_base_utils_i18n_format_get_locale_p(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(format, NULL);
- i18n_uloc_data_locale_type_e type = I18N_ULOC_ACTUAL_LOCALE;
+ i18n_ulocale_data_locale_type_e type = I18N_ULOCALE_DATA_LOCALE_TYPE_ACTUAL_LOCALE;
- const char *language = NULL;
- const char *country = NULL;
+ char *language = NULL;
+ char *country = NULL;
- int ret = i18n_format_get_locale(format, type, &language, &country);
+ ret = i18n_format_get_locale(format, type, &language, &country);
assert_eq(ret, I18N_ERROR_NONE);
- assert_neq(language, NULL);
- assert_neq(country, NULL);
+ assert(!strcmp(language, I18N_ULOCALE_ENGLISH));
+ assert(!strcmp(country, "US"));
return 0;
}
*/
int utc_capi_base_utils_i18n_format_get_locale_n(void)
{
- i18n_uloc_data_locale_type_e type = I18N_ULOC_ACTUAL_LOCALE;
+ i18n_ulocale_data_locale_type_e type = I18N_ULOCALE_DATA_LOCALE_TYPE_ACTUAL_LOCALE;
- const char *language = NULL;
- const char *country = NULL;
+ char *language = NULL;
+ char *country = NULL;
- int ret = i18n_format_get_locale(NULL, type, &language, &country);
+ ret = i18n_format_get_locale(NULL, type, &language, &country);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
return 0;
*/
int utc_capi_base_utils_i18n_format_get_locale_n2(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(format, NULL);
- i18n_uloc_data_locale_type_e type = I18N_ULOC_ACTUAL_LOCALE - 1; // Invalid parameter
+ i18n_ulocale_data_locale_type_e type = I18N_ULOCALE_DATA_LOCALE_TYPE_ACTUAL_LOCALE - 1; // Invalid parameter
- const char *language = NULL;
- const char *country = NULL;
+ char *language = NULL;
+ char *country = NULL;
- int ret = i18n_format_get_locale(format, type, &language, &country);
+ ret = i18n_format_get_locale(format, type, &language, &country);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
return 0;
*/
int utc_capi_base_utils_i18n_format_get_locale_n3(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(format, NULL);
- i18n_uloc_data_locale_type_e type = I18N_ULOC_ACTUAL_LOCALE;
+ i18n_ulocale_data_locale_type_e type = I18N_ULOCALE_DATA_LOCALE_TYPE_ACTUAL_LOCALE;
- const char *country = NULL;
+ char *country = NULL;
- int ret = i18n_format_get_locale(format, type, NULL, &country);
+ ret = i18n_format_get_locale(format, type, NULL, &country);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
return 0;
*/
int utc_capi_base_utils_i18n_format_get_locale_n4(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(format, NULL);
- i18n_uloc_data_locale_type_e type = I18N_ULOC_ACTUAL_LOCALE;
+ i18n_ulocale_data_locale_type_e type = I18N_ULOCALE_DATA_LOCALE_TYPE_ACTUAL_LOCALE;
- const char *language = NULL;
+ char *language = NULL;
- int ret = i18n_format_get_locale(format, type, &language, NULL);
+ ret = i18n_format_get_locale(format, type, &language, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
return 0;
*/
int utc_capi_base_utils_i18n_format_parse_object_p(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(format, NULL);
const char *source = "$1,234.56";
i18n_formattable_h result = NULL;
- int ret = i18n_format_parse_object(format, source, &result);
-
+ ret = i18n_format_parse_object(format, source, &result);
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(result, NULL);
+ double value = 0;
+ ret = i18n_formattable_get_double(result, &value);
+ assert_eq(ret, I18N_ERROR_NONE);
+ assert_eq(value, 1234.56);
+
return 0;
}
i18n_formattable_h result = NULL;
- int ret = i18n_format_parse_object(NULL, source, &result);
+ ret = i18n_format_parse_object(NULL, source, &result);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
assert_eq(result, NULL);
*/
int utc_capi_base_utils_i18n_format_parse_object_n2(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(format, NULL);
i18n_formattable_h result = NULL;
- int ret = i18n_format_parse_object(format, NULL, &result);
+ ret = i18n_format_parse_object(format, NULL, &result);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
assert_eq(result, NULL);
*/
int utc_capi_base_utils_i18n_format_parse_object_n3(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(format, NULL);
const char *source = "$1,234.56";
- int ret = i18n_format_parse_object(format, source, NULL);
+ ret = i18n_format_parse_object(format, source, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
{
double double_to_set = 13.0;
i18n_formattable_h formattable = NULL;
- int ret = i18n_formattable_create_with_double(double_to_set, &formattable);
+ ret = i18n_formattable_create_with_double(double_to_set, &formattable);
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(formattable, NULL);
{
double double_to_set = 13.0;
i18n_formattable_h formattable = NULL;
- int ret = i18n_formattable_create_with_double(double_to_set, &formattable);
+ ret = i18n_formattable_create_with_double(double_to_set, &formattable);
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(formattable, NULL);
*/
int utc_capi_base_utils_i18n_format_format_n2(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(format, NULL);
char *append_to = "Price: ";
- int ret = i18n_format_format(format, NULL, &append_to);
+ ret = i18n_format_format(format, NULL, &append_to);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_format_format_n3(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
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);
+ ret = i18n_formattable_create_with_double(double_to_set, &formattable);
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(formattable, NULL);
*/
int utc_capi_base_utils_i18n_format_clone_p(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(format, NULL);
i18n_format_h clone = NULL;
- int ret = i18n_format_clone(format, &clone);
+ ret = i18n_format_clone(format, &clone);
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(clone, NULL);
{
i18n_format_h clone = NULL;
- int ret = i18n_format_clone(NULL, &clone);
+ ret = i18n_format_clone(NULL, &clone);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
assert_eq(clone, NULL);
*/
int utc_capi_base_utils_i18n_format_clone_n2(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(format, NULL);
- int ret = i18n_format_clone(format, NULL);
+ ret = i18n_format_clone(format, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_format_destroy_p(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(format, NULL);
- int ret = i18n_format_destroy(format);
+ ret = i18n_format_destroy(format);
assert_eq(ret, I18N_ERROR_NONE);
format = NULL;
*/
int utc_capi_base_utils_i18n_format_destroy_n(void)
{
- int ret = i18n_format_destroy(NULL);
+ ret = i18n_format_destroy(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_format_format_with_field_position_p(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
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);
+ ret = i18n_formattable_create_with_double(double_to_set, &formattable);
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(formattable, NULL);
{
double double_to_set = 13.0;
i18n_formattable_h formattable = NULL;
- int ret = i18n_formattable_create_with_double(double_to_set, &formattable);
+ ret = i18n_formattable_create_with_double(double_to_set, &formattable);
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(formattable, NULL);
*/
int utc_capi_base_utils_i18n_format_format_with_field_position_n2(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(format, NULL);
char *append_to = "Price: ";
i18n_field_position_create(&field_position);
assert_neq(field_position, NULL);
- int ret = i18n_format_format_with_field_position(format, NULL, &append_to, field_position);
+ ret = i18n_format_format_with_field_position(format, NULL, &append_to, field_position);
i18n_field_position_destroy(field_position);
*/
int utc_capi_base_utils_i18n_format_format_with_field_position_n3(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
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);
+ ret = i18n_formattable_create_with_double(double_to_set, &formattable);
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(formattable, NULL);
*/
int utc_capi_base_utils_i18n_format_format_with_field_position_n4(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
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);
+ ret = i18n_formattable_create_with_double(double_to_set, &formattable);
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(formattable, NULL);
*/
int utc_capi_base_utils_i18n_format_parse_object_with_parse_position_p(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(format, NULL);
char *source = "$1,234.56";
i18n_parse_position_create(&parse_position);
assert_neq(parse_position, NULL);
- int ret = i18n_format_parse_object_with_parse_position(format, source, &result, parse_position);
+ ret = i18n_format_parse_object_with_parse_position(format, source, parse_position, &result);
i18n_parse_position_destroy(parse_position);
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(result, NULL);
+ double value = 0;
+ ret = i18n_formattable_get_double(result, &value);
+ assert_eq(ret, I18N_ERROR_NONE);
+ assert_eq(value, 1234.56);
+
return 0;
}
i18n_parse_position_create(&parse_position);
assert_neq(parse_position, NULL);
- int ret = i18n_format_parse_object_with_parse_position(NULL, source, &result, parse_position);
+ ret = i18n_format_parse_object_with_parse_position(NULL, source, parse_position, &result);
i18n_parse_position_destroy(parse_position);
*/
int utc_capi_base_utils_i18n_format_parse_object_with_parse_position_n2(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(format, NULL);
i18n_formattable_h result = NULL;
i18n_parse_position_create(&parse_position);
assert_neq(parse_position, NULL);
- int ret = i18n_format_parse_object_with_parse_position(format, NULL, &result, parse_position);
+ ret = i18n_format_parse_object_with_parse_position(format, NULL, parse_position, &result);
i18n_parse_position_destroy(parse_position);
*/
int utc_capi_base_utils_i18n_format_parse_object_with_parse_position_n3(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(format, NULL);
char *source = "$1,234.56";
i18n_parse_position_create(&parse_position);
assert_neq(parse_position, NULL);
- int ret = i18n_format_parse_object_with_parse_position(format, source, NULL, parse_position);
+ ret = i18n_format_parse_object_with_parse_position(format, source, parse_position, NULL);
i18n_parse_position_destroy(parse_position);
*/
int utc_capi_base_utils_i18n_format_parse_object_with_parse_position_n4(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(format, NULL);
char *source = "$1,234.56";
i18n_formattable_h result = NULL;
- int ret = i18n_format_parse_object_with_parse_position(format, source, &result, NULL);
+ ret = i18n_format_parse_object_with_parse_position(format, source, NULL, &result);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
#include <utils_i18n.h>
#include <string.h>
+#define count 3
+
+static i18n_formattable_h formattable = NULL;
+static int ret = I18N_ERROR_NONE;
+
+static i18n_formattable_h array_to_set[count];
+
/**
* @function utc_capi_base_utils_formattable_startup
* @description Called before each test
*/
void utc_capi_base_utils_formattable_startup(void)
{
+ ret = i18n_formattable_create_default(&formattable);
+
+ int i;
+ for (i = 0; i < count; ++i) {
+ array_to_set[i] = NULL;
+ }
}
/**
*/
void utc_capi_base_utils_formattable_cleanup(void)
{
+ if (formattable != NULL) {
+ i18n_formattable_destroy(formattable);
+ formattable = NULL;
+ }
+
+ int i;
+ for (i = 0; i < count; ++i) {
+ if (array_to_set[i] != NULL) {
+ i18n_formattable_destroy(array_to_set[i]);
+ array_to_set[i] = NULL;
+ }
+ }
}
/**
* @description Calls i18n_formattable_set_string and checks whether function
* succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_set_string_p(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_set_string_p(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
i18n_formattable_type_e type;
i18n_formattable_get_type(formattable, &type);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_NONE);
assert_eq(strncmp(set_string, string_to_set, strlen(string_to_set)), 0);
assert_eq(type, I18N_FORMATTABLE_TYPE_STRING);
* @description Calls i18n_formattable_set_string passing invalid formattable
* and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_set_string_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_set_string_n(void)
+{
i18n_formattable_h formattable = NULL; // Invalid parameter
const char *string_to_set = "Test string";
* @description Calls i18n_formattable_set_long and checks whether function
* succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_set_long_p(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_set_long_p(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
i18n_formattable_type_e type;
i18n_formattable_get_type(formattable, &type);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_NONE);
assert_eq(set_long, long_to_set);
assert_eq(type, I18N_FORMATTABLE_TYPE_LONG);
* @description Calls i18n_formattable_set_long passing invalid formattable and
* checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_set_long_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_set_long_n(void)
+{
i18n_formattable_h formattable = NULL; // Invalid parameter
int32_t long_to_set = 0;
* @description Calls i18n_formattable_set_int64 and checks whether function
* succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_set_int64_p(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_set_int64_p(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
i18n_formattable_type_e type;
i18n_formattable_get_type(formattable, &type);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_NONE);
assert_eq(set_long_long, long_long_to_set);
assert_eq(type, I18N_FORMATTABLE_TYPE_INT64);
* @description Calls i18n_formattable_set_int64 passing invalid formattable and
* checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_set_int64_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_set_int64_n(void)
+{
i18n_formattable_h formattable = NULL; // Invalid parameter
int64_t long_long_to_set = 0;
* @description Calls i18n_formattable_set_double and checks whether function
* succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_set_double_p(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_set_double_p(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
i18n_formattable_type_e type;
i18n_formattable_get_type(formattable, &type);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_NONE);
assert_eq(set_double, double_to_set);
assert_eq(type, I18N_FORMATTABLE_TYPE_DOUBLE);
* @description Calls i18n_formattable_set_double passing invalid formattable and
* checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_set_double_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_set_double_n(void)
+{
i18n_formattable_h formattable = NULL; // Invalid parameter
double double_to_set = 0.0;
* @since_tizen 3.0
* @description Calls i18n_formattable_set_date and checks whether function succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_set_date_p(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_set_date_p(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
i18n_formattable_type_e type;
i18n_formattable_get_type(formattable, &type);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_NONE);
assert_eq(set_date, date_to_set);
assert_eq(type, I18N_FORMATTABLE_TYPE_DATE);
* @description Calls i18n_formattable_set_date passing invalid formattable and
* checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_set_date_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_set_date_n(void)
+{
i18n_formattable_h formattable = NULL; // Invalid parameter
i18n_udate date_to_set = 0.0;
* @description Calls i18n_formattable_set_array and checks whether function
* succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_set_array_p(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_set_array_p(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
- i18n_formattable_h array_element1 = NULL;
+ int i;
+ for (i = 0; i < count; ++i) {
+ double value = i;
+ ret = i18n_formattable_create_with_double(value, &array_to_set[i]);
- ret = i18n_formattable_create_default(&array_element1);
+ assert_neq(array_to_set[i], NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
+ }
- // TODO In case of error, the formattable handle won't be released here.
- assert_neq(array_element1, NULL);
+ ret = i18n_formattable_set_array(formattable, array_to_set, count);
assert_eq(ret, I18N_ERROR_NONE);
- i18n_formattable_h array_element2 = NULL;
-
- ret = i18n_formattable_create_default(&array_element2);
-
- assert_neq(array_element2, NULL);
+ i18n_formattable_type_e type;
+ ret = i18n_formattable_get_type(formattable, &type);
assert_eq(ret, I18N_ERROR_NONE);
+ assert_eq(type, I18N_FORMATTABLE_TYPE_ARRAY);
- i18n_formattable_h array_element3 = NULL;
-
- ret = i18n_formattable_create_default(&array_element3);
-
- assert_neq(array_element3, NULL);
+ i18n_formattable_h *set_array;
+ int32_t set_count = 0;
+ ret = i18n_formattable_get_array(formattable, &set_array, &set_count);
assert_eq(ret, I18N_ERROR_NONE);
- i18n_formattable_h array_to_set[] = {array_element1, array_element2, array_element3};
-
- int32_t count = 3;
-
- ret = i18n_formattable_set_array(formattable, array_to_set, count);
+ if (set_count != count) {
+ free(set_array);
+ assert_eq(set_count, count);
+ }
+ int j;
+ for (i = 0; i < set_count; ++i) {
+ bool equal = false;
+ ret = i18n_formattable_equal(array_to_set[i], set_array[i], &equal);
- i18n_formattable_h *set_array;
- int32_t set_count = 0;
- i18n_formattable_get_array(formattable, &set_array, &set_count);
+ if (ret != I18N_ERROR_NONE || !equal) {
+ free(set_array);
- i18n_formattable_type_e type;
- i18n_formattable_get_type(formattable, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+ assert_eq(equal, true);
+ }
+ }
- i18n_formattable_destroy(formattable);
-
- assert_eq(ret, I18N_ERROR_NONE);
- assert_eq(set_count, count);
- assert_eq(type, I18N_FORMATTABLE_TYPE_ARRAY);
+ free(set_array);
return 0;
}
* @description Calls i18n_formattable_set_array passing invalid formattable and
* checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_set_array_n(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL; // Invalid parameter
-
- i18n_formattable_h array_element1 = NULL;
-
- ret = i18n_formattable_create_default(&array_element1);
-
- assert_neq(array_element1, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- i18n_formattable_h array_element2 = NULL;
-
- ret = i18n_formattable_create_default(&array_element2);
-
- assert_neq(array_element2, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- i18n_formattable_h array_element3 = NULL;
-
- ret = i18n_formattable_create_default(&array_element3);
-
- assert_neq(array_element3, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- i18n_formattable_h array[] = {array_element1, array_element2, array_element3};
+int utc_capi_base_utils_i18n_formattable_set_array_n(void)
+{
+ int i;
+ for (i = 0; i < count; ++i) {
+ ret = i18n_formattable_create_default(&array_to_set[i]);
- int32_t count = 3;
+ assert_neq(array_to_set[i], NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
+ }
- ret = i18n_formattable_set_array(formattable, array, count);
+ ret = i18n_formattable_set_array(NULL, array_to_set, count);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
* @description Calls i18n_formattable_set_array passing invalid array and checks
* for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_set_array_n2(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_set_array_n2(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
- int32_t count = 0;
-
ret = i18n_formattable_set_array(formattable, NULL, count);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
return 0;
* @description Calls i18n_formattable_set_array passing invalid count and checks
* for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_set_array_n3(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_set_array_n3(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
- i18n_formattable_h array_element1 = NULL;
-
- ret = i18n_formattable_create_default(&array_element1);
-
- assert_neq(array_element1, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- i18n_formattable_h array_element2 = NULL;
-
- ret = i18n_formattable_create_default(&array_element2);
-
- assert_neq(array_element2, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- i18n_formattable_h array_element3 = NULL;
-
- ret = i18n_formattable_create_default(&array_element3);
-
- assert_neq(array_element3, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- i18n_formattable_h array[] = {array_element1, array_element2, array_element3};
-
- int32_t count = -1; // Invalid parameter
+ int i;
+ for (i = 0; i < count; ++i) {
+ ret = i18n_formattable_create_default(&array_to_set[i]);
- ret = i18n_formattable_set_array(formattable, array, count);
+ assert_neq(array_to_set[i], NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
+ }
- i18n_formattable_destroy(formattable);
+ ret = i18n_formattable_set_array(formattable, array_to_set, -1);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
* @description Calls i18n_formattable_element_at and checks whether function
* succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_element_at_p(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
- assert_neq(formattable, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- i18n_formattable_h array_element1 = NULL;
-
- ret = i18n_formattable_create_default(&array_element1);
-
- assert_neq(array_element1, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- i18n_formattable_h array_element2 = NULL;
-
- ret = i18n_formattable_create_default(&array_element2);
-
- assert_neq(array_element2, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- i18n_formattable_h array_element3 = NULL;
+int utc_capi_base_utils_i18n_formattable_element_at_p(void)
+{
+ int i;
+ for (i = 0; i < count; ++i) {
+ double value = i;
+ ret = i18n_formattable_create_with_double(value, &array_to_set[i]);
- ret = i18n_formattable_create_default(&array_element3);
+ assert_neq(array_to_set[i], NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
+ }
- assert_neq(array_element3, NULL);
+ ret = i18n_formattable_destroy(formattable);
assert_eq(ret, I18N_ERROR_NONE);
+ formattable = NULL;
- const i18n_formattable_h array[] = {array_element1, array_element2, array_element3};
-
- int32_t count = 3;
-
- ret = i18n_formattable_set_array(formattable, array, count);
-
+ ret = i18n_formattable_create_with_formattable_array(array_to_set, count, &formattable);
+ assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
int32_t index = 1;
-
- i18n_formattable_h element = NULL;
-
+ i18n_formattable_h element;
ret = i18n_formattable_element_at(formattable, index, &element);
+ assert_neq(element, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
- i18n_formattable_destroy(formattable);
-
+ bool equal = false;
+ ret = i18n_formattable_equal(array_to_set[index], element, &equal);
assert_eq(ret, I18N_ERROR_NONE);
- assert_neq(element, NULL);
+ assert_eq(equal, true);
return 0;
}
* @description Calls i18n_formattable_element_at passing invalid formattable and
* checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_element_at_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_element_at_n(void)
+{
i18n_formattable_h formattable = NULL; // Invalid parameter
int32_t index = 0;
* @description Calls i18n_formattable_element_at passing invalid index and checks
* for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_element_at_n2(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_element_at_n2(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
ret = i18n_formattable_element_at(formattable, index, &element);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_INDEX_OUTOFBOUNDS);
return 0;
* @description Calls i18n_formattable_element_at passing invalid element and checks
* for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_element_at_n3(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_element_at_n3(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
ret = i18n_formattable_element_at(formattable, index, NULL);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
return 0;
* @since_tizen 3.0
* @description Calls i18n_formattable_equal and checks whether function succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_equal_p(void) {
+int utc_capi_base_utils_i18n_formattable_equal_p(void)
+{
+ assert_neq(formattable, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
- int ret;
+ i18n_formattable_h other = NULL;
+ double value = 7;
+ ret = i18n_formattable_create_with_double(value, &other);
+ assert_neq(other, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
- i18n_formattable_h formattable = NULL;
+ bool equal;
+ ret = i18n_formattable_equal(formattable, other, &equal);
- ret = i18n_formattable_create_default(&formattable);
+ i18n_formattable_destroy(other);
- assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ assert_eq(equal, false);
- i18n_formattable_h other = NULL;
+ return 0;
+}
- ret = i18n_formattable_create_default(&other);
+/**
+ * @testcase utc_capi_base_utils_i18n_formattable_equal_p2
+ * @since_tizen 3.0
+ * @description Calls i18n_formattable_equal and checks whether function succeeded.
+ */
+int utc_capi_base_utils_i18n_formattable_equal_p2(void)
+{
+ assert_neq(formattable, NULL);
+ i18n_formattable_h other = NULL;
+ ret = i18n_formattable_clone(formattable, &other);
assert_neq(other, NULL);
assert_eq(ret, I18N_ERROR_NONE);
bool equal;
-
ret = i18n_formattable_equal(formattable, other, &equal);
- i18n_formattable_destroy(formattable);
i18n_formattable_destroy(other);
assert_eq(ret, I18N_ERROR_NONE);
- assert_eq(equal, false);
+ assert_eq(equal, true);
return 0;
}
* @description Calls i18n_formattable_equal passing invalid formattable and checks
* for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_equal_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_equal_n(void)
+{
i18n_formattable_h formattable = NULL; // Invalid parameter
i18n_formattable_h other = NULL;
assert_eq(ret, I18N_ERROR_NONE);
bool equal;
-
ret = i18n_formattable_equal(formattable, other, &equal);
i18n_formattable_destroy(other);
* @description Calls i18n_formattable_equal passing invalid other and checks for an
* invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_equal_n2(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_equal_n2(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
ret = i18n_formattable_equal(formattable, other, &equal);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
return 0;
* @description Calls i18n_formattable_equal passing invalid equal argument and
* checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_equal_n3(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_equal_n3(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
ret = i18n_formattable_equal(formattable, other, NULL);
- i18n_formattable_destroy(formattable);
i18n_formattable_destroy(other);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
* @description Calls i18n_formattable_not_equal and checks whether function
* succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_not_equal_p(void) {
-
- int ret;
+int utc_capi_base_utils_i18n_formattable_not_equal_p(void)
+{
+ double value = 7;
+ i18n_formattable_h other = NULL;
+ ret = i18n_formattable_create_with_double(value, &other);
+ assert_neq(other, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
- i18n_formattable_h formattable = NULL;
+ bool not_equal = false;
+ ret = i18n_formattable_not_equal(formattable, other, ¬_equal);
- ret = i18n_formattable_create_default(&formattable);
+ i18n_formattable_destroy(other);
- assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ assert_eq(not_equal, true);
- i18n_formattable_h other = NULL;
-
- ret = i18n_formattable_create_default(&other);
+ return 0;
+}
- assert_neq(other, NULL);
+/**
+ * @testcase utc_capi_base_utils_i18n_formattable_not_equal_p2
+ * @since_tizen 3.0
+ * @description Calls i18n_formattable_not_equal and checks whether function
+ * succeeded.
+ */
+int utc_capi_base_utils_i18n_formattable_not_equal_p2(void)
+{
+ assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
bool not_equal;
-
- ret = i18n_formattable_not_equal(formattable, other, ¬_equal);
-
- i18n_formattable_destroy(formattable);
- i18n_formattable_destroy(other);
+ ret = i18n_formattable_not_equal(formattable, formattable, ¬_equal);
assert_eq(ret, I18N_ERROR_NONE);
- assert_eq(not_equal, true);
+ assert_eq(not_equal, false);
return 0;
}
* @description Calls i18n_formattable_not_equal passing invalid formattable and
* checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_not_equal_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_not_equal_n(void)
+{
i18n_formattable_h formattable = NULL; // Invalid parameter
i18n_formattable_h other = NULL;
-
ret = i18n_formattable_create_default(&other);
-
assert_neq(other, NULL);
assert_eq(ret, I18N_ERROR_NONE);
bool not_equal;
-
ret = i18n_formattable_not_equal(formattable, other, ¬_equal);
i18n_formattable_destroy(other);
* @description Calls i18n_formattable_not_equal passing invalid other and checks
* for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_not_equal_n2(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_not_equal_n2(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
ret = i18n_formattable_not_equal(formattable, other, ¬_equal);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
return 0;
* @description Calls i18n_formattable_not_equal passing invalid not_equal
* argument and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_not_equal_n3(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_not_equal_n3(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
i18n_formattable_h other = NULL;
-
ret = i18n_formattable_create_default(&other);
-
assert_neq(other, NULL);
assert_eq(ret, I18N_ERROR_NONE);
ret = i18n_formattable_not_equal(formattable, other, NULL);
- i18n_formattable_destroy(formattable);
i18n_formattable_destroy(other);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
* @description Calls i18n_formattable_is_numeric and checks whether function
* succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_is_numeric_p(void) {
+int utc_capi_base_utils_i18n_formattable_is_numeric_p(void)
+{
+ assert_neq(formattable, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
- int ret;
+ bool is_numeric;
+ ret = i18n_formattable_is_numeric(formattable, &is_numeric);
- i18n_formattable_h formattable = NULL;
+ assert_eq(ret, I18N_ERROR_NONE);
+ assert_neq(is_numeric, false);
- ret = i18n_formattable_create_default(&formattable);
+ return 0;
+}
+/**
+ * @testcase utc_capi_base_utils_i18n_formattable_is_numeric_p2
+ * @since_tizen 3.0
+ * @description Calls i18n_formattable_is_numeric and checks whether function
+ * succeeded.
+ */
+int utc_capi_base_utils_i18n_formattable_is_numeric_p2(void)
+{
+ i18n_formattable_destroy(formattable);
+
+ double value = 7;
+ ret = i18n_formattable_create_with_double(value, &formattable);
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
bool is_numeric;
-
ret = i18n_formattable_is_numeric(formattable, &is_numeric);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_NONE);
- assert_neq(is_numeric, false);
+ assert_eq(is_numeric, true);
return 0;
}
* @description Calls i18n_formattable_is_numeric passing invalid formattable and
* checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_is_numeric_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_is_numeric_n(void)
+{
i18n_formattable_h formattable = NULL; // Invalid parameter
bool is_numeric;
* @description Calls i18n_formattable_is_numeric passing invalid is_numeric
* and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_is_numeric_n2(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_is_numeric_n2(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
ret = i18n_formattable_is_numeric(formattable, NULL);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
return 0;
* @since_tizen 3.0
* @description Calls i18n_formattable_get_type and checks whether function succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_get_type_p(void) {
-
- int ret;
+int utc_capi_base_utils_i18n_formattable_get_type_p(void)
+{
+ i18n_formattable_destroy(formattable);
const char *test_string = "Test string";
-
- i18n_formattable_h formattable = NULL;
-
ret = i18n_formattable_create_with_char_string(test_string, &formattable);
-
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
ret = i18n_formattable_get_type(formattable, &type);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_NONE);
assert_eq(type, I18N_FORMATTABLE_TYPE_STRING);
* @description Calls i18n_formattable_get_type passing invalid formattable and
* checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_get_type_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_get_type_n(void)
+{
i18n_formattable_h formattable = NULL; // Invalid parameter
i18n_formattable_type_e type;
* @description Calls i18n_formattable_get_type passing invalid type and checks for
* an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_get_type_n2(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_get_type_n2(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
ret = i18n_formattable_get_type(formattable, NULL);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
return 0;
* @description Calls i18n_formattable_get_string and checks whether function
* succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_get_string_p(void) {
-
- int ret;
+int utc_capi_base_utils_i18n_formattable_get_string_p(void)
+{
+ assert_neq(formattable, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
const char *test_string = "Test string";
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_with_char_string(test_string, &formattable);
-
- assert_neq(formattable, NULL);
+ ret = i18n_formattable_set_string(formattable, test_string);
assert_eq(ret, I18N_ERROR_NONE);
char *value = NULL;
ret = i18n_formattable_get_string(formattable, &value);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_NONE);
- assert_eq(strncmp(value, test_string, strlen(test_string)), 0);
+ assert(!strcmp(value, test_string));
return 0;
}
* @description Calls i18n_formattable_get_string passing invalid formattable and
* checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_get_string_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_get_string_n(void)
+{
i18n_formattable_h formattable = NULL; // Invalid parameter
char *value = NULL;
* @description Calls i18n_formattable_get_string passing invalid value and checks
* for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_get_string_n2(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_get_string_n2(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ const char *test_string = "Test string";
+ ret = i18n_formattable_set_string(formattable, test_string);
+ assert_eq(ret, I18N_ERROR_NONE);
+
char **value = NULL; // Invalid parameter
ret = i18n_formattable_get_string(formattable, value);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
return 0;
* @since_tizen 3.0
* @description Calls i18n_formattable_get_long and checks whether function succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_get_long_p(void) {
-
- int ret;
+int utc_capi_base_utils_i18n_formattable_get_long_p(void)
+{
+ assert_neq(formattable, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
int32_t l = 13;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_with_long(l, &formattable);
-
- assert_neq(formattable, NULL);
+ ret = i18n_formattable_set_long(formattable, l);
assert_eq(ret, I18N_ERROR_NONE);
int32_t value;
ret = i18n_formattable_get_long(formattable, &value);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_NONE);
assert_eq(value, l);
* @description Calls i18n_formattable_get_long passing invalid formattable and
* checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_get_long_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_get_long_n(void)
+{
i18n_formattable_h formattable = NULL; // Invalid parameter
int32_t value;
* @description Calls i18n_formattable_get_long passing invalid value and checks for
* an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_get_long_n2(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_get_long_n2(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
- ret = i18n_formattable_get_long(formattable, NULL);
+ int32_t l = 13;
+ ret = i18n_formattable_set_long(formattable, l);
+ assert_eq(ret, I18N_ERROR_NONE);
- i18n_formattable_destroy(formattable);
+ ret = i18n_formattable_get_long(formattable, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
* @description Calls i18n_formattable_get_int64 and checks whether function
* succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_get_int64_p(void) {
-
- int ret;
+int utc_capi_base_utils_i18n_formattable_get_int64_p(void)
+{
+ assert_neq(formattable, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
int64_t ll = 13;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_with_int64(ll, &formattable);
-
- assert_neq(formattable, NULL);
+ ret = i18n_formattable_set_int64(formattable, ll);
assert_eq(ret, I18N_ERROR_NONE);
int64_t value = NULL;
ret = i18n_formattable_get_int64(formattable, &value);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_NONE);
assert_eq(value, ll);
* @description Calls i18n_formattable_get_int64 passing invalid formattable and
* checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_get_int64_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_get_int64_n(void)
+{
i18n_formattable_h formattable = NULL; // Invalid parameter
int64_t value;
* @description Calls i18n_formattable_get_int64 passing invalid value and checks
* for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_get_int64_n2(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_get_int64_n2(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
- ret = i18n_formattable_get_int64(formattable, NULL);
+ int64_t ll = 13;
+ ret = i18n_formattable_set_int64(formattable, ll);
+ assert_eq(ret, I18N_ERROR_NONE);
- i18n_formattable_destroy(formattable);
+ ret = i18n_formattable_get_int64(formattable, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
* @description Calls i18n_formattable_get_double and checks whether function
* succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_get_double_p(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_get_double_p(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ double value_to_set = 7;
+ ret = i18n_formattable_set_double(formattable, value_to_set);
+ assert_eq(ret, I18N_ERROR_NONE);
+
double value;
ret = i18n_formattable_get_double(formattable, &value);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_NONE);
+ assert_eq(value, value_to_set);
return 0;
}
* @description Calls i18n_formattable_get_double passing invalid formattable and
* checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_get_double_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_get_double_n(void)
+{
i18n_formattable_h formattable = NULL; // Invalid parameter
double value;
* @description Calls i18n_formattable_get_double passing invalid pointer as a
* second parameter and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_get_double_n2(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_get_double_n2(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
- ret = i18n_formattable_get_double(formattable, NULL);
+ double value_to_set = 7;
+ ret = i18n_formattable_set_double(formattable, value_to_set);
+ assert_eq(ret, I18N_ERROR_NONE);
- i18n_formattable_destroy(formattable);
+ ret = i18n_formattable_get_double(formattable, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
* @since_tizen 3.0
* @description Calls i18n_formattable_get_date and checks whether function succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_get_date_p(void) {
-
- int ret;
+int utc_capi_base_utils_i18n_formattable_get_date_p(void)
+{
+ assert_neq(formattable, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
i18n_udate d = 13.0;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_with_udate(d, &formattable);
-
- assert_neq(formattable, NULL);
+ ret = i18n_formattable_set_date(formattable, d);
assert_eq(ret, I18N_ERROR_NONE);
i18n_udate date;
ret = i18n_formattable_get_date(formattable, &date);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_NONE);
assert_eq(date, d);
* @description Calls i18n_formattable_get_date passing invalid formattable and
* checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_get_date_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_get_date_n(void)
+{
i18n_formattable_h formattable = NULL; // Invalid parameter
i18n_udate date;
* @description Calls i18n_formattable_get_date passing invalid date and
* checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_get_date_n2(void) {
-
- int ret;
+int utc_capi_base_utils_i18n_formattable_get_date_n2(void)
+{
+ assert_neq(formattable, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
i18n_udate d = 13.0;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_with_udate(d, &formattable);
-
- assert_neq(formattable, NULL);
+ ret = i18n_formattable_set_date(formattable, d);
assert_eq(ret, I18N_ERROR_NONE);
ret = i18n_formattable_get_date(formattable, NULL);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
return 0;
* @description Calls i18n_formattable_get_array and checks whether function
* succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_get_array_p(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_get_array_p(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
- i18n_formattable_h array_element1 = NULL;
-
- ret = i18n_formattable_create_default(&array_element1);
-
- assert_neq(array_element1, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- i18n_formattable_h array_element2 = NULL;
-
- ret = i18n_formattable_create_default(&array_element2);
-
- assert_neq(array_element2, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- i18n_formattable_h array_element3 = NULL;
-
- ret = i18n_formattable_create_default(&array_element3);
-
- assert_neq(array_element3, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- i18n_formattable_h array[] = {array_element1, array_element2, array_element3};
-
- int32_t count = 3;
+ int i;
+ for (i = 0; i < count; ++i) {
+ double value = i;
+ ret = i18n_formattable_create_with_double(value, &array_to_set[i]);
- ret = i18n_formattable_set_array(formattable, array, count);
+ assert_neq(array_to_set[i], NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
+ }
+ ret = i18n_formattable_set_array(formattable, array_to_set, count);
assert_eq(ret, I18N_ERROR_NONE);
i18n_formattable_h *ret_array;
-
int32_t ret_count = 0;
-
ret = i18n_formattable_get_array(formattable, &ret_array, &ret_count);
-
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(ret_array, NULL);
- assert_eq(ret_count, count);
- int i;
- for(i=0;i<ret_count;i++)
- {
- assert_neq(ret_array[i], NULL);
+ if (ret_count != count) {
+ free(ret_array);
+ assert_eq(ret_count, count);
}
- i18n_formattable_destroy(formattable);
+ int j;
+ for (i = 0; i < ret_count; ++i) {
+ bool equal = false;
+ ret = i18n_formattable_equal(array_to_set[i], ret_array[i], &equal);
- assert_eq(ret, I18N_ERROR_NONE);
+ if (ret != I18N_ERROR_NONE || !equal) {
+ free(ret_array);
+
+ assert_eq(ret, I18N_ERROR_NONE);
+ assert_eq(equal, true);
+ }
+ }
+
+ free(ret_array);
return 0;
}
* @description Calls i18n_formattable_get_array passing invalid formattable and
* checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_get_array_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_get_array_n(void)
+{
i18n_formattable_h formattable = NULL; // Invalid parameter
- i18n_formattable_h *array = NULL;
+ i18n_formattable_h *ret_array = NULL;
- int32_t count = 0;
+ int32_t ret_count = 0;
- ret = i18n_formattable_get_array(formattable, &array, &count);
+ ret = i18n_formattable_get_array(formattable, &ret_array, &ret_count);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
* @description Calls i18n_formattable_get_array passing invalid array and checks
* for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_get_array_n2(void) {
-
- int ret;
+int utc_capi_base_utils_i18n_formattable_get_array_n2(void)
+{
+ assert_neq(formattable, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
- i18n_formattable_h formattable = NULL;
+ int i;
+ for (i = 0; i < count; ++i) {
+ double value = i;
+ ret = i18n_formattable_create_with_double(value, &array_to_set[i]);
- ret = i18n_formattable_create_default(&formattable);
+ assert_neq(array_to_set[i], NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
+ }
- assert_neq(formattable, NULL);
+ ret = i18n_formattable_set_array(formattable, array_to_set, count);
assert_eq(ret, I18N_ERROR_NONE);
- int32_t count = 0;
-
- ret = i18n_formattable_get_array(formattable, NULL, &count);
+ int32_t ret_count = 0;
- i18n_formattable_destroy(formattable);
+ ret = i18n_formattable_get_array(formattable, NULL, &ret_count);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
* @description Calls i18n_formattable_get_array passing invalid count and
* checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_get_array_n3(void) {
-
- int ret;
+int utc_capi_base_utils_i18n_formattable_get_array_n3(void)
+{
+ assert_neq(formattable, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
- i18n_formattable_h formattable = NULL;
+ int i;
+ for (i = 0; i < count; ++i) {
+ double value = i;
+ ret = i18n_formattable_create_with_double(value, &array_to_set[i]);
- ret = i18n_formattable_create_default(&formattable);
+ assert_neq(array_to_set[i], NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
+ }
- assert_neq(formattable, NULL);
+ ret = i18n_formattable_set_array(formattable, array_to_set, count);
assert_eq(ret, I18N_ERROR_NONE);
- i18n_formattable_h *array = NULL;
+ i18n_formattable_h *ret_array = NULL;
- ret = i18n_formattable_get_array(formattable, &array, NULL);
-
- i18n_formattable_destroy(formattable);
+ ret = i18n_formattable_get_array(formattable, &ret_array, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
* @since_tizen 3.0
* @description Calls i18n_formattable_clone and checks whether function succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_clone_p(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_clone_p(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
ret = i18n_formattable_clone(formattable, &clone);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(clone, NULL);
+ bool equal = false;
+ ret = i18n_formattable_equal(formattable, clone, &equal);
+
+ i18n_formattable_destroy(clone);
+
+ assert_eq(ret, I18N_ERROR_NONE);
+ assert_eq(equal, true);
+
return 0;
}
* @description Calls i18n_formattable_clone passing invalid formattable and checks
* for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_clone_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_clone_n(void)
+{
i18n_formattable_h formattable = NULL; // Invalid parameter
i18n_formattable_h clone = NULL;
* @description Calls i18n_formattable_clone passing invalid clone and checks for an
* invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_clone_n2(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_clone_n2(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
ret = i18n_formattable_clone(formattable, NULL);
- i18n_formattable_destroy(formattable);
-
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
return 0;
* @since_tizen 3.0
* @description Calls i18n_formattable_destroy and checks whether function succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_destroy_p(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_default(&formattable);
-
+int utc_capi_base_utils_i18n_formattable_destroy_p(void)
+{
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
ret = i18n_formattable_destroy(formattable);
assert_eq(ret, I18N_ERROR_NONE);
+ formattable = NULL;
return 0;
}
* @description Calls i18n_formattable_destroy passing invalid formattable and
* checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_destroy_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_destroy_n(void)
+{
i18n_formattable_h formattable = NULL; // Invalid parameter
ret = i18n_formattable_destroy(formattable);
* @description Calls i18n_formattable_create_with_formattable_array and checks
* whether function succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_create_with_formattable_array_p(void) {
-
- int ret;
-
- i18n_formattable_h array_element1 = NULL;
-
- ret = i18n_formattable_create_default(&array_element1);
-
- assert_neq(array_element1, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- i18n_formattable_h array_element2 = NULL;
-
- ret = i18n_formattable_create_default(&array_element2);
-
- assert_neq(array_element2, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- i18n_formattable_h array_element3 = NULL;
-
- ret = i18n_formattable_create_default(&array_element3);
-
- assert_neq(array_element3, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- const i18n_formattable_h array_to_copy[] = {array_element1, array_element2, array_element3};
-
- int32_t count = 3;
+int utc_capi_base_utils_i18n_formattable_create_with_formattable_array_p(void)
+{
+ i18n_formattable_destroy(formattable);
- i18n_formattable_h formattable = NULL;
+ int32_t i;
+ for (i = 0; i < count; ++i) {
+ double value = i;
+ ret = i18n_formattable_create_with_double(value, &array_to_set[i]);
- ret = i18n_formattable_create_with_formattable_array(array_to_copy, count, &formattable);
+ assert_neq(array_to_set[i], NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
+ }
+ ret = i18n_formattable_create_with_formattable_array(array_to_set, count, &formattable);
assert_neq(formattable, NULL);
assert_eq(ret, I18N_ERROR_NONE);
i18n_formattable_h *ret_array;
-
int32_t ret_count = 0;
+ ret = i18n_formattable_get_array(formattable, &ret_array, &ret_count);
+ assert_eq(ret, I18N_ERROR_NONE);
- i18n_formattable_get_array(formattable, &ret_array, &ret_count);
+ if (ret_count != count) {
+ free(ret_array);
+ assert_eq(ret_count, count);
+ }
- assert_neq(ret_array, NULL);
- assert_eq(ret_count, count);
+ int j;
+ for (i = 0; i < ret_count; ++i) {
+ bool equal = false;
+ ret = i18n_formattable_equal(array_to_set[i], ret_array[i], &equal);
- int i;
- for(i=0;i<ret_count;i++)
- {
- assert_neq(ret_array[i], NULL);
+ if (ret != I18N_ERROR_NONE || !equal) {
+ free(ret_array);
+
+ assert_eq(ret, I18N_ERROR_NONE);
+ assert_eq(equal, true);
+ }
}
- i18n_formattable_destroy(formattable);
+ free(ret_array);
return 0;
}
* @description Calls i18n_formattable_create_with_formattable_array passing invalid
* array_to_copy and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_create_with_formattable_array_n(void) {
-
- int ret;
-
- int32_t count = 1;
-
+int utc_capi_base_utils_i18n_formattable_create_with_formattable_array_n(void)
+{
i18n_formattable_h formattable = NULL;
ret = i18n_formattable_create_with_formattable_array(NULL, count, &formattable);
* @description Calls i18n_formattable_create_with_formattable_array passing invalid
* count and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_create_with_formattable_array_n2(void) {
-
- int ret;
-
- i18n_formattable_h array_element1 = NULL;
-
- ret = i18n_formattable_create_default(&array_element1);
-
- assert_neq(array_element1, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- i18n_formattable_h array_element2 = NULL;
-
- ret = i18n_formattable_create_default(&array_element2);
-
- assert_neq(array_element2, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- i18n_formattable_h array_element3 = NULL;
-
- ret = i18n_formattable_create_default(&array_element3);
-
- assert_neq(array_element3, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
+int utc_capi_base_utils_i18n_formattable_create_with_formattable_array_n2(void)
+{
+ int32_t i;
+ for (i = 0; i < count; ++i) {
+ array_to_set[i] = NULL;
+ ret = i18n_formattable_create_default(&array_to_set[i]);
- const i18n_formattable_h array_to_copy[] = {array_element1, array_element2, array_element3};
+ assert_neq(array_to_set[i], NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
+ }
- int32_t count = -1; // Invalid parameter
+ int count_to_set = -1; // Invalid parameter
i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_with_formattable_array(array_to_copy, count, &formattable);
+ ret = i18n_formattable_create_with_formattable_array(array_to_set, count_to_set, &formattable);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
* @description Calls i18n_formattable_create_with_formattable_array passing invalid
* formattable and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_create_with_formattable_array_n3(void) {
-
- int ret;
-
- i18n_formattable_h array_element1 = NULL;
-
- ret = i18n_formattable_create_default(&array_element1);
-
- assert_neq(array_element1, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- i18n_formattable_h array_element2 = NULL;
-
- ret = i18n_formattable_create_default(&array_element2);
-
- assert_neq(array_element2, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- i18n_formattable_h array_element3 = NULL;
-
- ret = i18n_formattable_create_default(&array_element3);
-
- assert_neq(array_element3, NULL);
- assert_eq(ret, I18N_ERROR_NONE);
-
- const i18n_formattable_h array_to_copy[] = {array_element1, array_element2, array_element3};
+int utc_capi_base_utils_i18n_formattable_create_with_formattable_array_n3(void)
+{
+ int32_t i;
+ for (i = 0; i < count; ++i) {
+ array_to_set[i] = NULL;
+ ret = i18n_formattable_create_default(&array_to_set[i]);
- int32_t count = 3;
+ assert_neq(array_to_set[i], NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
+ }
- ret = i18n_formattable_create_with_formattable_array(array_to_copy, count, NULL);
+ ret = i18n_formattable_create_with_formattable_array(array_to_set, count, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
* @description Calls i18n_formattable_create_with_char_string and checks whether
* function succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_create_with_char_string_p(void) {
-
- int ret;
+int utc_capi_base_utils_i18n_formattable_create_with_char_string_p(void)
+{
+ i18n_formattable_destroy(formattable);
const char *string_to_set = "Test string";
- i18n_formattable_h formattable = NULL;
-
ret = i18n_formattable_create_with_char_string(string_to_set, &formattable);
assert_neq(formattable, NULL);
i18n_formattable_type_e type;
i18n_formattable_get_type(formattable, &type);
- i18n_formattable_destroy(formattable);
-
assert_eq(strncmp(set_string, string_to_set, strlen(string_to_set)), 0);
assert_eq(type, I18N_FORMATTABLE_TYPE_STRING);
* @description Calls i18n_formattable_create_with_char_string passing invalid
* formattable and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_create_with_char_string_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_create_with_char_string_n(void)
+{
const char *str_to_set = "Test string";
ret = i18n_formattable_create_with_char_string(str_to_set, NULL);
* @description Calls i18n_formattable_create_with_int64 and checks whether function
* succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_create_with_int64_p(void) {
-
- int ret;
+int utc_capi_base_utils_i18n_formattable_create_with_int64_p(void)
+{
+ i18n_formattable_destroy(formattable);
int64_t long_long_to_set = 13;
- i18n_formattable_h formattable = NULL;
-
ret = i18n_formattable_create_with_int64(long_long_to_set, &formattable);
assert_neq(formattable, NULL);
i18n_formattable_type_e type;
i18n_formattable_get_type(formattable, &type);
- i18n_formattable_destroy(formattable);
-
assert_eq(set_long_long, long_long_to_set);
assert_eq(type, I18N_FORMATTABLE_TYPE_INT64);
* @description Calls i18n_formattable_create_with_int64 passing invalid formattable
* and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_create_with_int64_n(void) {
-
- int ret;
+int utc_capi_base_utils_i18n_formattable_create_with_int64_n(void)
+{
int64_t long_long_to_set = 0;
* @description Calls i18n_formattable_create_with_long and checks whether function
* succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_create_with_long_p(void) {
-
- int ret;
+int utc_capi_base_utils_i18n_formattable_create_with_long_p(void)
+{
+ i18n_formattable_destroy(formattable);
int32_t long_to_set = 13;
- i18n_formattable_h formattable = NULL;
-
ret = i18n_formattable_create_with_long(long_to_set, &formattable);
assert_neq(formattable, NULL);
i18n_formattable_type_e type;
i18n_formattable_get_type(formattable, &type);
- i18n_formattable_destroy(formattable);
-
assert_eq(set_long, long_to_set);
assert_eq(type, I18N_FORMATTABLE_TYPE_LONG);
* @description Calls i18n_formattable_create_with_long passing invalid formattable
* and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_create_with_long_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_create_with_long_n(void)
+{
int32_t long_to_set = 0;
ret = i18n_formattable_create_with_long(long_to_set, NULL);
* @description Calls i18n_formattable_create_with_double and checks whether
* function succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_create_with_double_p(void) {
-
- int ret;
+int utc_capi_base_utils_i18n_formattable_create_with_double_p(void)
+{
+ i18n_formattable_destroy(formattable);
double double_to_set = 13.0;
- i18n_formattable_h formattable = NULL;
-
ret = i18n_formattable_create_with_double(double_to_set, &formattable);
assert_neq(formattable, NULL);
i18n_formattable_type_e type;
i18n_formattable_get_type(formattable, &type);
- i18n_formattable_destroy(formattable);
-
assert_eq(set_double, double_to_set);
assert_eq(type, I18N_FORMATTABLE_TYPE_DOUBLE);
* @description Calls i18n_formattable_create_with_double passing invalid
* formattable and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_create_with_double_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_create_with_double_n(void)
+{
double double_to_set = 0.0;
ret = i18n_formattable_create_with_double(double_to_set, NULL);
* @description Calls i18n_formattable_create_with_udate and checks whether function
* succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_create_with_udate_p(void) {
-
- int ret;
+int utc_capi_base_utils_i18n_formattable_create_with_udate_p(void)
+{
+ i18n_formattable_destroy(formattable);
i18n_udate date_to_set = 13.0;
- i18n_formattable_h formattable = NULL;
-
ret = i18n_formattable_create_with_udate(date_to_set, &formattable);
assert_neq(formattable, NULL);
i18n_formattable_type_e type;
i18n_formattable_get_type(formattable, &type);
- i18n_formattable_destroy(formattable);
-
assert_eq(set_date, date_to_set);
assert_eq(type, I18N_FORMATTABLE_TYPE_DATE);
/**
* @testcase utc_capi_base_utils_i18n_formattable_create_with_udate_n
* @since_tizen 3.0
- * @description Calls i18n_formattable_create_with_udate passing invalid flag and
- * checks for an invalid parameter error code.
- */
-int utc_capi_base_utils_i18n_formattable_create_with_udate_n(void) {
-
- int ret;
-
- i18n_udate date_to_set = 0.0;
-
- i18n_formattable_h formattable = NULL;
-
- ret = i18n_formattable_create_with_udate(date_to_set, &formattable);
-
- assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
-
- return 0;
-}
-
-/**
- * @testcase utc_capi_base_utils_i18n_formattable_create_with_udate_n2
- * @since_tizen 3.0
* @description Calls i18n_formattable_create_with_udate passing invalid formattable
* and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_create_with_udate_n2(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_create_with_udate_n(void)
+{
i18n_udate date_to_set = 0.0;
ret = i18n_formattable_create_with_udate(date_to_set, NULL);
* @description Calls i18n_formattable_create_default and checks whether function
* succeeded.
*/
-int utc_capi_base_utils_i18n_formattable_create_default_p(void) {
-
- int ret;
-
- i18n_formattable_h formattable = NULL;
+int utc_capi_base_utils_i18n_formattable_create_default_p(void)
+{
+ i18n_formattable_destroy(formattable);
ret = i18n_formattable_create_default(&formattable);
* @description Calls i18n_formattable_create_default passing invalid formattable
* and checks for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_formattable_create_default_n(void) {
-
- int ret;
-
+int utc_capi_base_utils_i18n_formattable_create_default_n(void)
+{
ret = i18n_formattable_create_default(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
static i18n_measure_format_h measure_format = NULL;
static int ret = I18N_ERROR_NONE;
+static i18n_format_h format = NULL;
+static i18n_formattable_h formattable = NULL;
+static i18n_field_position_h field_position = NULL;
+static i18n_parse_position_h parse_position = NULL;
+
+static char *ref_language = NULL;
+static char *ref_country = NULL;
+
+static char *clone_language = NULL;
+static char *clone_country = NULL;
+
/**
* @function utc_capi_base_utils_measure_format_startup
* @description Called before each test
i18n_measure_format_destroy(measure_format);
measure_format = NULL;
}
+ if (format != NULL) {
+ i18n_format_destroy(format);
+ format = NULL;
+ }
+ if (formattable != NULL) {
+ i18n_formattable_destroy(formattable);
+ formattable = NULL;
+ }
+ if (parse_position != NULL) {
+ i18n_parse_position_destroy(parse_position);
+ parse_position = NULL;
+ }
+ if (field_position != NULL) {
+ i18n_field_position_destroy(field_position);
+ field_position = NULL;
+ }
+
+ if (ref_language != NULL) {
+ free(ref_language);
+ ref_language = NULL;
+ }
+
+ if (ref_country != NULL) {
+ free(ref_country);
+ ref_country = NULL;
+ }
+
+ if (clone_language != NULL) {
+ free(clone_language);
+ clone_language = NULL;
+ }
+
+ if (clone_country != NULL) {
+ free(clone_country);
+ clone_country = NULL;
+ }
}
/**
*/
int utc_capi_base_utils_i18n_measure_format_create_currency_format_p(void)
{
- i18n_measure_format_h measure_format = NULL;
+ utc_capi_base_utils_measure_format_cleanup();
+ assert_eq(measure_format, NULL);
ret = i18n_measure_format_create_currency_format(&measure_format);
assert_neq(measure_format, NULL);
assert_eq(ret, I18N_ERROR_NONE);
- i18n_measure_format_destroy(measure_format);
- measure_format = NULL;
-
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_format_create_currency_format_from_locale_p(void)
{
- i18n_measure_format_h measure_format = NULL;
+ utc_capi_base_utils_measure_format_cleanup();
const char *language = I18N_ULOCALE_KOREAN;
const char *country = "KR";
assert_neq(measure_format, NULL);
assert_eq(ret, I18N_ERROR_NONE);
- i18n_measure_format_destroy(measure_format);
- measure_format = NULL;
-
return 0;
}
{
assert_neq(measure_format, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ assert_eq(format, NULL);
- i18n_format_h clone = NULL;
+ ret = i18n_measure_format_clone(measure_format, &format);
+
+ assert_neq(format, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
- ret = i18n_measure_format_clone(measure_format, &clone);
+ i18n_ulocale_data_locale_type_e type = I18N_ULOCALE_DATA_LOCALE_TYPE_ACTUAL_LOCALE;
+ ret = i18n_format_get_locale(format, type, &clone_language, &clone_country);
+ assert_eq(ret, I18N_ERROR_NONE);
- assert_neq(clone, NULL);
- i18n_measure_format_destroy(clone);
+ ret = i18n_format_get_locale((i18n_format_h) measure_format, type, &ref_language, &ref_country);
assert_eq(ret, I18N_ERROR_NONE);
+ assert(!strcmp(clone_language, ref_language));
+ assert(!strcmp(clone_country, ref_country));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_format_create_p(void)
{
- i18n_measure_format_h measure_format = NULL;
+ utc_capi_base_utils_measure_format_cleanup();
+ assert_eq(measure_format, NULL);
const char *language = I18N_ULOCALE_KOREAN;
const char *country = "KR";
assert_neq(measure_format, NULL);
assert_eq(ret, I18N_ERROR_NONE);
- i18n_measure_format_destroy(measure_format);
-
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_format_create_p2(void)
{
- i18n_measure_format_h measure_format = NULL;
+ utc_capi_base_utils_measure_format_cleanup();
+ assert_eq(measure_format, NULL);
const char *country = "KR";
i18n_umeasure_format_width_e format_width = I18N_UMEASFMT_WIDTH_WIDE;
assert_neq(measure_format, NULL);
assert_eq(ret, I18N_ERROR_NONE);
- i18n_measure_format_destroy(measure_format);
-
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_format_create_p3(void)
{
- i18n_measure_format_h measure_format = NULL;
+ utc_capi_base_utils_measure_format_cleanup();
+ assert_eq(measure_format, NULL);
const char *language = I18N_ULOCALE_KOREAN;
i18n_umeasure_format_width_e format_width = I18N_UMEASFMT_WIDTH_WIDE;
assert_neq(measure_format, NULL);
assert_eq(ret, I18N_ERROR_NONE);
- i18n_measure_format_destroy(measure_format);
-
return 0;
}
ret = i18n_measure_format_create(language, country, format_width, NULL);
- assert_eq(measure_format, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
return 0;
*/
int utc_capi_base_utils_i18n_measure_format_format_p(void)
{
- i18n_measure_format_h measure_format = NULL;
- i18n_measure_format_create_currency_format(&measure_format);
+ utc_capi_base_utils_measure_format_cleanup();
+ assert_eq(measure_format, NULL);
+
+ const char *language = I18N_ULOCALE_ENGLISH;
+ const char *country = "US";
+ ret = i18n_measure_format_create_currency_format_from_locale(language, country, &measure_format);
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(measure_format, NULL);
double double_to_set = 13.0;
- i18n_formattable_h formattable = NULL;
i18n_formattable_create_with_double(double_to_set, &formattable);
assert_neq(formattable, NULL);
char *append_to = "Price: ";
- i18n_field_position_h field_position = NULL;
i18n_field_position_create_for_field(0, &field_position);
i18n_field_position_set_field(field_position, 1);
assert_neq(field_position, NULL);
return 0;
}
-
-/**
- * @testcase utc_capi_base_utils_i18n_measure_format_parse_object_p
- * @since_tizen 3.0
- * @description Calls i18n_measure_format_parse_object and checks whether function
- * succeeded.
- */
-int utc_capi_base_utils_i18n_measure_format_parse_object_p(void)
-{
- assert_eq(ret, I18N_ERROR_NONE);
- assert_neq(measure_format, NULL);
-
- const char *source = "$1,234.56";
-
- i18n_formattable_h result = NULL;
-
- i18n_parse_position_h parse_position = NULL;
- i18n_parse_position_create(&parse_position);
- assert_neq(parse_position, NULL);
-
- ret = i18n_measure_format_parse_object(measure_format, source, &result, parse_position);
-
- i18n_parse_position_destroy(parse_position);
-
- assert_eq(ret, I18N_ERROR_NONE);
- assert_neq(result, NULL);
-
- return 0;
-}
-
-/**
- * @testcase utc_capi_base_utils_i18n_measure_format_parse_object_n
- * @since_tizen 3.0
- * @description Calls i18n_measure_format_parse_object passing invalid measure_format and
- * checks for an invalid parameter error code.
- */
-int utc_capi_base_utils_i18n_measure_format_parse_object_n(void)
-{
- assert_neq(measure_format, NULL);
-
- const char *source = "$1,234.56";
-
- i18n_formattable_h result = NULL;
-
- i18n_parse_position_h parse_position = NULL;
- i18n_parse_position_create(&parse_position);
- assert_neq(parse_position, NULL);
-
- ret = i18n_measure_format_parse_object(NULL, source, &result, parse_position);
-
- i18n_parse_position_destroy(parse_position);
-
- assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
-
- return 0;
-}
-
-/**
- * @testcase utc_capi_base_utils_i18n_measure_format_parse_object_n2
- * @since_tizen 3.0
- * @description Calls i18n_measure_format_parse_object passing invalid source and
- * checks for an invalid parameter error code.
- */
-int utc_capi_base_utils_i18n_measure_format_parse_object_n2(void)
-{
- assert_eq(ret, I18N_ERROR_NONE);
- assert_neq(measure_format, NULL);
-
- i18n_formattable_h result = NULL;
-
- i18n_parse_position_h parse_position = NULL;
- i18n_parse_position_create(&parse_position);
- assert_neq(parse_position, NULL);
-
- ret = i18n_measure_format_parse_object(measure_format, NULL, &result, parse_position);
-
- i18n_parse_position_destroy(parse_position);
-
- assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
-
- return 0;
-}
-
-/**
- * @testcase utc_capi_base_utils_i18n_measure_format_parse_object_n3
- * @since_tizen 3.0
- * @description Calls i18n_measure_format_parse_object passing invalid result and
- * checks for an invalid parameter error code.
- */
-int utc_capi_base_utils_i18n_measure_format_parse_object_n3(void)
-{
- assert_eq(ret, I18N_ERROR_NONE);
- assert_neq(measure_format, NULL);
-
- const char *source = "$1,234.56";
-
- i18n_parse_position_h parse_position = NULL;
- ret = i18n_parse_position_create(&parse_position);
- assert_eq(ret, I18N_ERROR_NONE);
- assert_neq(parse_position, NULL);
-
- ret = i18n_measure_format_parse_object(measure_format, source, NULL, parse_position);
-
- i18n_parse_position_destroy(parse_position);
-
- assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
-
- return 0;
-}
-
-/**
- * @testcase utc_capi_base_utils_i18n_measure_format_parse_object_n4
- * @since_tizen 3.0
- * @description Calls i18n_measure_format_parse_object passing invalid parse_position and
- * checks for an invalid parameter error code.
- */
-int utc_capi_base_utils_i18n_measure_format_parse_object_n4(void)
-{
- assert_eq(ret, I18N_ERROR_NONE);
- assert_neq(measure_format, NULL);
-
- const char *source = "$1,234.56";
-
- i18n_formattable_h result = NULL;
-
- ret = i18n_measure_format_parse_object(measure_format, source, &result, NULL);
-
- assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
-
- return 0;
-}
#include <string.h>
static i18n_measure_unit_h measure_unit = NULL;
+static int ret = I18N_ERROR_NONE;
+static char *type = NULL;
+static char *subtype = NULL;
/**
* @function utc_capi_base_utils_measure-unit_startup
*/
void utc_capi_base_utils_measure_unit_startup(void)
{
- i18n_measure_unit_create(&measure_unit);
}
/**
i18n_measure_unit_destroy(measure_unit);
measure_unit = NULL;
}
+
+ if (type != NULL) {
+ free(type);
+ type = NULL;
+ }
+
+ if (subtype != NULL) {
+ free(subtype);
+ subtype = NULL;
+ }
}
/**
* @testcase utc_capi_base_utils_i18n_measure_unit_create_teaspoon_p
* @since_tizen 3.0
- * @description Calls i18n_measure_unit_create_teaspoon and checks whether function
- * succeeded.
+ * @description Calls i18n_measure_unit_create_teaspoon and checks whether
+ * function succeeded.
*/
int utc_capi_base_utils_i18n_measure_unit_create_teaspoon_p(void)
{
- int ret = i18n_measure_unit_create_teaspoon(&measure_unit);
+ ret = i18n_measure_unit_create_teaspoon(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "teaspoon";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
/**
* @testcase utc_capi_base_utils_i18n_measure_unit_create_teaspoon_n
* @since_tizen 3.0
- * @description Calls i18n_measure_unit_create_teaspoon passing invalid measure_unit
- * and checks for an invalid parameter error code.
+ * @description Calls i18n_measure_unit_create_teaspoon passing invalid
+ * measure_unit and checks for an invalid parameter error code.
*/
int utc_capi_base_utils_i18n_measure_unit_create_teaspoon_n(void)
{
- int ret = i18n_measure_unit_create_teaspoon(NULL);
+ ret = i18n_measure_unit_create_teaspoon(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
return 0;
}
-
/**
* @testcase utc_capi_base_utils_i18n_measure_unit_create_tablespoon_p
* @since_tizen 3.0
*/
int utc_capi_base_utils_i18n_measure_unit_create_tablespoon_p(void)
{
- int ret = i18n_measure_unit_create_tablespoon(&measure_unit);
+ ret = i18n_measure_unit_create_tablespoon(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "tablespoon";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_tablespoon_n(void)
{
- int ret = i18n_measure_unit_create_tablespoon(NULL);
+ ret = i18n_measure_unit_create_tablespoon(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_quart_p(void)
{
- int ret = i18n_measure_unit_create_quart(&measure_unit);
+ ret = i18n_measure_unit_create_quart(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "quart";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_quart_n(void)
{
- int ret = i18n_measure_unit_create_quart(NULL);
+ ret = i18n_measure_unit_create_quart(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_pint_p(void)
{
- int ret = i18n_measure_unit_create_pint(&measure_unit);
+ ret = i18n_measure_unit_create_pint(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "pint";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_pint_n(void)
{
- int ret = i18n_measure_unit_create_pint(NULL);
+ ret = i18n_measure_unit_create_pint(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_milliliter_p(void)
{
- int ret = i18n_measure_unit_create_milliliter(&measure_unit);
+ ret = i18n_measure_unit_create_milliliter(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "milliliter";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_milliliter_n(void)
{
- int ret = i18n_measure_unit_create_milliliter(NULL);
+ ret = i18n_measure_unit_create_milliliter(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_megaliter_p(void)
{
- int ret = i18n_measure_unit_create_megaliter(&measure_unit);
+ ret = i18n_measure_unit_create_megaliter(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "megaliter";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_megaliter_n(void)
{
- int ret = i18n_measure_unit_create_megaliter(NULL);
+ ret = i18n_measure_unit_create_megaliter(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_liter_p(void)
{
- int ret = i18n_measure_unit_create_liter(&measure_unit);
+ ret = i18n_measure_unit_create_liter(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "liter";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_liter_n(void)
{
- int ret = i18n_measure_unit_create_liter(NULL);
+ ret = i18n_measure_unit_create_liter(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_hectoliter_p(void)
{
- int ret = i18n_measure_unit_create_hectoliter(&measure_unit);
+ ret = i18n_measure_unit_create_hectoliter(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "hectoliter";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_hectoliter_n(void)
{
- int ret = i18n_measure_unit_create_hectoliter(NULL);
+ ret = i18n_measure_unit_create_hectoliter(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_gallon_p(void)
{
- int ret = i18n_measure_unit_create_gallon(&measure_unit);
+ ret = i18n_measure_unit_create_gallon(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "gallon";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_gallon_n(void)
{
- int ret = i18n_measure_unit_create_gallon(NULL);
+ ret = i18n_measure_unit_create_gallon(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_fluid_ounce_p(void)
{
- int ret = i18n_measure_unit_create_fluid_ounce(&measure_unit);
+ ret = i18n_measure_unit_create_fluid_ounce(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "fluid-ounce";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_fluid_ounce_n(void)
{
- int ret = i18n_measure_unit_create_fluid_ounce(NULL);
+ ret = i18n_measure_unit_create_fluid_ounce(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_deciliter_p(void)
{
- int ret = i18n_measure_unit_create_deciliter(&measure_unit);
+ ret = i18n_measure_unit_create_deciliter(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "deciliter";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_deciliter_n(void)
{
- int ret = i18n_measure_unit_create_deciliter(NULL);
+ ret = i18n_measure_unit_create_deciliter(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_cup_p(void)
{
- int ret = i18n_measure_unit_create_cup(&measure_unit);
+ ret = i18n_measure_unit_create_cup(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "cup";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_cup_n(void)
{
- int ret = i18n_measure_unit_create_cup(NULL);
+ ret = i18n_measure_unit_create_cup(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_cubic_yard_p(void)
{
- int ret = i18n_measure_unit_create_cubic_yard(&measure_unit);
+ ret = i18n_measure_unit_create_cubic_yard(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "cubic-yard";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_cubic_yard_n(void)
{
- int ret = i18n_measure_unit_create_cubic_yard(NULL);
+ ret = i18n_measure_unit_create_cubic_yard(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_cubic_mile_p(void)
{
- int ret = i18n_measure_unit_create_cubic_mile(&measure_unit);
+ ret = i18n_measure_unit_create_cubic_mile(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "cubic-mile";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_cubic_mile_n(void)
{
- int ret = i18n_measure_unit_create_cubic_mile(NULL);
+ ret = i18n_measure_unit_create_cubic_mile(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_cubic_meter_p(void)
{
- int ret = i18n_measure_unit_create_cubic_meter(&measure_unit);
+ ret = i18n_measure_unit_create_cubic_meter(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "cubic-meter";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_cubic_meter_n(void)
{
- int ret = i18n_measure_unit_create_cubic_meter(NULL);
+ ret = i18n_measure_unit_create_cubic_meter(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_cubic_kilometer_p(void)
{
- int ret = i18n_measure_unit_create_cubic_kilometer(&measure_unit);
+ ret = i18n_measure_unit_create_cubic_kilometer(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "cubic-kilometer";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_cubic_kilometer_n(void)
{
- int ret = i18n_measure_unit_create_cubic_kilometer(NULL);
+ ret = i18n_measure_unit_create_cubic_kilometer(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_cubic_inch_p(void)
{
- int ret = i18n_measure_unit_create_cubic_inch(&measure_unit);
+ ret = i18n_measure_unit_create_cubic_inch(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "cubic-inch";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_cubic_inch_n(void)
{
- int ret = i18n_measure_unit_create_cubic_inch(NULL);
+ ret = i18n_measure_unit_create_cubic_inch(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_cubic_foot_p(void)
{
- int ret = i18n_measure_unit_create_cubic_foot(&measure_unit);
+ ret = i18n_measure_unit_create_cubic_foot(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "cubic-foot";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_cubic_foot_n(void)
{
- int ret = i18n_measure_unit_create_cubic_foot(NULL);
+ ret = i18n_measure_unit_create_cubic_foot(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_cubic_centimeter_p(void)
{
- int ret = i18n_measure_unit_create_cubic_centimeter(&measure_unit);
+ ret = i18n_measure_unit_create_cubic_centimeter(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "cubic-centimeter";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_cubic_centimeter_n(void)
{
- int ret = i18n_measure_unit_create_cubic_centimeter(NULL);
+ ret = i18n_measure_unit_create_cubic_centimeter(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_centiliter_p(void)
{
- int ret = i18n_measure_unit_create_centiliter(&measure_unit);
+ ret = i18n_measure_unit_create_centiliter(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "centiliter";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_centiliter_n(void)
{
- int ret = i18n_measure_unit_create_centiliter(NULL);
+ ret = i18n_measure_unit_create_centiliter(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_bushel_p(void)
{
- int ret = i18n_measure_unit_create_bushel(&measure_unit);
+ ret = i18n_measure_unit_create_bushel(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "bushel";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_bushel_n(void)
{
- int ret = i18n_measure_unit_create_bushel(NULL);
+ ret = i18n_measure_unit_create_bushel(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_acre_foot_p(void)
{
- int ret = i18n_measure_unit_create_acre_foot(&measure_unit);
+ ret = i18n_measure_unit_create_acre_foot(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "volume";
+ const char *ref_subtype = "acre-foot";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_acre_foot_n(void)
{
- int ret = i18n_measure_unit_create_acre_foot(NULL);
+ ret = i18n_measure_unit_create_acre_foot(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_kelvin_p(void)
{
- int ret = i18n_measure_unit_create_kelvin(&measure_unit);
+ ret = i18n_measure_unit_create_kelvin(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "temperature";
+ const char *ref_subtype = "kelvin";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_kelvin_n(void)
{
- int ret = i18n_measure_unit_create_kelvin(NULL);
+ ret = i18n_measure_unit_create_kelvin(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_fahrenheit_p(void)
{
- int ret = i18n_measure_unit_create_fahrenheit(&measure_unit);
+ ret = i18n_measure_unit_create_fahrenheit(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "temperature";
+ const char *ref_subtype = "fahrenheit";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_fahrenheit_n(void)
{
- int ret = i18n_measure_unit_create_fahrenheit(NULL);
+ ret = i18n_measure_unit_create_fahrenheit(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_celsius_p(void)
{
- int ret = i18n_measure_unit_create_celsius(&measure_unit);
+ ret = i18n_measure_unit_create_celsius(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "temperature";
+ const char *ref_subtype = "celsius";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_celsius_n(void)
{
- int ret = i18n_measure_unit_create_celsius(NULL);
+ ret = i18n_measure_unit_create_celsius(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_mile_per_hour_p(void)
{
- int ret = i18n_measure_unit_create_mile_per_hour(&measure_unit);
+ ret = i18n_measure_unit_create_mile_per_hour(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "speed";
+ const char *ref_subtype = "mile-per-hour";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_mile_per_hour_n(void)
{
- int ret = i18n_measure_unit_create_mile_per_hour(NULL);
+ ret = i18n_measure_unit_create_mile_per_hour(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_meter_per_second_p(void)
{
- int ret = i18n_measure_unit_create_meter_per_second(&measure_unit);
+ ret = i18n_measure_unit_create_meter_per_second(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "speed";
+ const char *ref_subtype = "meter-per-second";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_meter_per_second_n(void)
{
- int ret = i18n_measure_unit_create_meter_per_second(NULL);
+ ret = i18n_measure_unit_create_meter_per_second(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilometer_per_hour_p(void)
{
- int ret = i18n_measure_unit_create_kilometer_per_hour(&measure_unit);
+ ret = i18n_measure_unit_create_kilometer_per_hour(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "speed";
+ const char *ref_subtype = "kilometer-per-hour";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilometer_per_hour_n(void)
{
- int ret = i18n_measure_unit_create_kilometer_per_hour(NULL);
+ ret = i18n_measure_unit_create_kilometer_per_hour(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_karat_p(void)
{
- int ret = i18n_measure_unit_create_karat(&measure_unit);
+ ret = i18n_measure_unit_create_karat(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "concentr";
+ const char *ref_subtype = "karat";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_karat_n(void)
{
- int ret = i18n_measure_unit_create_karat(NULL);
+ ret = i18n_measure_unit_create_karat(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_pound_per_square_inch_p(void)
{
- int ret = i18n_measure_unit_create_pound_per_square_inch(&measure_unit);
+ ret = i18n_measure_unit_create_pound_per_square_inch(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "pressure";
+ const char *ref_subtype = "pound-per-square-inch";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_pound_per_square_inch_n(void)
{
- int ret = i18n_measure_unit_create_pound_per_square_inch(NULL);
+ ret = i18n_measure_unit_create_pound_per_square_inch(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_millimeter_of_mercury_p(void)
{
- int ret = i18n_measure_unit_create_millimeter_of_mercury(&measure_unit);
+ ret = i18n_measure_unit_create_millimeter_of_mercury(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "pressure";
+ const char *ref_subtype = "millimeter-of-mercury";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_millimeter_of_mercury_n(void)
{
- int ret = i18n_measure_unit_create_millimeter_of_mercury(NULL);
+ ret = i18n_measure_unit_create_millimeter_of_mercury(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_millibar_p(void)
{
- int ret = i18n_measure_unit_create_millibar(&measure_unit);
+ ret = i18n_measure_unit_create_millibar(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "pressure";
+ const char *ref_subtype = "millibar";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_millibar_n(void)
{
- int ret = i18n_measure_unit_create_millibar(NULL);
+ ret = i18n_measure_unit_create_millibar(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_inch_hg_p(void)
{
- int ret = i18n_measure_unit_create_inch_hg(&measure_unit);
+ ret = i18n_measure_unit_create_inch_hg(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "pressure";
+ const char *ref_subtype = "inch-hg";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_inch_hg_n(void)
{
- int ret = i18n_measure_unit_create_inch_hg(NULL);
+ ret = i18n_measure_unit_create_inch_hg(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_hectopascal_p(void)
{
- int ret = i18n_measure_unit_create_hectopascal(&measure_unit);
+ ret = i18n_measure_unit_create_hectopascal(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "pressure";
+ const char *ref_subtype = "hectopascal";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_hectopascal_n(void)
{
- int ret = i18n_measure_unit_create_hectopascal(NULL);
+ ret = i18n_measure_unit_create_hectopascal(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_watt_p(void)
{
- int ret = i18n_measure_unit_create_watt(&measure_unit);
+ ret = i18n_measure_unit_create_watt(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "power";
+ const char *ref_subtype = "watt";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_watt_n(void)
{
- int ret = i18n_measure_unit_create_watt(NULL);
+ ret = i18n_measure_unit_create_watt(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_milliwatt_p(void)
{
- int ret = i18n_measure_unit_create_milliwatt(&measure_unit);
+ ret = i18n_measure_unit_create_milliwatt(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "power";
+ const char *ref_subtype = "milliwatt";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_milliwatt_n(void)
{
- int ret = i18n_measure_unit_create_milliwatt(NULL);
+ ret = i18n_measure_unit_create_milliwatt(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_megawatt_p(void)
{
- int ret = i18n_measure_unit_create_megawatt(&measure_unit);
+ ret = i18n_measure_unit_create_megawatt(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "power";
+ const char *ref_subtype = "megawatt";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_megawatt_n(void)
{
- int ret = i18n_measure_unit_create_megawatt(NULL);
+ ret = i18n_measure_unit_create_megawatt(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilowatt_p(void)
{
- int ret = i18n_measure_unit_create_kilowatt(&measure_unit);
+ ret = i18n_measure_unit_create_kilowatt(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "power";
+ const char *ref_subtype = "kilowatt";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilowatt_n(void)
{
- int ret = i18n_measure_unit_create_kilowatt(NULL);
+ ret = i18n_measure_unit_create_kilowatt(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_horsepower_p(void)
{
- int ret = i18n_measure_unit_create_horsepower(&measure_unit);
+ ret = i18n_measure_unit_create_horsepower(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "power";
+ const char *ref_subtype = "horsepower";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_horsepower_n(void)
{
- int ret = i18n_measure_unit_create_horsepower(NULL);
+ ret = i18n_measure_unit_create_horsepower(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_gigawatt_p(void)
{
- int ret = i18n_measure_unit_create_gigawatt(&measure_unit);
+ ret = i18n_measure_unit_create_gigawatt(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "power";
+ const char *ref_subtype = "gigawatt";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_gigawatt_n(void)
{
- int ret = i18n_measure_unit_create_gigawatt(NULL);
+ ret = i18n_measure_unit_create_gigawatt(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_ton_p(void)
{
- int ret = i18n_measure_unit_create_ton(&measure_unit);
+ ret = i18n_measure_unit_create_ton(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "mass";
+ const char *ref_subtype = "ton";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_ton_n(void)
{
- int ret = i18n_measure_unit_create_ton(NULL);
+ ret = i18n_measure_unit_create_ton(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_stone_p(void)
{
- int ret = i18n_measure_unit_create_stone(&measure_unit);
+ ret = i18n_measure_unit_create_stone(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "mass";
+ const char *ref_subtype = "stone";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_stone_n(void)
{
- int ret = i18n_measure_unit_create_stone(NULL);
+ ret = i18n_measure_unit_create_stone(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_pound_p(void)
{
- int ret = i18n_measure_unit_create_pound(&measure_unit);
+ ret = i18n_measure_unit_create_pound(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "mass";
+ const char *ref_subtype = "pound";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_pound_n(void)
{
- int ret = i18n_measure_unit_create_pound(NULL);
+ ret = i18n_measure_unit_create_pound(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_ounce_troy_p(void)
{
- int ret = i18n_measure_unit_create_ounce_troy(&measure_unit);
+ ret = i18n_measure_unit_create_ounce_troy(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "mass";
+ const char *ref_subtype = "ounce-troy";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_ounce_troy_n(void)
{
- int ret = i18n_measure_unit_create_ounce_troy(NULL);
+ ret = i18n_measure_unit_create_ounce_troy(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_ounce_p(void)
{
- int ret = i18n_measure_unit_create_ounce(&measure_unit);
+ ret = i18n_measure_unit_create_ounce(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "mass";
+ const char *ref_subtype = "ounce";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_ounce_n(void)
{
- int ret = i18n_measure_unit_create_ounce(NULL);
+ ret = i18n_measure_unit_create_ounce(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_milligram_p(void)
{
- int ret = i18n_measure_unit_create_milligram(&measure_unit);
+ ret = i18n_measure_unit_create_milligram(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "mass";
+ const char *ref_subtype = "milligram";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_milligram_n(void)
{
- int ret = i18n_measure_unit_create_milligram(NULL);
+ ret = i18n_measure_unit_create_milligram(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_microgram_p(void)
{
- int ret = i18n_measure_unit_create_microgram(&measure_unit);
+ ret = i18n_measure_unit_create_microgram(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "mass";
+ const char *ref_subtype = "microgram";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_microgram_n(void)
{
- int ret = i18n_measure_unit_create_microgram(NULL);
+ ret = i18n_measure_unit_create_microgram(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_metric_ton_p(void)
{
- int ret = i18n_measure_unit_create_metric_ton(&measure_unit);
+ ret = i18n_measure_unit_create_metric_ton(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "mass";
+ const char *ref_subtype = "metric-ton";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_metric_ton_n(void)
{
- int ret = i18n_measure_unit_create_metric_ton(NULL);
+ ret = i18n_measure_unit_create_metric_ton(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilogram_p(void)
{
- int ret = i18n_measure_unit_create_kilogram(&measure_unit);
+ ret = i18n_measure_unit_create_kilogram(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "mass";
+ const char *ref_subtype = "kilogram";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilogram_n(void)
{
- int ret = i18n_measure_unit_create_kilogram(NULL);
+ ret = i18n_measure_unit_create_kilogram(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_gram_p(void)
{
- int ret = i18n_measure_unit_create_gram(&measure_unit);
+ ret = i18n_measure_unit_create_gram(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "mass";
+ const char *ref_subtype = "gram";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_gram_n(void)
{
- int ret = i18n_measure_unit_create_gram(NULL);
+ ret = i18n_measure_unit_create_gram(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_carat_p(void)
{
- int ret = i18n_measure_unit_create_carat(&measure_unit);
+ ret = i18n_measure_unit_create_carat(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "mass";
+ const char *ref_subtype = "carat";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_carat_n(void)
{
- int ret = i18n_measure_unit_create_carat(NULL);
+ ret = i18n_measure_unit_create_carat(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_lux_p(void)
{
- int ret = i18n_measure_unit_create_lux(&measure_unit);
+ ret = i18n_measure_unit_create_lux(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "light";
+ const char *ref_subtype = "lux";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_lux_n(void)
{
- int ret = i18n_measure_unit_create_lux(NULL);
+ ret = i18n_measure_unit_create_lux(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_yard_p(void)
{
- int ret = i18n_measure_unit_create_yard(&measure_unit);
+ ret = i18n_measure_unit_create_yard(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "length";
+ const char *ref_subtype = "yard";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_yard_n(void)
{
- int ret = i18n_measure_unit_create_yard(NULL);
+ ret = i18n_measure_unit_create_yard(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_picometer_p(void)
{
- int ret = i18n_measure_unit_create_picometer(&measure_unit);
+ ret = i18n_measure_unit_create_picometer(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "length";
+ const char *ref_subtype = "picometer";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_picometer_n(void)
{
- int ret = i18n_measure_unit_create_picometer(NULL);
+ ret = i18n_measure_unit_create_picometer(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_parsec_p(void)
{
- int ret = i18n_measure_unit_create_parsec(&measure_unit);
+ ret = i18n_measure_unit_create_parsec(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "length";
+ const char *ref_subtype = "parsec";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_parsec_n(void)
{
- int ret = i18n_measure_unit_create_parsec(NULL);
+ ret = i18n_measure_unit_create_parsec(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_nautical_mile_p(void)
{
- int ret = i18n_measure_unit_create_nautical_mile(&measure_unit);
+ ret = i18n_measure_unit_create_nautical_mile(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "length";
+ const char *ref_subtype = "nautical-mile";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_nautical_mile_n(void)
{
- int ret = i18n_measure_unit_create_nautical_mile(NULL);
+ ret = i18n_measure_unit_create_nautical_mile(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_nanometer_p(void)
{
- int ret = i18n_measure_unit_create_nanometer(&measure_unit);
+ ret = i18n_measure_unit_create_nanometer(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "length";
+ const char *ref_subtype = "nanometer";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_nanometer_n(void)
{
- int ret = i18n_measure_unit_create_nanometer(NULL);
+ ret = i18n_measure_unit_create_nanometer(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_millimeter_p(void)
{
- int ret = i18n_measure_unit_create_millimeter(&measure_unit);
+ ret = i18n_measure_unit_create_millimeter(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "length";
+ const char *ref_subtype = "millimeter";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_millimeter_n(void)
{
- int ret = i18n_measure_unit_create_millimeter(NULL);
+ ret = i18n_measure_unit_create_millimeter(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_mile_p(void)
{
- int ret = i18n_measure_unit_create_mile(&measure_unit);
+ ret = i18n_measure_unit_create_mile(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "length";
+ const char *ref_subtype = "mile";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_mile_n(void)
{
- int ret = i18n_measure_unit_create_mile(NULL);
+ ret = i18n_measure_unit_create_mile(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_micrometer_p(void)
{
- int ret = i18n_measure_unit_create_micrometer(&measure_unit);
+ ret = i18n_measure_unit_create_micrometer(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "length";
+ const char *ref_subtype = "micrometer";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_micrometer_n(void)
{
- int ret = i18n_measure_unit_create_micrometer(NULL);
+ ret = i18n_measure_unit_create_micrometer(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_meter_p(void)
{
- int ret = i18n_measure_unit_create_meter(&measure_unit);
+ ret = i18n_measure_unit_create_meter(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "length";
+ const char *ref_subtype = "meter";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_meter_n(void)
{
- int ret = i18n_measure_unit_create_meter(NULL);
+ ret = i18n_measure_unit_create_meter(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_light_year_p(void)
{
- int ret = i18n_measure_unit_create_light_year(&measure_unit);
+ ret = i18n_measure_unit_create_light_year(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "length";
+ const char *ref_subtype = "light-year";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_light_year_n(void)
{
- int ret = i18n_measure_unit_create_light_year(NULL);
+ ret = i18n_measure_unit_create_light_year(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilometer_p(void)
{
- int ret = i18n_measure_unit_create_kilometer(&measure_unit);
+ ret = i18n_measure_unit_create_kilometer(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "length";
+ const char *ref_subtype = "kilometer";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilometer_n(void)
{
- int ret = i18n_measure_unit_create_kilometer(NULL);
+ ret = i18n_measure_unit_create_kilometer(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_inch_p(void)
{
- int ret = i18n_measure_unit_create_inch(&measure_unit);
+ ret = i18n_measure_unit_create_inch(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "length";
+ const char *ref_subtype = "inch";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_inch_n(void)
{
- int ret = i18n_measure_unit_create_inch(NULL);
+ ret = i18n_measure_unit_create_inch(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_furlong_p(void)
{
- int ret = i18n_measure_unit_create_furlong(&measure_unit);
+ ret = i18n_measure_unit_create_furlong(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "length";
+ const char *ref_subtype = "furlong";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_furlong_n(void)
{
- int ret = i18n_measure_unit_create_furlong(NULL);
+ ret = i18n_measure_unit_create_furlong(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_foot_p(void)
{
- int ret = i18n_measure_unit_create_foot(&measure_unit);
+ ret = i18n_measure_unit_create_foot(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "length";
+ const char *ref_subtype = "foot";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_foot_n(void)
{
- int ret = i18n_measure_unit_create_foot(NULL);
+ ret = i18n_measure_unit_create_foot(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_fathom_p(void)
{
- int ret = i18n_measure_unit_create_fathom(&measure_unit);
+ ret = i18n_measure_unit_create_fathom(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "length";
+ const char *ref_subtype = "fathom";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_fathom_n(void)
{
- int ret = i18n_measure_unit_create_fathom(NULL);
+ ret = i18n_measure_unit_create_fathom(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_decimeter_p(void)
{
- int ret = i18n_measure_unit_create_decimeter(&measure_unit);
+ ret = i18n_measure_unit_create_decimeter(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "length";
+ const char *ref_subtype = "decimeter";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_decimeter_n(void)
{
- int ret = i18n_measure_unit_create_decimeter(NULL);
+ ret = i18n_measure_unit_create_decimeter(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_centimeter_p(void)
{
- int ret = i18n_measure_unit_create_centimeter(&measure_unit);
+ ret = i18n_measure_unit_create_centimeter(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "length";
+ const char *ref_subtype = "centimeter";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_centimeter_n(void)
{
- int ret = i18n_measure_unit_create_centimeter(NULL);
+ ret = i18n_measure_unit_create_centimeter(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_astronomical_unit_p(void)
{
- int ret = i18n_measure_unit_create_astronomical_unit(&measure_unit);
+ ret = i18n_measure_unit_create_astronomical_unit(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "length";
+ const char *ref_subtype = "astronomical-unit";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_astronomical_unit_n(void)
{
- int ret = i18n_measure_unit_create_astronomical_unit(NULL);
+ ret = i18n_measure_unit_create_astronomical_unit(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_megahertz_p(void)
{
- int ret = i18n_measure_unit_create_megahertz(&measure_unit);
+ ret = i18n_measure_unit_create_megahertz(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "frequency";
+ const char *ref_subtype = "megahertz";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_megahertz_n(void)
{
- int ret = i18n_measure_unit_create_megahertz(NULL);
+ ret = i18n_measure_unit_create_megahertz(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilohertz_p(void)
{
- int ret = i18n_measure_unit_create_kilohertz(&measure_unit);
+ ret = i18n_measure_unit_create_kilohertz(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "frequency";
+ const char *ref_subtype = "kilohertz";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilohertz_n(void)
{
- int ret = i18n_measure_unit_create_kilohertz(NULL);
+ ret = i18n_measure_unit_create_kilohertz(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_hertz_p(void)
{
- int ret = i18n_measure_unit_create_hertz(&measure_unit);
+ ret = i18n_measure_unit_create_hertz(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "frequency";
+ const char *ref_subtype = "hertz";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_hertz_n(void)
{
- int ret = i18n_measure_unit_create_hertz(NULL);
+ ret = i18n_measure_unit_create_hertz(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_gigahertz_p(void)
{
- int ret = i18n_measure_unit_create_gigahertz(&measure_unit);
+ ret = i18n_measure_unit_create_gigahertz(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "frequency";
+ const char *ref_subtype = "gigahertz";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_gigahertz_n(void)
{
- int ret = i18n_measure_unit_create_gigahertz(NULL);
+ ret = i18n_measure_unit_create_gigahertz(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilowatt_hour_p(void)
{
- int ret = i18n_measure_unit_create_kilowatt_hour(&measure_unit);
+ ret = i18n_measure_unit_create_kilowatt_hour(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "energy";
+ const char *ref_subtype = "kilowatt-hour";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilowatt_hour_n(void)
{
- int ret = i18n_measure_unit_create_kilowatt_hour(NULL);
+ ret = i18n_measure_unit_create_kilowatt_hour(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilojoule_p(void)
{
- int ret = i18n_measure_unit_create_kilojoule(&measure_unit);
+ ret = i18n_measure_unit_create_kilojoule(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "energy";
+ const char *ref_subtype = "kilojoule";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilojoule_n(void)
{
- int ret = i18n_measure_unit_create_kilojoule(NULL);
+ ret = i18n_measure_unit_create_kilojoule(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilocalorie_p(void)
{
- int ret = i18n_measure_unit_create_kilocalorie(&measure_unit);
+ ret = i18n_measure_unit_create_kilocalorie(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "energy";
+ const char *ref_subtype = "kilocalorie";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilocalorie_n(void)
{
- int ret = i18n_measure_unit_create_kilocalorie(NULL);
+ ret = i18n_measure_unit_create_kilocalorie(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_joule_p(void)
{
- int ret = i18n_measure_unit_create_joule(&measure_unit);
+ ret = i18n_measure_unit_create_joule(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "energy";
+ const char *ref_subtype = "joule";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_joule_n(void)
{
- int ret = i18n_measure_unit_create_joule(NULL);
+ ret = i18n_measure_unit_create_joule(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_foodcalorie_p(void)
{
- int ret = i18n_measure_unit_create_foodcalorie(&measure_unit);
+ ret = i18n_measure_unit_create_foodcalorie(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "energy";
+ const char *ref_subtype = "foodcalorie";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_foodcalorie_n(void)
{
- int ret = i18n_measure_unit_create_foodcalorie(NULL);
+ ret = i18n_measure_unit_create_foodcalorie(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_calorie_p(void)
{
- int ret = i18n_measure_unit_create_calorie(&measure_unit);
+ ret = i18n_measure_unit_create_calorie(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "energy";
+ const char *ref_subtype = "calorie";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_calorie_n(void)
{
- int ret = i18n_measure_unit_create_calorie(NULL);
+ ret = i18n_measure_unit_create_calorie(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_volt_p(void)
{
- int ret = i18n_measure_unit_create_volt(&measure_unit);
+ ret = i18n_measure_unit_create_volt(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "electric";
+ const char *ref_subtype = "volt";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_volt_n(void)
{
- int ret = i18n_measure_unit_create_volt(NULL);
+ ret = i18n_measure_unit_create_volt(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_ohm_p(void)
{
- int ret = i18n_measure_unit_create_ohm(&measure_unit);
+ ret = i18n_measure_unit_create_ohm(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "electric";
+ const char *ref_subtype = "ohm";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_ohm_n(void)
{
- int ret = i18n_measure_unit_create_ohm(NULL);
+ ret = i18n_measure_unit_create_ohm(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_milliampere_p(void)
{
- int ret = i18n_measure_unit_create_milliampere(&measure_unit);
+ ret = i18n_measure_unit_create_milliampere(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "electric";
+ const char *ref_subtype = "milliampere";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_milliampere_n(void)
{
- int ret = i18n_measure_unit_create_milliampere(NULL);
+ ret = i18n_measure_unit_create_milliampere(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_ampere_p(void)
{
- int ret = i18n_measure_unit_create_ampere(&measure_unit);
+ ret = i18n_measure_unit_create_ampere(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "electric";
+ const char *ref_subtype = "ampere";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_ampere_n(void)
{
- int ret = i18n_measure_unit_create_ampere(NULL);
+ ret = i18n_measure_unit_create_ampere(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_year_p(void)
{
- int ret = i18n_measure_unit_create_year(&measure_unit);
+ ret = i18n_measure_unit_create_year(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "duration";
+ const char *ref_subtype = "year";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_year_n(void)
{
- int ret = i18n_measure_unit_create_year(NULL);
+ ret = i18n_measure_unit_create_year(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_week_p(void)
{
- int ret = i18n_measure_unit_create_week(&measure_unit);
+ ret = i18n_measure_unit_create_week(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "duration";
+ const char *ref_subtype = "week";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_week_n(void)
{
- int ret = i18n_measure_unit_create_week(NULL);
+ ret = i18n_measure_unit_create_week(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_second_p(void)
{
- int ret = i18n_measure_unit_create_second(&measure_unit);
+ ret = i18n_measure_unit_create_second(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "duration";
+ const char *ref_subtype = "second";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_second_n(void)
{
- int ret = i18n_measure_unit_create_second(NULL);
+ ret = i18n_measure_unit_create_second(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_nanosecond_p(void)
{
- int ret = i18n_measure_unit_create_nanosecond(&measure_unit);
+ ret = i18n_measure_unit_create_nanosecond(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "duration";
+ const char *ref_subtype = "nanosecond";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_nanosecond_n(void)
{
- int ret = i18n_measure_unit_create_nanosecond(NULL);
+ ret = i18n_measure_unit_create_nanosecond(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_month_p(void)
{
- int ret = i18n_measure_unit_create_month(&measure_unit);
+ ret = i18n_measure_unit_create_month(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "duration";
+ const char *ref_subtype = "month";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_month_n(void)
{
- int ret = i18n_measure_unit_create_month(NULL);
+ ret = i18n_measure_unit_create_month(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_minute_p(void)
{
- int ret = i18n_measure_unit_create_minute(&measure_unit);
+ ret = i18n_measure_unit_create_minute(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "duration";
+ const char *ref_subtype = "minute";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_minute_n(void)
{
- int ret = i18n_measure_unit_create_minute(NULL);
+ ret = i18n_measure_unit_create_minute(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_millisecond_p(void)
{
- int ret = i18n_measure_unit_create_millisecond(&measure_unit);
+ ret = i18n_measure_unit_create_millisecond(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "duration";
+ const char *ref_subtype = "millisecond";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_millisecond_n(void)
{
- int ret = i18n_measure_unit_create_millisecond(NULL);
+ ret = i18n_measure_unit_create_millisecond(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_microsecond_p(void)
{
- int ret = i18n_measure_unit_create_microsecond(&measure_unit);
+ ret = i18n_measure_unit_create_microsecond(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "duration";
+ const char *ref_subtype = "microsecond";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_microsecond_n(void)
{
- int ret = i18n_measure_unit_create_microsecond(NULL);
+ ret = i18n_measure_unit_create_microsecond(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_hour_p(void)
{
- int ret = i18n_measure_unit_create_hour(&measure_unit);
+ ret = i18n_measure_unit_create_hour(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "duration";
+ const char *ref_subtype = "hour";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_hour_n(void)
{
- int ret = i18n_measure_unit_create_hour(NULL);
+ ret = i18n_measure_unit_create_hour(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_day_p(void)
{
- int ret = i18n_measure_unit_create_day(&measure_unit);
+ ret = i18n_measure_unit_create_day(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "duration";
+ const char *ref_subtype = "day";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_day_n(void)
{
- int ret = i18n_measure_unit_create_day(NULL);
+ ret = i18n_measure_unit_create_day(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_terabyte_p(void)
{
- int ret = i18n_measure_unit_create_terabyte(&measure_unit);
+ ret = i18n_measure_unit_create_terabyte(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "digital";
+ const char *ref_subtype = "terabyte";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_terabyte_n(void)
{
- int ret = i18n_measure_unit_create_terabyte(NULL);
+ ret = i18n_measure_unit_create_terabyte(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_terabit_p(void)
{
- int ret = i18n_measure_unit_create_terabit(&measure_unit);
+ ret = i18n_measure_unit_create_terabit(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "digital";
+ const char *ref_subtype = "terabit";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_terabit_n(void)
{
- int ret = i18n_measure_unit_create_terabit(NULL);
+ ret = i18n_measure_unit_create_terabit(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_megabyte_p(void)
{
- int ret = i18n_measure_unit_create_megabyte(&measure_unit);
+ ret = i18n_measure_unit_create_megabyte(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "digital";
+ const char *ref_subtype = "megabyte";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_megabyte_n(void)
{
- int ret = i18n_measure_unit_create_megabyte(NULL);
+ ret = i18n_measure_unit_create_megabyte(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_megabit_p(void)
{
- int ret = i18n_measure_unit_create_megabit(&measure_unit);
+ ret = i18n_measure_unit_create_megabit(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "digital";
+ const char *ref_subtype = "megabit";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_megabit_n(void)
{
- int ret = i18n_measure_unit_create_megabit(NULL);
+ ret = i18n_measure_unit_create_megabit(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilobyte_p(void)
{
- int ret = i18n_measure_unit_create_kilobyte(&measure_unit);
+ ret = i18n_measure_unit_create_kilobyte(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "digital";
+ const char *ref_subtype = "kilobyte";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilobyte_n(void)
{
- int ret = i18n_measure_unit_create_kilobyte(NULL);
+ ret = i18n_measure_unit_create_kilobyte(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilobit_p(void)
{
- int ret = i18n_measure_unit_create_kilobit(&measure_unit);
+ ret = i18n_measure_unit_create_kilobit(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "digital";
+ const char *ref_subtype = "kilobit";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_kilobit_n(void)
{
- int ret = i18n_measure_unit_create_kilobit(NULL);
+ ret = i18n_measure_unit_create_kilobit(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_gigabyte_p(void)
{
- int ret = i18n_measure_unit_create_gigabyte(&measure_unit);
+ ret = i18n_measure_unit_create_gigabyte(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "digital";
+ const char *ref_subtype = "gigabyte";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_gigabyte_n(void)
{
- int ret = i18n_measure_unit_create_gigabyte(NULL);
+ ret = i18n_measure_unit_create_gigabyte(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_gigabit_p(void)
{
- int ret = i18n_measure_unit_create_gigabit(&measure_unit);
+ ret = i18n_measure_unit_create_gigabit(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "digital";
+ const char *ref_subtype = "gigabit";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_gigabit_n(void)
{
- int ret = i18n_measure_unit_create_gigabit(NULL);
+ ret = i18n_measure_unit_create_gigabit(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_byte_p(void)
{
- int ret = i18n_measure_unit_create_byte(&measure_unit);
+ ret = i18n_measure_unit_create_byte(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "digital";
+ const char *ref_subtype = "byte";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_byte_n(void)
{
- int ret = i18n_measure_unit_create_byte(NULL);
+ ret = i18n_measure_unit_create_byte(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_bit_p(void)
{
- int ret = i18n_measure_unit_create_bit(&measure_unit);
+ ret = i18n_measure_unit_create_bit(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "digital";
+ const char *ref_subtype = "bit";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_bit_n(void)
{
- int ret = i18n_measure_unit_create_bit(NULL);
+ ret = i18n_measure_unit_create_bit(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_mile_per_gallon_p(void)
{
- int ret = i18n_measure_unit_create_mile_per_gallon(&measure_unit);
+ ret = i18n_measure_unit_create_mile_per_gallon(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "consumption";
+ const char *ref_subtype = "mile-per-gallon";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_mile_per_gallon_n(void)
{
- int ret = i18n_measure_unit_create_mile_per_gallon(NULL);
+ ret = i18n_measure_unit_create_mile_per_gallon(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_liter_per_kilometer_p(void)
{
- int ret = i18n_measure_unit_create_liter_per_kilometer(&measure_unit);
+ ret = i18n_measure_unit_create_liter_per_kilometer(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "consumption";
+ const char *ref_subtype = "liter-per-kilometer";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_liter_per_kilometer_n(void)
{
- int ret = i18n_measure_unit_create_liter_per_kilometer(NULL);
+ ret = i18n_measure_unit_create_liter_per_kilometer(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_square_yard_p(void)
{
- int ret = i18n_measure_unit_create_square_yard(&measure_unit);
+ ret = i18n_measure_unit_create_square_yard(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "area";
+ const char *ref_subtype = "square-yard";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_square_yard_n(void)
{
- int ret = i18n_measure_unit_create_square_yard(NULL);
+ ret = i18n_measure_unit_create_square_yard(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_square_mile_p(void)
{
- int ret = i18n_measure_unit_create_square_mile(&measure_unit);
+ ret = i18n_measure_unit_create_square_mile(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "area";
+ const char *ref_subtype = "square-mile";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_square_mile_n(void)
{
- int ret = i18n_measure_unit_create_square_mile(NULL);
+ ret = i18n_measure_unit_create_square_mile(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_square_meter_p(void)
{
- int ret = i18n_measure_unit_create_square_meter(&measure_unit);
+ ret = i18n_measure_unit_create_square_meter(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "area";
+ const char *ref_subtype = "square-meter";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_square_meter_n(void)
{
- int ret = i18n_measure_unit_create_square_meter(NULL);
+ ret = i18n_measure_unit_create_square_meter(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_square_kilometer_p(void)
{
- int ret = i18n_measure_unit_create_square_kilometer(&measure_unit);
+ ret = i18n_measure_unit_create_square_kilometer(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "area";
+ const char *ref_subtype = "square-kilometer";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_square_kilometer_n(void)
{
- int ret = i18n_measure_unit_create_square_kilometer(NULL);
+ ret = i18n_measure_unit_create_square_kilometer(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_square_inch_p(void)
{
- int ret = i18n_measure_unit_create_square_inch(&measure_unit);
+ ret = i18n_measure_unit_create_square_inch(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "area";
+ const char *ref_subtype = "square-inch";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_square_inch_n(void)
{
- int ret = i18n_measure_unit_create_square_inch(NULL);
+ ret = i18n_measure_unit_create_square_inch(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_square_foot_p(void)
{
- int ret = i18n_measure_unit_create_square_foot(&measure_unit);
+ ret = i18n_measure_unit_create_square_foot(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "area";
+ const char *ref_subtype = "square-foot";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_square_foot_n(void)
{
- int ret = i18n_measure_unit_create_square_foot(NULL);
+ ret = i18n_measure_unit_create_square_foot(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_square_centimeter_p(void)
{
- int ret = i18n_measure_unit_create_square_centimeter(&measure_unit);
+ ret = i18n_measure_unit_create_square_centimeter(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "area";
+ const char *ref_subtype = "square-centimeter";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_square_centimeter_n(void)
{
- int ret = i18n_measure_unit_create_square_centimeter(NULL);
+ ret = i18n_measure_unit_create_square_centimeter(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_hectare_p(void)
{
- int ret = i18n_measure_unit_create_hectare(&measure_unit);
+ ret = i18n_measure_unit_create_hectare(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "area";
+ const char *ref_subtype = "hectare";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_hectare_n(void)
{
- int ret = i18n_measure_unit_create_hectare(NULL);
+ ret = i18n_measure_unit_create_hectare(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_acre_p(void)
{
- int ret = i18n_measure_unit_create_acre(&measure_unit);
+ ret = i18n_measure_unit_create_acre(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "area";
+ const char *ref_subtype = "acre";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_acre_n(void)
{
- int ret = i18n_measure_unit_create_acre(NULL);
+ ret = i18n_measure_unit_create_acre(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_radian_p(void)
{
- int ret = i18n_measure_unit_create_radian(&measure_unit);
+ ret = i18n_measure_unit_create_radian(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "angle";
+ const char *ref_subtype = "radian";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_radian_n(void)
{
- int ret = i18n_measure_unit_create_radian(NULL);
+ ret = i18n_measure_unit_create_radian(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_degree_p(void)
{
- int ret = i18n_measure_unit_create_degree(&measure_unit);
+ ret = i18n_measure_unit_create_degree(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "angle";
+ const char *ref_subtype = "degree";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_degree_n(void)
{
- int ret = i18n_measure_unit_create_degree(NULL);
+ ret = i18n_measure_unit_create_degree(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_arc_second_p(void)
{
- int ret = i18n_measure_unit_create_arc_second(&measure_unit);
+ ret = i18n_measure_unit_create_arc_second(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "angle";
+ const char *ref_subtype = "arc-second";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_arc_second_n(void)
{
- int ret = i18n_measure_unit_create_arc_second(NULL);
+ ret = i18n_measure_unit_create_arc_second(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_arc_minute_p(void)
{
- int ret = i18n_measure_unit_create_arc_minute(&measure_unit);
+ ret = i18n_measure_unit_create_arc_minute(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "angle";
+ const char *ref_subtype = "arc-minute";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_arc_minute_n(void)
{
- int ret = i18n_measure_unit_create_arc_minute(NULL);
+ ret = i18n_measure_unit_create_arc_minute(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_meter_per_second_squared_p(void)
{
- int ret = i18n_measure_unit_create_meter_per_second_squared(&measure_unit);
+ ret = i18n_measure_unit_create_meter_per_second_squared(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "acceleration";
+ const char *ref_subtype = "meter-per-second-squared";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_meter_per_second_squared_n(void)
{
- int ret = i18n_measure_unit_create_meter_per_second_squared(NULL);
+ ret = i18n_measure_unit_create_meter_per_second_squared(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_create_g_force_p(void)
{
- int ret = i18n_measure_unit_create_g_force(&measure_unit);
+ ret = i18n_measure_unit_create_g_force(&measure_unit);
assert_neq(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ const char *ref_type = "acceleration";
+ const char *ref_subtype = "g-force";
+
+ assert(!strcmp(type, ref_type));
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_g_force_n(void)
{
- int ret = i18n_measure_unit_create_g_force(NULL);
+ ret = i18n_measure_unit_create_g_force(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
return 0;
}
-bool measure_unit_available_types_cb(const char *type_id, void *user_data)
+static bool measure_unit_available_types_cb(const char *type_id, void *user_data)
{
fprintf(stderr, "type_id : %s\n", type_id);
return false;
*/
int utc_capi_base_utils_i18n_measure_unit_foreach_available_type_p(void)
{
- int ret = i18n_measure_unit_foreach_available_type(measure_unit_available_types_cb, NULL);
+ ret = i18n_measure_unit_foreach_available_type(measure_unit_available_types_cb, NULL);
assert_eq(ret, I18N_ERROR_NONE);
*/
int utc_capi_base_utils_i18n_measure_unit_foreach_available_type_n(void)
{
- int ret = i18n_measure_unit_foreach_available_type(NULL, NULL);
+ ret = i18n_measure_unit_foreach_available_type(NULL, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
int utc_capi_base_utils_i18n_measure_unit_get_available_with_type_p(void)
{
int32_t available = -1;
- const char *type = "Test string";
+ const char *type = "area";
i18n_measure_unit_h *dest_array = NULL;
int32_t dest_capacity = 3000;
- int ret = i18n_measure_unit_get_available_with_type(dest_capacity, type, &dest_array, &available);
+ ret = i18n_measure_unit_get_available_with_type(dest_capacity, type, &dest_array, &available);
if (available > dest_capacity) {
assert_eq(ret, I18N_ERROR_BUFFER_OVERFLOW);
i18n_measure_unit_h *dest_array = NULL;
int32_t dest_capacity = -1; // Invalid parameter
- int ret = i18n_measure_unit_get_available_with_type(dest_capacity, type, &dest_array, &available);
+ ret = i18n_measure_unit_get_available_with_type(dest_capacity, type, &dest_array, &available);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
i18n_measure_unit_h *dest_array = NULL;
int32_t dest_capacity = 3000;
- int ret = i18n_measure_unit_get_available_with_type(dest_capacity, NULL, &dest_array, &available);
+ ret = i18n_measure_unit_get_available_with_type(dest_capacity, NULL, &dest_array, &available);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
const char *type = "Test string";
int32_t dest_capacity = 3000;
- int ret = i18n_measure_unit_get_available_with_type(dest_capacity, type, NULL, &available);
+ ret = i18n_measure_unit_get_available_with_type(dest_capacity, type, NULL, &available);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
i18n_measure_unit_h *dest_array = NULL;
int32_t dest_capacity = 3000;
- int ret = i18n_measure_unit_get_available_with_type(dest_capacity, type, &dest_array, NULL);
+ ret = i18n_measure_unit_get_available_with_type(dest_capacity, type, &dest_array, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
i18n_measure_unit_h *dest_array = NULL;
int32_t dest_capacity = 3000;
- int ret = i18n_measure_unit_get_available(dest_capacity, &dest_array, &available);
+ ret = i18n_measure_unit_get_available(dest_capacity, &dest_array, &available);
if (available > dest_capacity) {
assert_eq(ret, I18N_ERROR_BUFFER_OVERFLOW);
i18n_measure_unit_h *dest_array = NULL;
int32_t dest_capacity = -1; // Invalid parameter
- int ret = i18n_measure_unit_get_available(dest_capacity, &dest_array, &available);
+ ret = i18n_measure_unit_get_available(dest_capacity, &dest_array, &available);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
int32_t available = -1;
int32_t dest_capacity = 1;
- int ret = i18n_measure_unit_get_available(dest_capacity, NULL, &available);
+ ret = i18n_measure_unit_get_available(dest_capacity, NULL, &available);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
i18n_measure_unit_h *dest_array = NULL;
int32_t dest_capacity = 1;
- int ret = i18n_measure_unit_get_available(dest_capacity, &dest_array, NULL);
+ ret = i18n_measure_unit_get_available(dest_capacity, &dest_array, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_get_subtype_p(void)
{
+ ret = i18n_measure_unit_create_megahertz(&measure_unit);
assert_neq(measure_unit, NULL);
- const char *subtype = NULL;
-
- int ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
+ assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_subtype(measure_unit, &subtype);
assert_neq(subtype, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ const char *ref_subtype = "megahertz";
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_get_subtype_n(void)
{
- const char *subtype = NULL;
-
- int ret = i18n_measure_unit_get_subtype(NULL, &subtype);
+ ret = i18n_measure_unit_get_subtype(NULL, &subtype);
assert_eq(subtype, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_get_subtype_n2(void)
{
+ ret = i18n_measure_unit_create_megahertz(&measure_unit);
assert_neq(measure_unit, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
- int ret = i18n_measure_unit_get_subtype(measure_unit, NULL);
+ ret = i18n_measure_unit_get_subtype(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_get_type_p(void)
{
+ ret = i18n_measure_unit_create_megahertz(&measure_unit);
assert_neq(measure_unit, NULL);
- const char *type = NULL;
-
- int ret = i18n_measure_unit_get_type(measure_unit, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &type);
assert_neq(type, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ const char *ref_type = "frequency";
+ assert(!strcmp(type, ref_type));
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_get_type_n(void)
{
- const char *type = NULL;
-
- int ret = i18n_measure_unit_get_type(NULL, &type);
+ ret = i18n_measure_unit_get_type(NULL, &type);
assert_eq(type, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_get_type_n2(void)
{
+ ret = i18n_measure_unit_create(&measure_unit);
+
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(measure_unit, NULL);
- int ret = i18n_measure_unit_get_type(measure_unit, NULL);
+ ret = i18n_measure_unit_get_type(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_destroy_p(void)
{
+ ret = i18n_measure_unit_create(&measure_unit);
+
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(measure_unit, NULL);
- int ret = i18n_measure_unit_destroy(measure_unit);
+ ret = i18n_measure_unit_destroy(measure_unit);
assert_eq(ret, I18N_ERROR_NONE);
measure_unit = NULL;
*/
int utc_capi_base_utils_i18n_measure_unit_destroy_n(void)
{
- int ret = i18n_measure_unit_destroy(NULL);
+ ret = i18n_measure_unit_destroy(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
return 0;
*/
int utc_capi_base_utils_i18n_measure_unit_clone_p(void)
{
+ ret = i18n_measure_unit_create_megahertz(&measure_unit);
assert_neq(measure_unit, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
+
i18n_measure_unit_h clone = NULL;
+ ret = i18n_measure_unit_clone(measure_unit, &clone);
+ assert_eq(ret, I18N_ERROR_NONE);
+ assert_neq(clone, NULL);
- int ret = i18n_measure_unit_clone(measure_unit, &clone);
+ ret = i18n_measure_unit_get_subtype(clone, &subtype);
- assert_neq(clone, NULL);
i18n_measure_unit_destroy(clone);
+
+ assert_neq(subtype, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ const char *ref_subtype = "megahertz";
+ assert(!strcmp(subtype, ref_subtype));
+
return 0;
}
{
i18n_measure_unit_h clone = NULL;
- int ret = i18n_measure_unit_clone(NULL, &clone);
+ ret = i18n_measure_unit_clone(NULL, &clone);
assert_eq(clone, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_unit_clone_n2(void)
{
+ ret = i18n_measure_unit_create(&measure_unit);
+
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(measure_unit, NULL);
- int ret = i18n_measure_unit_clone(measure_unit, NULL);
+ ret = i18n_measure_unit_clone(measure_unit, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
int utc_capi_base_utils_i18n_measure_unit_create_p(void)
{
i18n_measure_unit_h measure_unit = NULL;
- int ret = i18n_measure_unit_create(&measure_unit);
+ ret = i18n_measure_unit_create(&measure_unit);
+
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(measure_unit, NULL);
+
i18n_measure_unit_destroy(measure_unit);
- assert_eq(ret, I18N_ERROR_NONE);
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_unit_create_n(void)
{
- int ret = i18n_measure_unit_create(NULL);
+ ret = i18n_measure_unit_create(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
static i18n_measure_h measure = NULL;
static i18n_formattable_h formattable = NULL;
static i18n_measure_unit_h measure_unit = NULL;
+static char *ref_type;
+
+static i18n_measure_h measure_clone = NULL;
+static i18n_formattable_h formattable_clone = NULL;
+static i18n_measure_unit_h measure_unit_clone = NULL;
+static char *type = NULL;
+
+static int ret = I18N_ERROR_NONE;
/**
* @function utc_capi_base_utils_measure_startup
*/
void utc_capi_base_utils_measure_startup(void)
{
- i18n_formattable_create_default(&formattable);
- i18n_measure_unit_create(&measure_unit);
- i18n_measure_create(&measure, formattable, measure_unit);
+ int32_t value = 7;
+ ret = i18n_formattable_create_with_long(value, &formattable);
+ if (ret != I18N_ERROR_NONE) return;
+
+ ret = i18n_measure_unit_create_gigabit(&measure_unit);
+ if (ret != I18N_ERROR_NONE) return;
+
+ ret = i18n_measure_create(formattable, measure_unit, &measure);
}
/**
*/
void utc_capi_base_utils_measure_cleanup(void)
{
+ if (measure != NULL) {
+ i18n_measure_destroy(measure);
+ measure = NULL;
+
+ measure_unit = NULL;
+ formattable = NULL;
+ }
+
+ if (measure_unit != NULL) {
+ i18n_measure_unit_destroy(measure_unit);
+ measure_unit = NULL;
+ }
+
+ if (formattable != NULL) {
+ i18n_formattable_destroy(formattable);
+ formattable = NULL;
+ }
+
+ if (ref_type != NULL) {
+ free(ref_type);
+ ref_type = NULL;
+ }
+
+ if (measure_clone != NULL) {
+ i18n_measure_destroy(measure_clone);
+ measure_clone = NULL;
+
+ measure_unit_clone = NULL;
+ formattable_clone = NULL;
+ }
+
+ if (measure_unit_clone != NULL) {
+ i18n_measure_unit_destroy(measure_unit_clone);
+ measure_unit_clone = NULL;
+ }
+
+ if (formattable_clone != NULL) {
+ i18n_formattable_destroy(formattable_clone);
+ formattable_clone = NULL;
+ }
+
+ if (type != NULL) {
+ free(type);
+ type = NULL;
+ }
}
/**
*/
int utc_capi_base_utils_i18n_measure_get_unit_p(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(measure, NULL);
- i18n_measure_unit_h mu = NULL;
- int ret = i18n_measure_get_unit(measure, &mu);
+ ret = i18n_measure_get_unit(measure, &measure_unit_clone);
+ assert_neq(measure_unit_clone, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
- assert_neq(mu, NULL);
- i18n_measure_unit_destroy(mu);
+ ret = i18n_measure_unit_get_type(measure_unit_clone, &type);
assert_eq(ret, I18N_ERROR_NONE);
+ ret = i18n_measure_unit_get_type(measure_unit, &ref_type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ assert_eq(strncmp(type, ref_type, strlen(ref_type)), 0);
+
return 0;
}
{
i18n_measure_unit_h mu = NULL;
- int ret = i18n_measure_get_unit(NULL, &mu);
+ ret = i18n_measure_get_unit(NULL, &mu);
assert_eq(mu, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_get_unit_n2(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(measure, NULL);
- int ret = i18n_measure_get_unit(measure, NULL);
+ ret = i18n_measure_get_unit(measure, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_get_number_p(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(measure, NULL);
- i18n_formattable_h f = NULL;
+ assert_eq(formattable_clone, NULL);
- int ret = i18n_measure_get_number(measure, &f);
+ ret = i18n_measure_get_number(measure, &formattable_clone);
+ assert_neq(formattable_clone, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
- assert_neq(f, NULL);
+ bool equal = false;
+ ret = i18n_formattable_equal(formattable_clone, formattable, &equal);
assert_eq(ret, I18N_ERROR_NONE);
+ assert_eq(equal, true);
return 0;
}
{
i18n_formattable_h f = NULL;
- int ret = i18n_measure_get_number(NULL, &f);
+ ret = i18n_measure_get_number(NULL, &f);
assert_eq(f, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
* @description Calls i18n_measure_get_number passing invalid formattable and checks
* for an invalid parameter error code.
*/
-int utc_capi_base_utils_i18n_measure_get_number_n2(void) {
-
+int utc_capi_base_utils_i18n_measure_get_number_n2(void)
+{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(measure, NULL);
- int ret = i18n_measure_get_number(measure, NULL);
+ ret = i18n_measure_get_number(measure, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_destroy_p(void)
{
- i18n_measure_h measure = NULL;
- assert_neq(formattable, NULL);
- assert_neq(measure_unit, NULL);
-
- i18n_measure_create(&measure, formattable, measure_unit);
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(measure, NULL);
- int ret = i18n_measure_destroy(measure);
+ ret = i18n_measure_destroy(measure);
assert_eq(ret, I18N_ERROR_NONE);
+ measure_unit = NULL;
+ formattable = NULL;
+ measure = NULL;
+
return 0;
}
*/
int utc_capi_base_utils_i18n_measure_destroy_n(void)
{
- int ret = i18n_measure_destroy(NULL);
+ ret = i18n_measure_destroy(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_clone_p(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(measure, NULL);
- i18n_measure_h clone = NULL;
+ assert_eq(measure_clone, NULL);
+
+ ret = i18n_measure_clone(measure, &measure_clone);
+ assert_neq(measure_clone, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ assert_eq(measure_unit_clone, NULL);
+ ret = i18n_measure_get_unit(measure_clone, &measure_unit_clone);
+ assert_neq(measure_unit_clone, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ assert_eq(formattable_clone, NULL);
+ ret = i18n_measure_get_number(measure_clone, &formattable_clone);
+ assert_neq(formattable_clone, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
- int ret = i18n_measure_clone(measure, &clone);
+ ret = i18n_measure_unit_get_type(measure_unit_clone, &type);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_measure_unit_get_type(measure_unit, &ref_type);
+ assert_eq(ret, I18N_ERROR_NONE);
+ assert_eq(strncmp(type, ref_type, strlen(ref_type)), 0);
- assert_neq(clone, NULL);
+ bool equal = false;
+ ret = i18n_formattable_equal(formattable_clone, formattable, &equal);
assert_eq(ret, I18N_ERROR_NONE);
+ assert_eq(equal, true);
return 0;
}
{
i18n_measure_h clone = NULL;
- int ret = i18n_measure_clone(NULL, &clone);
+ ret = i18n_measure_clone(NULL, &clone);
assert_eq(clone, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_clone_n2(void)
{
+ assert_eq(ret, I18N_ERROR_NONE);
assert_neq(measure, NULL);
- int ret = i18n_measure_clone(measure, NULL);
+ ret = i18n_measure_clone(measure, NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_measure_create_p(void)
{
- i18n_measure_h measure = NULL;
- assert_neq(formattable, NULL);
+ utc_capi_base_utils_measure_cleanup();
+
+ ret = i18n_measure_unit_create(&measure_unit);
assert_neq(measure_unit, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ ret = i18n_formattable_create_default(&formattable);
+ assert_neq(formattable, NULL);
+ assert_eq(ret, I18N_ERROR_NONE);
- int ret = i18n_measure_create(&measure, formattable, measure_unit);
+ ret = i18n_measure_create(formattable, measure_unit, &measure);
assert_neq(measure, NULL);
- i18n_measure_destroy(measure);
assert_eq(ret, I18N_ERROR_NONE);
return 0;
assert_neq(formattable, NULL);
assert_neq(measure_unit, NULL);
- int ret = i18n_measure_create(NULL, formattable, measure_unit);
+ ret = i18n_measure_create(NULL, formattable, measure_unit);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
static int ret = I18N_ERROR_NONE;
static i18n_parse_position_h parse_position = NULL;
+static i18n_parse_position_h clone = NULL;
/**
* @function utc_capi_base_utils_parse_position_startup
i18n_parse_position_destroy(parse_position);
parse_position = NULL;
}
+
+ if(clone != NULL) {
+ i18n_parse_position_destroy(clone);
+ clone = NULL;
+ }
}
/**\r
* @description Calls i18n_parse_position_get_error_index and checks whether\r
* function succeeded.\r
*/
-int utc_capi_base_utils_i18n_parse_position_get_error_index_p(void) {
-
+int utc_capi_base_utils_i18n_parse_position_get_error_index_p(void)
+{
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(parse_position, NULL);
assert_eq(ret, I18N_ERROR_NONE);
- int32_t set_error_index;
+ int32_t set_error_index = -1;
ret = i18n_parse_position_get_error_index(parse_position, &set_error_index);
assert_eq(ret, I18N_ERROR_NONE);
assert_eq(set_error_index, error_index_to_set);
* @description Calls i18n_parse_position_get_error_index passing invalid\r
* parse_position and checks for an invalid parameter error code.\r
*/
-int utc_capi_base_utils_i18n_parse_position_get_error_index_n(void) {
-
+int utc_capi_base_utils_i18n_parse_position_get_error_index_n(void)
+{
i18n_parse_position_h local_parse_position = NULL; // Invalid parameter
- int32_t error_index;
+ int32_t error_index = -1;
ret = i18n_parse_position_get_error_index(local_parse_position, &error_index);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
* @description Calls i18n_parse_position_get_error_index passing invalid\r
* error_index and checks for an invalid parameter error code.\r
*/
-int utc_capi_base_utils_i18n_parse_position_get_error_index_n2(void) {
-
+int utc_capi_base_utils_i18n_parse_position_get_error_index_n2(void)
+{
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(parse_position, NULL);
* @description Calls i18n_parse_position_set_error_index and checks whether\r
* function succeeded.\r
*/
-int utc_capi_base_utils_i18n_parse_position_set_error_index_p(void) {
-
+int utc_capi_base_utils_i18n_parse_position_set_error_index_p(void)
+{
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(parse_position, NULL);
ret = i18n_parse_position_set_error_index(parse_position, error_index_to_set);
assert_eq(ret, I18N_ERROR_NONE);
- int32_t set_error_index;
+ int32_t set_error_index = -1;
ret = i18n_parse_position_get_error_index(parse_position, &set_error_index);
assert_eq(ret, I18N_ERROR_NONE);
* @description Calls i18n_parse_position_set_error_index passing invalid\r
* parse_position and checks for an invalid parameter error code.\r
*/
-int utc_capi_base_utils_i18n_parse_position_set_error_index_n(void) {
-
+int utc_capi_base_utils_i18n_parse_position_set_error_index_n(void)
+{
int32_t error_index = 13;
ret = i18n_parse_position_set_error_index(NULL, error_index);
* @description Calls i18n_parse_position_set_index and checks whether function\r
* succeeded.\r
*/
-int utc_capi_base_utils_i18n_parse_position_set_index_p(void) {
-
+int utc_capi_base_utils_i18n_parse_position_set_index_p(void)
+{
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(parse_position, NULL);
ret = i18n_parse_position_set_index(parse_position, index_to_set);
assert_eq(ret, I18N_ERROR_NONE);
- int32_t set_index;
+ int32_t set_index = -1;
ret = i18n_parse_position_get_index(parse_position, &set_index);
assert_eq(ret, I18N_ERROR_NONE);
assert_eq(set_index, index_to_set);
* @description Calls i18n_parse_position_set_index passing invalid parse_position\r
* and checks for an invalid parameter error code.\r
*/
-int utc_capi_base_utils_i18n_parse_position_set_index_n(void) {
-
+int utc_capi_base_utils_i18n_parse_position_set_index_n(void)
+{
int32_t index = 13;
ret = i18n_parse_position_set_index(NULL, index);
* @description Calls i18n_parse_position_get_index and checks whether function\r
* succeeded.\r
*/
-int utc_capi_base_utils_i18n_parse_position_get_index_p(void) {
-
+int utc_capi_base_utils_i18n_parse_position_get_index_p(void)
+{
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(parse_position, NULL);
ret = i18n_parse_position_set_index(parse_position, index_to_set);
assert_eq(ret, I18N_ERROR_NONE);
- int32_t set_index;
+ int32_t set_index = -1;
ret = i18n_parse_position_get_index(parse_position, &set_index);
assert_eq(ret, I18N_ERROR_NONE);
assert_eq(set_index, index_to_set);
* @description Calls i18n_parse_position_get_index passing invalid parse_position\r
* and checks for an invalid parameter error code.\r
*/
-int utc_capi_base_utils_i18n_parse_position_get_index_n(void) {
-
+int utc_capi_base_utils_i18n_parse_position_get_index_n(void)
+{
i18n_parse_position_h local_parse_position = NULL; // Invalid parameter
- int32_t index;
+ int32_t index = -1;
ret = i18n_parse_position_get_index(local_parse_position, &index);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
* @description Calls i18n_parse_position_get_index passing invalid index and checks\r
* for an invalid parameter error code.\r
*/
-int utc_capi_base_utils_i18n_parse_position_get_index_n2(void) {
-
+int utc_capi_base_utils_i18n_parse_position_get_index_n2(void)
+{
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(parse_position, NULL);
* @since_tizen 3.0\r
* @description Calls i18n_parse_position_clone and checks whether function succeeded.\r
*/
-int utc_capi_base_utils_i18n_parse_position_clone_p(void) {
-
+int utc_capi_base_utils_i18n_parse_position_clone_p(void)
+{
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(parse_position, NULL);
- i18n_parse_position_h clone = NULL;
+ int32_t error_index = 7;
+ ret = i18n_parse_position_set_error_index(parse_position, error_index);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ int32_t index = 13;
+ ret = i18n_parse_position_set_index(parse_position, index);
+ assert_eq(ret, I18N_ERROR_NONE);
ret = i18n_parse_position_clone(parse_position, &clone);
assert_neq(clone, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ int32_t ret_error_index = -2;
+ ret = i18n_parse_position_get_error_index(clone, &ret_error_index);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ int32_t ret_index = -2;
+ ret = i18n_parse_position_get_index(clone, &ret_index);
+ assert_eq(ret, I18N_ERROR_NONE);
+
+ assert_eq(ret_error_index, error_index);
+ assert_eq(ret_index, index);
+
return 0;
}
* @description Calls i18n_parse_position_clone passing invalid parse_position and\r
* checks for an invalid parameter error code.\r
*/
-int utc_capi_base_utils_i18n_parse_position_clone_n(void) {
-
+int utc_capi_base_utils_i18n_parse_position_clone_n(void)
+{
i18n_parse_position_h local_parse_position = NULL; // Invalid parameter
i18n_parse_position_h clone = NULL;
* @description Calls i18n_parse_position_clone passing invalid clone and checks for\r
* an invalid parameter error code.\r
*/
-int utc_capi_base_utils_i18n_parse_position_clone_n2(void) {
-
+int utc_capi_base_utils_i18n_parse_position_clone_n2(void)
+{
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(parse_position, NULL);
* @description Calls i18n_parse_position_destroy and checks whether function\r
* succeeded.\r
*/
-int utc_capi_base_utils_i18n_parse_position_destroy_p(void) {
-
+int utc_capi_base_utils_i18n_parse_position_destroy_p(void)
+{
assert_eq(ret, I18N_ERROR_NONE);
assert_neq(parse_position, NULL);
* @description Calls i18n_parse_position_destroy passing invalid parse_position and\r
* checks for an invalid parameter error code.\r
*/
-int utc_capi_base_utils_i18n_parse_position_destroy_n(void) {
-
+int utc_capi_base_utils_i18n_parse_position_destroy_n(void)
+{
i18n_parse_position_h local_parse_position = NULL; // Invalid parameter
ret = i18n_parse_position_destroy(local_parse_position);
* @description Calls i18n_parse_position_create_with_index and checks whether\r
* function succeeded.\r
*/
-int utc_capi_base_utils_i18n_parse_position_create_with_index_p(void) {
-
+int utc_capi_base_utils_i18n_parse_position_create_with_index_p(void)
+{
i18n_parse_position_h local_parse_position = NULL;
int32_t new_index = 13;
assert_neq(local_parse_position, NULL);
assert_eq(ret, I18N_ERROR_NONE);
+ int32_t ret_index;
+ ret = i18n_parse_position_get_index(local_parse_position, &ret_index);
+
+ i18n_parse_position_destroy(local_parse_position);
+
+ assert_eq(ret, I18N_ERROR_NONE);
+ assert_eq(ret_index, new_index);
+
return 0;
}
* @description Calls i18n_parse_position_create_with_index passing invalid\r
* parse_position and checks for an invalid parameter error code.\r
*/
-int utc_capi_base_utils_i18n_parse_position_create_with_index_n(void) {
-
+int utc_capi_base_utils_i18n_parse_position_create_with_index_n(void)
+{
int32_t new_index = 13;
ret = i18n_parse_position_create_with_index(new_index, NULL);
* @description Calls i18n_parse_position_create and checks whether function\r
* succeeded.\r
*/
-int utc_capi_base_utils_i18n_parse_position_create_p(void) {
-
+int utc_capi_base_utils_i18n_parse_position_create_p(void)
+{
i18n_parse_position_h local_parse_position = NULL;
ret = i18n_parse_position_create(&local_parse_position);
* @description Calls i18n_parse_position_create passing invalid parse_position and\r
* checks for an invalid parameter error code.\r
*/
-int utc_capi_base_utils_i18n_parse_position_create_n(void) {
-
+int utc_capi_base_utils_i18n_parse_position_create_n(void)
+{
ret = i18n_parse_position_create(NULL);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);