Lines Matching refs:um

161 static ssize_t utf8len(const struct unicode_map *um, enum utf8_normalization n,  in utf8len()  argument
164 return utf8nlen(um, n, s, (size_t)-1); in utf8len()
167 static int utf8cursor(struct utf8cursor *u8c, const struct unicode_map *um, in utf8cursor() argument
170 return utf8ncursor(u8c, um, n, s, (unsigned int)-1); in utf8cursor()
173 static void check_utf8_nfdi(struct unicode_map *um) in check_utf8_nfdi() argument
184 test((utf8len(um, UTF8_NFDI, nfdi_test_data[i].str) == nlen)); in check_utf8_nfdi()
185 test((utf8nlen(um, UTF8_NFDI, nfdi_test_data[i].str, len) == in check_utf8_nfdi()
188 if (utf8cursor(&u8c, um, UTF8_NFDI, nfdi_test_data[i].str) < 0) in check_utf8_nfdi()
202 static void check_utf8_nfdicf(struct unicode_map *um) in check_utf8_nfdicf() argument
213 test((utf8len(um, UTF8_NFDICF, nfdicf_test_data[i].str) == in check_utf8_nfdicf()
215 test((utf8nlen(um, UTF8_NFDICF, nfdicf_test_data[i].str, len) == in check_utf8_nfdicf()
218 if (utf8cursor(&u8c, um, UTF8_NFDICF, in check_utf8_nfdicf()
258 static void check_supported_versions(struct unicode_map *um) in check_supported_versions() argument
261 test(utf8version_is_supported(um, UNICODE_AGE(7, 0, 0))); in check_supported_versions()
264 test(utf8version_is_supported(um, UNICODE_AGE(9, 0, 0))); in check_supported_versions()
267 test(utf8version_is_supported(um, UTF8_LATEST)); in check_supported_versions()
270 test(!utf8version_is_supported(um, UNICODE_AGE(13, 0, 0))); in check_supported_versions()
271 test(!utf8version_is_supported(um, UNICODE_AGE(0, 0, 0))); in check_supported_versions()
272 test(!utf8version_is_supported(um, UNICODE_AGE(-1, -1, -1))); in check_supported_versions()
277 struct unicode_map *um; in init_test_ucd() local
282 um = utf8_load(UTF8_LATEST); in init_test_ucd()
283 if (IS_ERR(um)) { in init_test_ucd()
285 return PTR_ERR(um); in init_test_ucd()
288 check_supported_versions(um); in init_test_ucd()
289 check_utf8_nfdi(um); in init_test_ucd()
290 check_utf8_nfdicf(um); in init_test_ucd()
291 check_utf8_comparisons(um); in init_test_ucd()
298 utf8_unload(um); in init_test_ucd()