int32_t *buf_size_language)
{
retv_if(buf_size_language == NULL || language == NULL, I18N_ERROR_INVALID_PARAMETER);
+// retv_if(language_capacity < 0, I18N_ERROR_INVALID_PARAMETER);
UErrorCode icu_error = U_ZERO_ERROR;
*buf_size_language = uloc_getLanguage(locale_id, language, language_capacity, &icu_error);
assert_eq(ret, I18N_ERROR_NONE);
const char *ref_type = "pressure";
- const char *ref_subtype = "pound-per-square-inch";
+ const char *ref_subtype = "pound-force-per-square-inch";
assert(!strcmp(type, ref_type));
assert(!strcmp(subtype, ref_subtype));
assert_eq(ret, I18N_ERROR_NONE);
const char *ref_type = "pressure";
- const char *ref_subtype = "millimeter-of-mercury";
+ const char *ref_subtype = "millimeter-ofhg";
assert(!strcmp(type, ref_type));
assert(!strcmp(subtype, ref_subtype));
assert_eq(ret, I18N_ERROR_NONE);
const char *ref_type = "pressure";
- const char *ref_subtype = "inch-hg";
+ const char *ref_subtype = "inch-ofhg";
assert(!strcmp(type, ref_type));
assert(!strcmp(subtype, ref_subtype));
assert_eq(ret, I18N_ERROR_NONE);
const char *ref_type = "acceleration";
- const char *ref_subtype = "meter-per-second-squared";
+ const char *ref_subtype = "meter-per-square-second";
assert(!strcmp(type, ref_type));
assert(!strcmp(subtype, ref_subtype));
char language[I18N_LANG_CAPACITY];
int32_t buf_size_language;
- ret = i18n_ulocale_get_language(NULL, language, -1, &buf_size_language);
+ ret = i18n_ulocale_get_language(NULL, language, 0, &buf_size_language);
assert_eq(ret, I18N_ERROR_BUFFER_OVERFLOW);
return 0;