static i18n_uchar32 start = 0x41;
static i18n_uchar32 end = 0x50;
static i18n_uchar *upattern = NULL;
-const i18n_uchar str[] = { 'm', 'a', 'r', 'k', '\0' };
+const i18n_uchar str[] = {'m', 'a', 'r', 'k', '\0'};
/**
* @function utc_capi_base_utils_uset_startup
*/
void utc_capi_base_utils_uset_cleanup(void)
{
- if (upattern) {
+ if (upattern)
+ {
free(upattern);
upattern = NULL;
}
{
const char *pattern = "[:Hyphen:]";
i18n_uchar *_pattern = NULL;
- _pattern = (i18n_uchar*)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+ _pattern = (i18n_uchar *)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
i18n_ustring_copy_ua(_pattern, pattern);
ret = i18n_uset_create_pattern(_pattern, 10, &uset);
{
char *pattern = "[:Hyphen:]";
i18n_uchar *_pattern = NULL;
- _pattern = (i18n_uchar*)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+ _pattern = (i18n_uchar *)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
i18n_ustring_copy_ua(_pattern, pattern);
ret = i18n_uset_create_pattern(_pattern, -2, &uset);
{
char *pattern = "[:Hyphen:]";
i18n_uchar *_pattern = NULL;
- _pattern = (i18n_uchar*)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+ _pattern = (i18n_uchar *)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
i18n_ustring_copy_ua(_pattern, pattern);
ret = i18n_uset_create_pattern(_pattern, 10, NULL);
{
char *pattern = "[:Hyphen:]";
i18n_uchar *_pattern = NULL;
- _pattern = (i18n_uchar*)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+ _pattern = (i18n_uchar *)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
i18n_ustring_copy_ua(_pattern, pattern);
ret = i18n_uset_create_pattern_options(_pattern, 10, I18N_USET_IGNORE_SPACE, &uset);
{
const char *pattern = "[:Hyphen:]";
i18n_uchar *_pattern = NULL;
- _pattern = (i18n_uchar*)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+ _pattern = (i18n_uchar *)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
i18n_ustring_copy_ua(_pattern, pattern);
ret = i18n_uset_create_pattern_options(_pattern, -2, I18N_USET_IGNORE_SPACE, &uset);
{
const char *pattern = "[:Hyphen:]";
i18n_uchar *_pattern = NULL;
- _pattern = (i18n_uchar*)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+ _pattern = (i18n_uchar *)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
i18n_ustring_copy_ua(_pattern, pattern);
ret = i18n_uset_create_pattern_options(_pattern, 10, -1, &uset);
{
const char *pattern = "[:Hyphen:]";
i18n_uchar *_pattern = NULL;
- _pattern = (i18n_uchar*)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+ _pattern = (i18n_uchar *)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
i18n_ustring_copy_ua(_pattern, pattern);
ret = i18n_uset_create_pattern_options(_pattern, 10, I18N_USET_IGNORE_SPACE, NULL);
assert_neq(uset, NULL);
const char *pattern = "[:Hyphen:]";
- upattern = (i18n_uchar*)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+ upattern = (i18n_uchar *)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
i18n_ustring_copy_ua(upattern, pattern);
ret = get_last_result();
assert_eq(ret, I18N_ERROR_NONE);
{
const char *pattern = "[:Hyphen:]";
- upattern = (i18n_uchar*)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+ upattern = (i18n_uchar *)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
i18n_ustring_copy_ua(upattern, pattern);
ret = get_last_result();
assert_eq(ret, I18N_ERROR_NONE);
{
const char *pattern = "[:Hyphen:]";
- upattern = (i18n_uchar*)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+ upattern = (i18n_uchar *)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
i18n_ustring_copy_ua(upattern, pattern);
ret = get_last_result();
assert_eq(ret, I18N_ERROR_NONE);
{
const char *pattern = "[:Hyphen:]";
- upattern = (i18n_uchar*)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+ upattern = (i18n_uchar *)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
i18n_ustring_copy_ua(upattern, pattern);
ret = get_last_result();
assert_eq(ret, I18N_ERROR_NONE);
int utc_capi_base_utils_i18n_uset_apply_int_property_value_n(void)
{
i18n_uchar_uproperty_e prop = I18N_UCHAR_ALPHABETIC;
- int32_t value = (int32_t)false;
+ int32_t value = (int32_t) false;
ret = i18n_uset_apply_int_property_value(NULL, prop, value);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
*/
int utc_capi_base_utils_i18n_uset_apply_int_property_value_n2(void)
{
- int32_t value = (int32_t)false;
+ int32_t value = (int32_t) false;
- ret = i18n_uset_apply_int_property_value(uset, -1, value);
+ ret = i18n_uset_apply_int_property_value(uset, I18N_UCHAR_INVALID_CODE, value);
+ assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+ ret = i18n_uset_apply_int_property_value(uset, I18N_UCHAR_MASK_LIMIT, value);
+ assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+ ret = i18n_uset_apply_int_property_value(uset, I18N_UCHAR_INT_START, I18N_UCHAR_INVALID_CODE);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
return 0;
*/
int utc_capi_base_utils_i18n_uset_apply_property_alias_p(void)
{
- const i18n_uchar prop[] = { 0x6C, 0x62, 0x0 }; /* "lb" */
+ const i18n_uchar prop[] = {0x6C, 0x62, 0x0}; /* "lb" */
int32_t prop_length = 3;
- const i18n_uchar value[] = { 0x53, 0x50, 0x0 }; /* "SP" */
+ const i18n_uchar value[] = {0x53, 0x50, 0x0}; /* "SP" */
int32_t value_length = 3;
ret = i18n_uset_apply_property_alias(uset, prop, prop_length, value, value_length);
*/
int utc_capi_base_utils_i18n_uset_apply_property_alias_n(void)
{
- const i18n_uchar prop[] = { 0x6C, 0x62, 0x0 }; /* "lb" */
+ const i18n_uchar prop[] = {0x6C, 0x62, 0x0}; /* "lb" */
int32_t prop_length = -1;
- const i18n_uchar value[] = { 0x53, 0x50, 0x0 }; /* "SP" */
+ const i18n_uchar value[] = {0x53, 0x50, 0x0}; /* "SP" */
int32_t value_length = -1;
ret = i18n_uset_apply_property_alias(NULL, prop, prop_length, value, value_length);
int utc_capi_base_utils_i18n_uset_apply_property_alias_n2(void)
{
int32_t prop_length = -1;
- const i18n_uchar value[] = { 0x53, 0x50, 0x0 }; /* "SP" */
+ const i18n_uchar value[] = {0x53, 0x50, 0x0}; /* "SP" */
int32_t value_length = -1;
ret = i18n_uset_apply_property_alias(uset, NULL, prop_length, value, value_length);
*/
int utc_capi_base_utils_i18n_uset_apply_property_alias_n3(void)
{
- const i18n_uchar prop[] = { 0x6C, 0x62, 0x0 }; /* "lb" */
- const i18n_uchar value[] = { 0x53, 0x50, 0x0 }; /* "SP" */
+ const i18n_uchar prop[] = {0x6C, 0x62, 0x0}; /* "lb" */
+ const i18n_uchar value[] = {0x53, 0x50, 0x0}; /* "SP" */
int32_t value_length = -1;
ret = i18n_uset_apply_property_alias(uset, prop, -2, value, value_length);
*/
int utc_capi_base_utils_i18n_uset_apply_property_alias_n4(void)
{
- const i18n_uchar prop[] = { 0x6C, 0x62, 0x0 }; /* "lb" */
+ const i18n_uchar prop[] = {0x6C, 0x62, 0x0}; /* "lb" */
int32_t prop_length = -1;
int32_t value_length = -1;
*/
int utc_capi_base_utils_i18n_uset_apply_property_alias_n5(void)
{
- const i18n_uchar prop[] = { 0x6C, 0x62, 0x0 }; /* "lb" */
+ const i18n_uchar prop[] = {0x6C, 0x62, 0x0}; /* "lb" */
int32_t prop_length = -1;
- const i18n_uchar value[] = { 0x53, 0x50, 0x0 }; /* "SP" */
+ const i18n_uchar value[] = {0x53, 0x50, 0x0}; /* "SP" */
ret = i18n_uset_apply_property_alias(uset, prop, prop_length, value, -2);
assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
int32_t upattern_length = -1;
int32_t pos = 0;
- upattern = (i18n_uchar*)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+ upattern = (i18n_uchar *)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
i18n_ustring_copy_ua(upattern, pattern);
i18n_uset_resembles_pattern(upattern, upattern_length, pos);
i18n_uchar *upattern = NULL;
int32_t pos = 0;
- upattern = (i18n_uchar*)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+ upattern = (i18n_uchar *)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
i18n_ustring_copy_ua(upattern, pattern);
i18n_uset_resembles_pattern(upattern, -2, pos);
i18n_uchar *upattern = NULL;
int32_t upattern_length = -1;
- upattern = (i18n_uchar*)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+ upattern = (i18n_uchar *)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
i18n_ustring_copy_ua(upattern, pattern);
i18n_uset_resembles_pattern(upattern, upattern_length, -1);
*/
int utc_capi_base_utils_i18n_uset_to_pattern_p(void)
{
- i18n_uchar res[12] = { 0, };
+ i18n_uchar res[12] = {
+ 0,
+ };
int32_t res_capacity = sizeof(res) / sizeof(res[0]);
i18n_ubool escape_unprintable = true;
*/
int utc_capi_base_utils_i18n_uset_to_pattern_n(void)
{
- i18n_uchar res[12] = { 0, };
+ i18n_uchar res[12] = {
+ 0,
+ };
int32_t res_capacity = sizeof(res) / sizeof(res[0]);
i18n_ubool escape_unprintable = true;
*/
int utc_capi_base_utils_i18n_uset_to_pattern_n2(void)
{
- i18n_uchar res[12] = { 0, };
+ i18n_uchar res[12] = {
+ 0,
+ };
int32_t res_capacity = sizeof(res) / sizeof(res[0]);
i18n_ubool escape_unprintable = true;
*/
int utc_capi_base_utils_i18n_uset_to_pattern_n3(void)
{
- i18n_uchar res[12] = { 0, };
+ i18n_uchar res[12] = {
+ 0,
+ };
i18n_ubool escape_unprintable = true;
i18n_uset_to_pattern(uset, res, -1, escape_unprintable);
int32_t item_index = 0;
i18n_uchar32 start = 0;
i18n_uchar32 end = 0;
- i18n_uchar str[12] = { 0, };
+ i18n_uchar str[12] = {
+ 0,
+ };
int32_t str_capacity = sizeof(str) / sizeof(str[0]);
i18n_uset_get_item(uset, item_index, &start, &end, str, str_capacity);
int32_t item_index = 0;
i18n_uchar32 start = 0;
i18n_uchar32 end = 0;
- i18n_uchar str[12] = { 0, };
+ i18n_uchar str[12] = {
+ 0,
+ };
int32_t str_capacity = sizeof(str) / sizeof(str[0]);
i18n_uset_get_item(NULL, item_index, &start, &end, str, str_capacity);
{
i18n_uchar32 start = 0;
i18n_uchar32 end = 0;
- i18n_uchar str[12] = { 0, };
+ i18n_uchar str[12] = {
+ 0,
+ };
int32_t str_capacity = sizeof(str) / sizeof(str[0]);
i18n_uset_get_item(uset, -1, &start, &end, str, str_capacity);
{
int32_t item_index = 0;
i18n_uchar32 end = 0;
- i18n_uchar str[12] = { 0, };
+ i18n_uchar str[12] = {
+ 0,
+ };
int32_t str_capacity = sizeof(str) / sizeof(str[0]);
i18n_uset_get_item(uset, item_index, NULL, &end, str, str_capacity);
{
int32_t item_index = 0;
i18n_uchar32 start = 0;
- i18n_uchar str[12] = { 0, };
+ i18n_uchar str[12] = {
+ 0,
+ };
int32_t str_capacity = sizeof(str) / sizeof(str[0]);
i18n_uset_get_item(uset, item_index, &start, NULL, str, str_capacity);
int32_t item_index = 0;
i18n_uchar32 start = 0;
i18n_uchar32 end = 0;
- i18n_uchar str[12] = { 0, };
+ i18n_uchar str[12] = {
+ 0,
+ };
int32_t str_capacity = sizeof(str) / sizeof(str[0]);
i18n_uset_get_item(uset, item_index, &start, &end, NULL, str_capacity);
int32_t item_index = 0;
i18n_uchar32 start = 0;
i18n_uchar32 end = 0;
- i18n_uchar str[12] = { 0, };
+ i18n_uchar str[12] = {
+ 0,
+ };
i18n_uset_get_item(uset, item_index, &start, &end, str, -2);
*/
int utc_capi_base_utils_i18n_uset_span_p(void)
{
- const i18n_uchar s[] = { 'q', 'w', 'e', 'r', '\0' };
+ const i18n_uchar s[] = {'q', 'w', 'e', 'r', '\0'};
int32_t length = -1;
i18n_uset_span_condition_e span_condition = I18N_USET_SPAN_NOT_CONTAINED;
*/
int utc_capi_base_utils_i18n_uset_span_n(void)
{
- const i18n_uchar s[] = { 'q', 'w', 'e', 'r', '\0' };
+ const i18n_uchar s[] = {'q', 'w', 'e', 'r', '\0'};
int32_t length = -1;
i18n_uset_span_condition_e span_condition = I18N_USET_SPAN_NOT_CONTAINED;
*/
int utc_capi_base_utils_i18n_uset_span_n3(void)
{
- const i18n_uchar s[] = { 'q', 'w', 'e', 'r', '\0' };
+ const i18n_uchar s[] = {'q', 'w', 'e', 'r', '\0'};
i18n_uset_span_condition_e span_condition = I18N_USET_SPAN_NOT_CONTAINED;
i18n_uset_span(uset, s, -2, span_condition);
*/
int utc_capi_base_utils_i18n_uset_span_back_p(void)
{
- const i18n_uchar s[] = { 'q', 'w', 'e', 'r', '\0' };
+ const i18n_uchar s[] = {'q', 'w', 'e', 'r', '\0'};
int32_t length = -1;
i18n_uset_span_condition_e span_condition = I18N_USET_SPAN_NOT_CONTAINED;
*/
int utc_capi_base_utils_i18n_uset_span_back_n(void)
{
- const i18n_uchar s[] = { 'q', 'w', 'e', 'r', '\0' };
+ const i18n_uchar s[] = {'q', 'w', 'e', 'r', '\0'};
int32_t length = -1;
i18n_uset_span_condition_e span_condition = I18N_USET_SPAN_NOT_CONTAINED;
*/
int utc_capi_base_utils_i18n_uset_span_back_n3(void)
{
- const i18n_uchar s[] = { 'q', 'w', 'e', 'r', '\0' };
+ const i18n_uchar s[] = {'q', 'w', 'e', 'r', '\0'};
i18n_uset_span_condition_e span_condition = I18N_USET_SPAN_NOT_CONTAINED;
i18n_uset_span_back(uset, s, -2, span_condition);
*/
int utc_capi_base_utils_i18n_uset_span_back_n4(void)
{
- const i18n_uchar s[] = { 'q', 'w', 'e', 'r', '\0' };
+ const i18n_uchar s[] = {'q', 'w', 'e', 'r', '\0'};
int32_t length = -1;
i18n_uset_span_back(uset, s, length, -1);
*/
int utc_capi_base_utils_i18n_uset_serialize_p(void)
{
- uint16_t dest[48] = { 0, };
+ uint16_t dest[48] = {
+ 0,
+ };
int32_t dest_capacity = sizeof(dest) / sizeof(dest[0]);
i18n_uset_serialize(uset, dest, dest_capacity);
*/
int utc_capi_base_utils_i18n_uset_serialize_n(void)
{
- uint16_t dest[48] = { 0, };
+ uint16_t dest[48] = {
+ 0,
+ };
int32_t dest_capacity = sizeof(dest) / sizeof(dest[0]);
i18n_uset_serialize(NULL, dest, dest_capacity);
*/
int utc_capi_base_utils_i18n_uset_serialize_n2(void)
{
- uint16_t dest[48] = { 0, };
+ uint16_t dest[48] = {
+ 0,
+ };
int32_t dest_capacity = sizeof(dest) / sizeof(dest[0]);
i18n_uset_serialize(uset, NULL, dest_capacity);
*/
int utc_capi_base_utils_i18n_uset_serialize_n3(void)
{
- uint16_t dest[48] = { 0, };
+ uint16_t dest[48] = {
+ 0,
+ };
i18n_uset_serialize(uset, dest, -1);
*/
int utc_capi_base_utils_i18n_uset_get_serialized_set_p(void)
{
- uint16_t dest[48] = { 0, };
+ uint16_t dest[48] = {
+ 0,
+ };
int32_t dest_capacity = sizeof(dest) / sizeof(dest[0]);
i18n_uset_serialize(uset, dest, dest_capacity);
*/
int utc_capi_base_utils_i18n_uset_get_serialized_set_n(void)
{
- uint16_t dest[48] = { 0, };
+ uint16_t dest[48] = {
+ 0,
+ };
int32_t dest_capacity = sizeof(dest) / sizeof(dest[0]);
i18n_userialized_set_s fill_set;
*/
int utc_capi_base_utils_i18n_uset_get_serialized_set_n2(void)
{
- uint16_t dest[48] = { 0, };
+ uint16_t dest[48] = {
+ 0,
+ };
int32_t dest_capacity = sizeof(dest) / sizeof(dest[0]);
i18n_uset_serialize(uset, dest, dest_capacity);
*/
int utc_capi_base_utils_i18n_uset_get_serialized_set_n3(void)
{
- uint16_t dest[48] = { 0, };
+ uint16_t dest[48] = {
+ 0,
+ };
int32_t dest_capacity = sizeof(dest) / sizeof(dest[0]);
i18n_uset_serialize(uset, dest, dest_capacity);
*/
int utc_capi_base_utils_i18n_uset_serialized_contains_p(void)
{
- uint16_t dest[48] = { 0, };
+ uint16_t dest[48] = {
+ 0,
+ };
int32_t dest_capacity = sizeof(dest) / sizeof(dest[0]);
i18n_uset_serialize(uset, dest, dest_capacity);
*/
int utc_capi_base_utils_i18n_uset_get_serialized_range_count_p(void)
{
- uint16_t dest[48] = { 0, };
+ uint16_t dest[48] = {
+ 0,
+ };
int32_t dest_capacity = sizeof(dest) / sizeof(dest[0]);
i18n_uset_serialize(uset, dest, dest_capacity);
*/
int utc_capi_base_utils_i18n_uset_get_serialized_range_p(void)
{
- uint16_t dest[48] = { 0, };
+ uint16_t dest[48] = {
+ 0,
+ };
int32_t dest_capacity = sizeof(dest) / sizeof(dest[0]);
i18n_uset_serialize(uset, dest, dest_capacity);
*/
int utc_capi_base_utils_i18n_uset_get_serialized_range_n2(void)
{
- uint16_t dest[48] = { 0, };
+ uint16_t dest[48] = {
+ 0,
+ };
int32_t dest_capacity = sizeof(dest) / sizeof(dest[0]);
i18n_uset_serialize(uset, dest, dest_capacity);
*/
int utc_capi_base_utils_i18n_uset_get_serialized_range_n3(void)
{
- uint16_t dest[48] = { 0, };
+ uint16_t dest[48] = {
+ 0,
+ };
int32_t dest_capacity = sizeof(dest) / sizeof(dest[0]);
i18n_uset_serialize(uset, dest, dest_capacity);
*/
int utc_capi_base_utils_i18n_uset_get_serialized_range_n4(void)
{
- uint16_t dest[48] = { 0, };
+ uint16_t dest[48] = {
+ 0,
+ };
int32_t dest_capacity = sizeof(dest) / sizeof(dest[0]);
i18n_uset_serialize(uset, dest, dest_capacity);