feat: Add unittest case at ucnv 11/273911/1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 15 Apr 2022 02:43:09 +0000 (11:43 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 15 Apr 2022 05:50:53 +0000 (14:50 +0900)
- Add unittest case
  utc_capi_base_utils_i18n_ucnv_create_package_n()

Change-Id: Iadbbd5206c2028de0dd4f2f3186d0e4b6120b04b

tests/tct-base-utils-core_mobile.h
tests/tct-base-utils-core_tizeniot.h
tests/tct-base-utils-core_wearable.h
tests/tct-base-utils_utc_common.h
tests/utc-capi-base-utils-ucnv.c

index 8849008..eaa65fb 100644 (file)
@@ -2446,6 +2446,7 @@ testcase tc_array[] = {
        {"utc_capi_base_utils_i18n_ucnv_create_unicode_n1", utc_capi_base_utils_i18n_ucnv_create_unicode_n1, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
        {"utc_capi_base_utils_i18n_ucnv_create_unicode_n2", utc_capi_base_utils_i18n_ucnv_create_unicode_n2, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
        {"utc_capi_base_utils_i18n_ucnv_create_ccsid_p", utc_capi_base_utils_i18n_ucnv_create_ccsid_p, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
+       {"utc_capi_base_utils_i18n_ucnv_create_package_n", utc_capi_base_utils_i18n_ucnv_create_package_n, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
        {"utc_capi_base_utils_i18n_ucnv_create_ccsid_n1", utc_capi_base_utils_i18n_ucnv_create_ccsid_n1, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
        {"utc_capi_base_utils_i18n_ucnv_create_ccsid_n2", utc_capi_base_utils_i18n_ucnv_create_ccsid_n2, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
        {"utc_capi_base_utils_i18n_ucnv_safe_clone_p", utc_capi_base_utils_i18n_ucnv_safe_clone_p, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
index 8849008..eaa65fb 100755 (executable)
@@ -2446,6 +2446,7 @@ testcase tc_array[] = {
        {"utc_capi_base_utils_i18n_ucnv_create_unicode_n1", utc_capi_base_utils_i18n_ucnv_create_unicode_n1, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
        {"utc_capi_base_utils_i18n_ucnv_create_unicode_n2", utc_capi_base_utils_i18n_ucnv_create_unicode_n2, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
        {"utc_capi_base_utils_i18n_ucnv_create_ccsid_p", utc_capi_base_utils_i18n_ucnv_create_ccsid_p, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
+       {"utc_capi_base_utils_i18n_ucnv_create_package_n", utc_capi_base_utils_i18n_ucnv_create_package_n, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
        {"utc_capi_base_utils_i18n_ucnv_create_ccsid_n1", utc_capi_base_utils_i18n_ucnv_create_ccsid_n1, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
        {"utc_capi_base_utils_i18n_ucnv_create_ccsid_n2", utc_capi_base_utils_i18n_ucnv_create_ccsid_n2, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
        {"utc_capi_base_utils_i18n_ucnv_safe_clone_p", utc_capi_base_utils_i18n_ucnv_safe_clone_p, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
index 8849008..eaa65fb 100644 (file)
@@ -2446,6 +2446,7 @@ testcase tc_array[] = {
        {"utc_capi_base_utils_i18n_ucnv_create_unicode_n1", utc_capi_base_utils_i18n_ucnv_create_unicode_n1, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
        {"utc_capi_base_utils_i18n_ucnv_create_unicode_n2", utc_capi_base_utils_i18n_ucnv_create_unicode_n2, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
        {"utc_capi_base_utils_i18n_ucnv_create_ccsid_p", utc_capi_base_utils_i18n_ucnv_create_ccsid_p, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
+       {"utc_capi_base_utils_i18n_ucnv_create_package_n", utc_capi_base_utils_i18n_ucnv_create_package_n, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
        {"utc_capi_base_utils_i18n_ucnv_create_ccsid_n1", utc_capi_base_utils_i18n_ucnv_create_ccsid_n1, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
        {"utc_capi_base_utils_i18n_ucnv_create_ccsid_n2", utc_capi_base_utils_i18n_ucnv_create_ccsid_n2, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
        {"utc_capi_base_utils_i18n_ucnv_safe_clone_p", utc_capi_base_utils_i18n_ucnv_safe_clone_p, utc_capi_base_utils_ucnv_startup, utc_capi_base_utils_ucnv_cleanup},
index 9e0b4b2..4c02098 100644 (file)
@@ -2526,6 +2526,7 @@ int utc_capi_base_utils_i18n_ucnv_create_unicode_p(void);
 int utc_capi_base_utils_i18n_ucnv_create_unicode_n1(void);
 int utc_capi_base_utils_i18n_ucnv_create_unicode_n2(void);
 int utc_capi_base_utils_i18n_ucnv_create_ccsid_p(void);
+int utc_capi_base_utils_i18n_ucnv_create_package_n(void);
 int utc_capi_base_utils_i18n_ucnv_create_ccsid_n1(void);
 int utc_capi_base_utils_i18n_ucnv_create_ccsid_n2(void);
 int utc_capi_base_utils_i18n_ucnv_safe_clone_p(void);
index 127013a..faada33 100644 (file)
@@ -17,7 +17,7 @@
 #include <utils_i18n.h>
 #include <string.h>
 
-#define I18N_UPRV_LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+#define I18N_UPRV_LENGTHOF(array) (int32_t)(sizeof(array) / sizeof((array)[0]))
 
 static int ret = I18N_ERROR_NONE;
 static int i;
@@ -41,13 +41,13 @@ void utc_capi_base_utils_ucnv_startup(void)
  */
 void utc_capi_base_utils_ucnv_cleanup(void)
 {
-       if (!cnv) {
+       if (!cnv)
+       {
                i18n_ucnv_destroy(cnv);
                cnv = NULL;
        }
 }
 
-
 /**
  * @testcase utc_capi_base_utils_i18n_ucnv_get_max_bytes_for_string_p
  * @since_tizen 6.0
@@ -101,11 +101,12 @@ int utc_capi_base_utils_i18n_ucnv_get_max_bytes_for_string_n2(void)
  */
 int utc_capi_base_utils_i18n_ucnv_compare_names_p(void)
 {
-       static const char *equalUTF8[]={ "UTF-8", "utf_8", "u*T@f08", "Utf 8" };
+       static const char *equalUTF8[] = {"UTF-8", "utf_8", "u*T@f08", "Utf 8"};
        int result;
 
-       for(i = 0; i<3; ++i) {
-               result = i18n_ucnv_compare_names(equalUTF8[i], equalUTF8[i+1]);
+       for (i = 0; i < 3; ++i)
+       {
+               result = i18n_ucnv_compare_names(equalUTF8[i], equalUTF8[i + 1]);
                assert_eq(result, 0);
        }
 
@@ -119,7 +120,7 @@ int utc_capi_base_utils_i18n_ucnv_compare_names_p(void)
  */
 int utc_capi_base_utils_i18n_ucnv_compare_names_n1(void)
 {
-       static const char equalUTF8[]={ "UTF-8" };
+       static const char equalUTF8[] = {"UTF-8"};
        int result;
 
        result = i18n_ucnv_compare_names(equalUTF8, NULL);
@@ -137,7 +138,7 @@ int utc_capi_base_utils_i18n_ucnv_compare_names_n1(void)
  */
 int utc_capi_base_utils_i18n_ucnv_compare_names_n2(void)
 {
-       static const char equalUTF8[]={ "UTF-8" };
+       static const char equalUTF8[] = {"UTF-8"};
        int result;
 
        result = i18n_ucnv_compare_names(NULL, equalUTF8);
@@ -199,7 +200,7 @@ int utc_capi_base_utils_i18n_ucnv_create_unicode_p(void)
  */
 int utc_capi_base_utils_i18n_ucnv_create_unicode_n1(void)
 {
-       const char *illegal_name_chars={ "ibm-943 ibm-943 ibm-943 ibm-943 ibm-943 ibm-943 ibm-943 ibm-943 ibm-943 ibm-943"};
+       const char *illegal_name_chars = {"ibm-943 ibm-943 ibm-943 ibm-943 ibm-943 ibm-943 ibm-943 ibm-943 ibm-943 ibm-943"};
        i18n_uchar illegal_name[100];
        i18n_ustring_copy_ua(illegal_name, "");
        i18n_ustring_copy_ua(illegal_name, illegal_name_chars);
@@ -217,7 +218,7 @@ int utc_capi_base_utils_i18n_ucnv_create_unicode_n1(void)
  */
 int utc_capi_base_utils_i18n_ucnv_create_unicode_n2(void)
 {
-       i18n_uchar first_sorted_name[]={ 0x0021, 0x0000}; /* ! */
+       i18n_uchar first_sorted_name[] = {0x0021, 0x0000}; /* ! */
 
        ret = i18n_ucnv_create_unicode(first_sorted_name, &cnv);
        assert_eq(ret, I18N_ERROR_FILE_ACCESS);
@@ -232,9 +233,10 @@ int utc_capi_base_utils_i18n_ucnv_create_unicode_n2(void)
  */
 int utc_capi_base_utils_i18n_ucnv_create_ccsid_p(void)
 {
-       int32_t ccsids[]={ 37, 850, 943, 949, 950, 1047, 1252, 1392, 33722 };
+       int32_t ccsids[] = {37, 850, 943, 949, 950, 1047, 1252, 1392, 33722};
 
-       for(int i = 0; i<9; ++i) {
+       for (int i = 0; i < 9; ++i)
+       {
                ret = i18n_ucnv_create_ccsid(ccsids[i], I18N_UCNV_IBM, &cnv);
                assert_eq(ret, I18N_ERROR_NONE);
        }
@@ -243,13 +245,30 @@ int utc_capi_base_utils_i18n_ucnv_create_ccsid_p(void)
 }
 
 /**
+ * @testcase utc_capi_base_utils_i18n_ucnv_create_package_n
+ * @since_tizen 6.0
+ * @description Calls i18n_ucnv_create_package with invalid data.
+ */
+int utc_capi_base_utils_i18n_ucnv_create_package_n(void)
+{
+       i18n_ucnv_h converter;
+
+       ret = i18n_ucnv_create_package("", "", &converter);
+
+       assert_eq(converter, NULL);
+       assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+/**
  * @testcase utc_capi_base_utils_i18n_ucnv_create_ccsid_n1
  * @since_tizen 6.0
  * @description Calls i18n_ucnv_create_ccsid and checks whether function succeeded.
  */
 int utc_capi_base_utils_i18n_ucnv_create_ccsid_n1(void)
 {
-       ret = i18n_ucnv_create_ccsid(37, (i18n_ucnv_platform_e) (I18N_UCNV_IBM + 1), &cnv);
+       ret = i18n_ucnv_create_ccsid(37, (i18n_ucnv_platform_e)(I18N_UCNV_IBM + 1), &cnv);
        assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -262,7 +281,7 @@ int utc_capi_base_utils_i18n_ucnv_create_ccsid_n1(void)
  */
 int utc_capi_base_utils_i18n_ucnv_create_ccsid_n2(void)
 {
-       ret = i18n_ucnv_create_ccsid(37, (i18n_ucnv_platform_e) (I18N_UCNV_UNKNOWN - 1), &cnv);
+       ret = i18n_ucnv_create_ccsid(37, (i18n_ucnv_platform_e)(I18N_UCNV_UNKNOWN - 1), &cnv);
        assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -337,7 +356,7 @@ int utc_capi_base_utils_i18n_ucnv_get_subst_chars_p(void)
 {
        char buffer[16];
        int8_t len8;
-       static const i18n_uchar sub[5] = { 0x61, 0x62, 0x63, 0x64, 0x65 };
+       static const i18n_uchar sub[5] = {0x61, 0x62, 0x63, 0x64, 0x65};
 
        ret = i18n_ucnv_create("ISO-8859-1", &cnv);
        assert_eq(ret, I18N_ERROR_NONE);
@@ -420,7 +439,7 @@ int utc_capi_base_utils_i18n_ucnv_set_subst_string_p(void)
 {
        char buffer[16];
        int8_t len8;
-       static const i18n_uchar sub[5] = { 0x61, 0x62, 0x63, 0x64, 0x65 };
+       static const i18n_uchar sub[5] = {0x61, 0x62, 0x63, 0x64, 0x65};
 
        ret = i18n_ucnv_create("ISO-8859-1", &cnv);
        assert_eq(ret, I18N_ERROR_NONE);
@@ -442,7 +461,7 @@ int utc_capi_base_utils_i18n_ucnv_set_subst_string_p(void)
  */
 int utc_capi_base_utils_i18n_ucnv_set_subst_string_n1(void)
 {
-       static const i18n_uchar sub[5] = { 0x61, 0x62, 0x63, 0x64, 0x65 };
+       static const i18n_uchar sub[5] = {0x61, 0x62, 0x63, 0x64, 0x65};
 
        ret = i18n_ucnv_set_subst_string(NULL, sub, I18N_UPRV_LENGTHOF(sub));
        assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
@@ -457,7 +476,7 @@ int utc_capi_base_utils_i18n_ucnv_set_subst_string_n1(void)
  */
 int utc_capi_base_utils_i18n_ucnv_set_subst_string_n2(void)
 {
-       static const i18n_uchar sub[5] = { 0x61, 0x62, 0x63, 0x64, 0x65 };
+       static const i18n_uchar sub[5] = {0x61, 0x62, 0x63, 0x64, 0x65};
 
        ret = i18n_ucnv_create("ISO-8859-1", &cnv);
        assert_eq(ret, I18N_ERROR_NONE);
@@ -776,7 +795,8 @@ int utc_capi_base_utils_i18n_ucnv_get_display_name_p(void)
        int32_t capacity = 0;
        int32_t display_name_len;
        ret = i18n_ucnv_get_display_name(cnv, "ko_KR", display_name, capacity, &display_name_len);
-       if(I18N_ERROR_BUFFER_OVERFLOW == ret) {
+       if (I18N_ERROR_BUFFER_OVERFLOW == ret)
+       {
                display_name = (i18n_uchar *)malloc((display_name_len + 1) * sizeof(i18n_uchar));
                ret = i18n_ucnv_get_display_name(cnv, "ko_KR", display_name, display_name_len + 1, &display_name_len);
                assert_eq(ret, I18N_ERROR_NONE);
@@ -869,22 +889,22 @@ int utc_capi_base_utils_i18n_ucnv_get_display_name_n4(void)
 int utc_capi_base_utils_i18n_ucnv_get_name_p(void)
 {
        static const char *const names[] = {
-               "Unicode",                                      "UTF-16",
-               "UnicodeBigUnmarked",           "UTF-16BE",
-               "UnicodeBig",                           "UTF-16BE,version=1",
-               "UnicodeLittleUnmarked",        "UTF-16LE",
-               "UnicodeLittle",                        "UTF-16LE,version=1",
-               "x-UTF-16LE-BOM",                       "UTF-16LE,version=1"
-       };
-
-       for(int i = 0; i < I18N_UPRV_LENGTHOF(names); i += 2) {
+               "Unicode", "UTF-16",
+               "UnicodeBigUnmarked", "UTF-16BE",
+               "UnicodeBig", "UTF-16BE,version=1",
+               "UnicodeLittleUnmarked", "UTF-16LE",
+               "UnicodeLittle", "UTF-16LE,version=1",
+               "x-UTF-16LE-BOM", "UTF-16LE,version=1"};
+
+       for (int i = 0; i < I18N_UPRV_LENGTHOF(names); i += 2)
+       {
                ret = i18n_ucnv_create(names[i], &cnv);
                assert_eq(ret, I18N_ERROR_NONE);
 
                const char *name;
                ret = i18n_ucnv_get_name(cnv, &name);
                assert_eq(ret, I18N_ERROR_NONE);
-               assert_eq(strcmp(name, names[i+1]), 0);
+               assert_eq(strcmp(name, names[i + 1]), 0);
        }
        assert_eq(ret, I18N_ERROR_NONE);
 
@@ -912,9 +932,10 @@ int utc_capi_base_utils_i18n_ucnv_get_name_n(void)
  */
 int utc_capi_base_utils_i18n_ucnv_get_ccsid_p(void)
 {
-       int32_t ccsids[]={ 37, 850, 943, 949, 950, 1047, 1252, 1392, 33722 };
+       int32_t ccsids[] = {37, 850, 943, 949, 950, 1047, 1252, 1392, 33722};
 
-       for(int i = 0; i < I18N_UPRV_LENGTHOF(ccsids); ++i) {
+       for (int i = 0; i < I18N_UPRV_LENGTHOF(ccsids); ++i)
+       {
                ret = i18n_ucnv_create_ccsid(ccsids[i], I18N_UCNV_IBM, &cnv);
                assert_eq(ret, I18N_ERROR_NONE);
 
@@ -1433,7 +1454,6 @@ int utc_capi_base_utils_i18n_ucnv_from_uchars_n2(void)
        return 0;
 }
 
-
 /**
  * @testcase utc_capi_base_utils_i18n_ucnv_from_uchars_n3
  * @since_tizen 6.0
@@ -1454,7 +1474,6 @@ int utc_capi_base_utils_i18n_ucnv_from_uchars_n3(void)
        return 0;
 }
 
-
 /**
  * @testcase utc_capi_base_utils_i18n_ucnv_from_uchars_n4
  * @since_tizen 6.0
@@ -1528,8 +1547,7 @@ int utc_capi_base_utils_i18n_ucnv_to_uchars_p(void)
                0x5c, 0x73, 0x68, 0x61, 0x72, 0x65,
                0x5c, 0x64, 0x61, 0x74, 0x61,
                0x5c, 0x69, 0x63, 0x75, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x74, 0x78, 0x74,
-               0
-       };
+               0};
 
        i18n_uchar result[200];
        int32_t len;
@@ -1557,8 +1575,7 @@ int utc_capi_base_utils_i18n_ucnv_to_uchars_n1(void)
                0x5c, 0x73, 0x68, 0x61, 0x72, 0x65,
                0x5c, 0x64, 0x61, 0x74, 0x61,
                0x5c, 0x69, 0x63, 0x75, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x74, 0x78, 0x74,
-               0
-       };
+               0};
 
        i18n_uchar result[200];
        int32_t len;
@@ -1586,8 +1603,7 @@ int utc_capi_base_utils_i18n_ucnv_to_uchars_n2(void)
                0x5c, 0x73, 0x68, 0x61, 0x72, 0x65,
                0x5c, 0x64, 0x61, 0x74, 0x61,
                0x5c, 0x69, 0x63, 0x75, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x74, 0x78, 0x74,
-               0
-       };
+               0};
 
        i18n_uchar result[200];
        int32_t len;
@@ -1615,8 +1631,7 @@ int utc_capi_base_utils_i18n_ucnv_to_uchars_n3(void)
                0x5c, 0x73, 0x68, 0x61, 0x72, 0x65,
                0x5c, 0x64, 0x61, 0x74, 0x61,
                0x5c, 0x69, 0x63, 0x75, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x74, 0x78, 0x74,
-               0
-       };
+               0};
 
        i18n_uchar result[200];
        int32_t len;
@@ -1644,8 +1659,7 @@ int utc_capi_base_utils_i18n_ucnv_to_uchars_n4(void)
                0x5c, 0x73, 0x68, 0x61, 0x72, 0x65,
                0x5c, 0x64, 0x61, 0x74, 0x61,
                0x5c, 0x69, 0x63, 0x75, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x74, 0x78, 0x74,
-               0
-       };
+               0};
 
        i18n_uchar result[200];
        int32_t len;
@@ -1673,8 +1687,7 @@ int utc_capi_base_utils_i18n_ucnv_to_uchars_n5(void)
                0x5c, 0x73, 0x68, 0x61, 0x72, 0x65,
                0x5c, 0x64, 0x61, 0x74, 0x61,
                0x5c, 0x69, 0x63, 0x75, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x74, 0x78, 0x74,
-               0
-       };
+               0};
 
        i18n_uchar result[200];
        int32_t len;
@@ -1702,8 +1715,7 @@ int utc_capi_base_utils_i18n_ucnv_to_uchars_n6(void)
                0x5c, 0x73, 0x68, 0x61, 0x72, 0x65,
                0x5c, 0x64, 0x61, 0x74, 0x61,
                0x5c, 0x69, 0x63, 0x75, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x74, 0x78, 0x74,
-               0
-       };
+               0};
 
        i18n_uchar result[200];
        int32_t len;
@@ -1731,8 +1743,7 @@ int utc_capi_base_utils_i18n_ucnv_to_uchars_n7(void)
                0x5c, 0x73, 0x68, 0x61, 0x72, 0x65,
                0x5c, 0x64, 0x61, 0x74, 0x61,
                0x5c, 0x69, 0x63, 0x75, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x74, 0x78, 0x74,
-               0
-       };
+               0};
 
        i18n_uchar result[200];
        int32_t len;
@@ -1753,7 +1764,7 @@ int utc_capi_base_utils_i18n_ucnv_to_uchars_n7(void)
  */
 int utc_capi_base_utils_i18n_ucnv_get_next_uchar_p(void)
 {
-       const char source_data[] = { (char)0xa2, (char)0xae, (char)0xa2 };
+       const char source_data[] = {(char)0xa2, (char)0xae, (char)0xa2};
        const char *source = source_data;
        const char *source_limit = source_data + sizeof(source_data);
        i18n_uchar32 result1, result2;
@@ -1779,7 +1790,7 @@ int utc_capi_base_utils_i18n_ucnv_get_next_uchar_p(void)
  */
 int utc_capi_base_utils_i18n_ucnv_get_next_uchar_n1(void)
 {
-       const char source_data[] = { (char)0xa2, (char)0xae, (char)0xa2 };
+       const char source_data[] = {(char)0xa2, (char)0xae, (char)0xa2};
        const char *source = source_data;
        const char *source_limit = source_data + sizeof(source_data);
        i18n_uchar32 result3;
@@ -1801,7 +1812,7 @@ int utc_capi_base_utils_i18n_ucnv_get_next_uchar_n1(void)
 int utc_capi_base_utils_i18n_ucnv_get_next_uchar_n2(void)
 {
        i18n_uchar32 result3;
-       const char source_data[] = { (char)0xa2, (char)0xae, (char)0xa2 };
+       const char source_data[] = {(char)0xa2, (char)0xae, (char)0xa2};
        const char *source_limit = source_data + sizeof(source_data);
 
        ret = i18n_ucnv_create("ibm-1363", &cnv);
@@ -1831,7 +1842,7 @@ int utc_capi_base_utils_i18n_ucnv_convert_ex_p(void)
        ret = i18n_ucnv_create("Shift-JIS", &cnv2);
        assert_eq(ret, I18N_ERROR_NONE);
 
-       ret = i18n_ucnv_convert_ex(cnv2, cnv1, &target, target_buffer+sizeof(target_buffer), &src, NULL, NULL, NULL, NULL, NULL, true, true);
+       ret = i18n_ucnv_convert_ex(cnv2, cnv1, &target, target_buffer + sizeof(target_buffer), &src, NULL, NULL, NULL, NULL, NULL, true, true);
        assert_eq(ret, I18N_ERROR_NONE);
 
        return 0;
@@ -1859,7 +1870,7 @@ int utc_capi_base_utils_i18n_ucnv_convert_ex_n1(void)
        assert_eq(ret, I18N_ERROR_NONE);
 
        pivot_source = pivot_target = pivot_buffer;
-       ret = i18n_ucnv_convert_ex(cnv2, cnv1, &target, target_buffer+sizeof(target_buffer), &src, NULL, pivot_buffer, &pivot_source, &pivot_target, pivot_buffer, true, true);
+       ret = i18n_ucnv_convert_ex(cnv2, cnv1, &target, target_buffer + sizeof(target_buffer), &src, NULL, pivot_buffer, &pivot_source, &pivot_target, pivot_buffer, true, true);
        assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -1887,7 +1898,7 @@ int utc_capi_base_utils_i18n_ucnv_convert_ex_n2(void)
        assert_eq(ret, I18N_ERROR_NONE);
 
        pivot_target = pivot_buffer;
-       ret = i18n_ucnv_convert_ex(cnv2, cnv1, &target, target_buffer+sizeof(target_buffer), &src, NULL, pivot_buffer, NULL, &pivot_target, pivot_buffer+1, true, true);
+       ret = i18n_ucnv_convert_ex(cnv2, cnv1, &target, target_buffer + sizeof(target_buffer), &src, NULL, pivot_buffer, NULL, &pivot_target, pivot_buffer + 1, true, true);
        assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -1914,7 +1925,7 @@ int utc_capi_base_utils_i18n_ucnv_convert_ex_n3(void)
        assert_eq(ret, I18N_ERROR_NONE);
 
        pivot_source = pivot_buffer;
-       ret = i18n_ucnv_convert_ex(cnv2, cnv1, &target, target_buffer+sizeof(target_buffer), NULL, NULL, pivot_buffer, &pivot_source, &pivot_target, pivot_buffer+1, true, true);
+       ret = i18n_ucnv_convert_ex(cnv2, cnv1, &target, target_buffer + sizeof(target_buffer), NULL, NULL, pivot_buffer, &pivot_source, &pivot_target, pivot_buffer + 1, true, true);
        assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -1943,7 +1954,7 @@ int utc_capi_base_utils_i18n_ucnv_convert_ex_n4(void)
 
        src = src_buffer;
        pivot_source = pivot_buffer;
-       ret = i18n_ucnv_convert_ex(cnv2, cnv1, &target, target_buffer+sizeof(target_buffer), &src, NULL, NULL, &pivot_source, &pivot_target, pivot_buffer+1, true, false);
+       ret = i18n_ucnv_convert_ex(cnv2, cnv1, &target, target_buffer + sizeof(target_buffer), &src, NULL, NULL, &pivot_source, &pivot_target, pivot_buffer + 1, true, false);
        assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -1971,7 +1982,7 @@ int utc_capi_base_utils_i18n_ucnv_convert_ex_n5(void)
 
        src = src_buffer;
        pivot_source = pivot_buffer;
-       ret = i18n_ucnv_convert_ex(cnv2, cnv1, NULL, target_buffer+sizeof(target_buffer), &src, NULL, pivot_buffer, &pivot_source, &pivot_target, pivot_buffer, true, true);
+       ret = i18n_ucnv_convert_ex(cnv2, cnv1, NULL, target_buffer + sizeof(target_buffer), &src, NULL, pivot_buffer, &pivot_source, &pivot_target, pivot_buffer, true, true);
        assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -2000,7 +2011,7 @@ int utc_capi_base_utils_i18n_ucnv_convert_ex_n6(void)
 
        src = src_buffer;
        pivot_source = pivot_buffer;
-       ret = i18n_ucnv_convert_ex(NULL, cnv1, &target, target_buffer+sizeof(target_buffer), &src, NULL, pivot_buffer, &pivot_source, &pivot_target, pivot_buffer, true, true);
+       ret = i18n_ucnv_convert_ex(NULL, cnv1, &target, target_buffer + sizeof(target_buffer), &src, NULL, pivot_buffer, &pivot_source, &pivot_target, pivot_buffer, true, true);
        assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -2029,7 +2040,7 @@ int utc_capi_base_utils_i18n_ucnv_convert_ex_n7(void)
 
        src = src_buffer;
        pivot_source = pivot_buffer;
-       ret = i18n_ucnv_convert_ex(cnv2, NULL, &target, target_buffer+sizeof(target_buffer), &src, NULL, pivot_buffer, &pivot_source, &pivot_target, pivot_buffer, true, true);
+       ret = i18n_ucnv_convert_ex(cnv2, NULL, &target, target_buffer + sizeof(target_buffer), &src, NULL, pivot_buffer, &pivot_source, &pivot_target, pivot_buffer, true, true);
        assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -2073,20 +2084,21 @@ int utc_capi_base_utils_i18n_ucnv_convert_p(void)
 {
        int32_t target_limit = 0, source_limit = 0, target_capacity = 0;
 
-       const uint8_t source[]={ 0x00, 0x04, 0x05, 0x06, 0xa2, 0xb4, 0x00};
-       const uint8_t expected_target[]={ 0x00, 0x37, 0x2d, 0x2e, 0x0e, 0x49, 0x62, 0x0f, 0x00};
-       char *target=0;
-       source_limit=I18N_UPRV_LENGTHOF(source);
+       const uint8_t source[] = {0x00, 0x04, 0x05, 0x06, 0xa2, 0xb4, 0x00};
+       const uint8_t expected_target[] = {0x00, 0x37, 0x2d, 0x2e, 0x0e, 0x49, 0x62, 0x0f, 0x00};
+       char *target = 0;
+       source_limit = I18N_UPRV_LENGTHOF(source);
 
-       ret = i18n_ucnv_convert("ibm-1364", "ibm-1363", NULL, target_limit, (const char*)source, source_limit, &target_capacity);
-       if(ret == I18N_ERROR_BUFFER_OVERFLOW) {
+       ret = i18n_ucnv_convert("ibm-1364", "ibm-1363", NULL, target_limit, (const char *)source, source_limit, &target_capacity);
+       if (ret == I18N_ERROR_BUFFER_OVERFLOW)
+       {
                target_limit = target_capacity + 1;
-               target = (char *)malloc(sizeof(char) *target_limit);
-               ret = i18n_ucnv_convert("ibm-1364", "ibm-1363", target, target_limit, (const char*)source, source_limit, &target_capacity);
+               target = (char *)malloc(sizeof(char) * target_limit);
+               ret = i18n_ucnv_convert("ibm-1364", "ibm-1363", target, target_limit, (const char *)source, source_limit, &target_capacity);
        }
        assert_eq(ret, I18N_ERROR_NONE);
 
-       for(int i = 0; i < target_capacity; ++i)
+       for (int i = 0; i < target_capacity; ++i)
                assert_eq(target[i], expected_target[i]);
 
        return 0;
@@ -2101,10 +2113,10 @@ int utc_capi_base_utils_i18n_ucnv_convert_n1(void)
 {
        int32_t target_limit = 0, source_limit = 0, target_capacity = 0;
 
-       const uint8_t source[]={ 0x00, 0x04, 0x05, 0x06, 0xa2, 0xb4, 0x00};
-       source_limit=I18N_UPRV_LENGTHOF(source);
+       const uint8_t source[] = {0x00, 0x04, 0x05, 0x06, 0xa2, 0xb4, 0x00};
+       source_limit = I18N_UPRV_LENGTHOF(source);
 
-       ret = i18n_ucnv_convert("ibm-1364", "ibm-1363", NULL, target_limit, (const char*)source, source_limit, &target_capacity);
+       ret = i18n_ucnv_convert("ibm-1364", "ibm-1363", NULL, target_limit, (const char *)source, source_limit, &target_capacity);
        assert_eq(ret, I18N_ERROR_BUFFER_OVERFLOW);
 
        return 0;
@@ -2119,9 +2131,9 @@ int utc_capi_base_utils_i18n_ucnv_convert_n2(void)
 {
        int32_t target_limit = 0, source_limit = 0, target_capacity = 0;
 
-       const uint8_t source[]={ 0x00, 0x04, 0x05, 0x06, 0xa2, 0xb4, 0x00};
-       char *target=0;
-       source_limit=I18N_UPRV_LENGTHOF(source);
+       const uint8_t source[] = {0x00, 0x04, 0x05, 0x06, 0xa2, 0xb4, 0x00};
+       char *target = 0;
+       source_limit = I18N_UPRV_LENGTHOF(source);
 
        target_limit = target_capacity + 1;
        target = (char *)malloc(sizeof(char) * target_limit);
@@ -2141,13 +2153,13 @@ int utc_capi_base_utils_i18n_ucnv_convert_n3(void)
 {
        int32_t target_limit = 0, target_capacity = 0;
 
-       const uint8_t source[]={ 0x00, 0x04, 0x05, 0x06, 0xa2, 0xb4, 0x00};
-       char *target=0;
+       const uint8_t source[] = {0x00, 0x04, 0x05, 0x06, 0xa2, 0xb4, 0x00};
+       char *target = 0;
 
        target_limit = target_capacity + 1;
        target = (char *)malloc(sizeof(char) * target_limit);
 
-       ret = i18n_ucnv_convert("ibm-1364", "ibm-1363", target, target_limit, (const char*)source, -2, &target_capacity);
+       ret = i18n_ucnv_convert("ibm-1364", "ibm-1363", target, target_limit, (const char *)source, -2, &target_capacity);
        assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -2162,11 +2174,11 @@ int utc_capi_base_utils_i18n_ucnv_convert_n4(void)
 {
        int32_t source_limit = 0, target_capacity = 0;
 
-       const uint8_t source[]={ 0x00, 0x04, 0x05, 0x06, 0xa2, 0xb4, 0x00};
-       char *target=0;
-       source_limit=I18N_UPRV_LENGTHOF(source);
+       const uint8_t source[] = {0x00, 0x04, 0x05, 0x06, 0xa2, 0xb4, 0x00};
+       char *target = 0;
+       source_limit = I18N_UPRV_LENGTHOF(source);
 
-       ret = i18n_ucnv_convert("ibm-1364", "ibm-1363", target, -1, (const char*)source, source_limit, &target_capacity);
+       ret = i18n_ucnv_convert("ibm-1364", "ibm-1363", target, -1, (const char *)source, source_limit, &target_capacity);
        assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -2181,11 +2193,11 @@ int utc_capi_base_utils_i18n_ucnv_convert_n5(void)
 {
        int32_t target_limit = 0, source_limit = 0, target_capacity = 0;
 
-       const uint8_t source[]={ 0x00, 0x04, 0x05, 0x06, 0xa2, 0xb4, 0x00};
-       source_limit=I18N_UPRV_LENGTHOF(source);
+       const uint8_t source[] = {0x00, 0x04, 0x05, 0x06, 0xa2, 0xb4, 0x00};
+       source_limit = I18N_UPRV_LENGTHOF(source);
 
        target_limit = target_capacity + 1;
-       ret = i18n_ucnv_convert("ibm-1364", "ibm-1363", NULL, target_limit, (const char*)source, source_limit, &target_capacity);
+       ret = i18n_ucnv_convert("ibm-1364", "ibm-1363", NULL, target_limit, (const char *)source, source_limit, &target_capacity);
        assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -2199,13 +2211,10 @@ int utc_capi_base_utils_i18n_ucnv_convert_n5(void)
 int utc_capi_base_utils_i18n_ucnv_from_algorithmic_p(void)
 {
        static const uint8_t
-               utf8[]={
+               utf8[] = {
                        /* 4e00                   30a1                          ff61                      0410 */
-                       0xe4, 0xb8, 0x80, 0xe3, 0x82, 0xa1, 0xef, 0xbd, 0xa1, 0xd0, 0x90
-               },
-               shiftJIS[]={
-                       0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40
-               };
+                       0xe4, 0xb8, 0x80, 0xe3, 0x82, 0xa1, 0xef, 0xbd, 0xa1, 0xd0, 0x90},
+               shiftJIS[] = {0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40};
 
        int32_t length;
        char target[100];
@@ -2228,13 +2237,10 @@ int utc_capi_base_utils_i18n_ucnv_from_algorithmic_p(void)
 int utc_capi_base_utils_i18n_ucnv_from_algorithmic_n1(void)
 {
        static const uint8_t
-               utf8[]={
+               utf8[] = {
                        /* 4e00                   30a1                          ff61                      0410 */
-                       0xe4, 0xb8, 0x80, 0xe3, 0x82, 0xa1, 0xef, 0xbd, 0xa1, 0xd0, 0x90
-               },
-               shiftJIS[]={
-                       0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40
-               };
+                       0xe4, 0xb8, 0x80, 0xe3, 0x82, 0xa1, 0xef, 0xbd, 0xa1, 0xd0, 0x90},
+               shiftJIS[] = {0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40};
 
        int32_t length;
        char target[100];
@@ -2254,13 +2260,10 @@ int utc_capi_base_utils_i18n_ucnv_from_algorithmic_n1(void)
 int utc_capi_base_utils_i18n_ucnv_from_algorithmic_n2(void)
 {
        static const uint8_t
-               utf8[]={
+               utf8[] = {
                        /* 4e00                   30a1                          ff61                      0410 */
-                       0xe4, 0xb8, 0x80, 0xe3, 0x82, 0xa1, 0xef, 0xbd, 0xa1, 0xd0, 0x90
-               },
-               shiftJIS[]={
-                       0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40
-               };
+                       0xe4, 0xb8, 0x80, 0xe3, 0x82, 0xa1, 0xef, 0xbd, 0xa1, 0xd0, 0x90},
+               shiftJIS[] = {0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40};
 
        int32_t length;
        char target[100];
@@ -2283,13 +2286,10 @@ int utc_capi_base_utils_i18n_ucnv_from_algorithmic_n2(void)
 int utc_capi_base_utils_i18n_ucnv_from_algorithmic_n3(void)
 {
        static const uint8_t
-               utf8[]={
+               utf8[] = {
                        /* 4e00                   30a1                          ff61                      0410 */
-                       0xe4, 0xb8, 0x80, 0xe3, 0x82, 0xa1, 0xef, 0xbd, 0xa1, 0xd0, 0x90
-               },
-               shiftJIS[]={
-                       0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40
-               };
+                       0xe4, 0xb8, 0x80, 0xe3, 0x82, 0xa1, 0xef, 0xbd, 0xa1, 0xd0, 0x90},
+               shiftJIS[] = {0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40};
 
        int32_t length;
 
@@ -2310,10 +2310,9 @@ int utc_capi_base_utils_i18n_ucnv_from_algorithmic_n3(void)
 int utc_capi_base_utils_i18n_ucnv_from_algorithmic_n4(void)
 {
        static const uint8_t
-               utf8[]={
+               utf8[] = {
                        /* 4e00                   30a1                          ff61                      0410 */
-                       0xe4, 0xb8, 0x80, 0xe3, 0x82, 0xa1, 0xef, 0xbd, 0xa1, 0xd0, 0x90
-               };
+                       0xe4, 0xb8, 0x80, 0xe3, 0x82, 0xa1, 0xef, 0xbd, 0xa1, 0xd0, 0x90};
 
        int32_t length;
        char target[100];
@@ -2336,13 +2335,10 @@ int utc_capi_base_utils_i18n_ucnv_from_algorithmic_n4(void)
 int utc_capi_base_utils_i18n_ucnv_from_algorithmic_n5(void)
 {
        static const uint8_t
-               utf8[]={
+               utf8[] = {
                        /* 4e00                   30a1                          ff61                      0410 */
-                       0xe4, 0xb8, 0x80, 0xe3, 0x82, 0xa1, 0xef, 0xbd, 0xa1, 0xd0, 0x90
-               },
-               shiftJIS[]={
-                       0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40
-               };
+                       0xe4, 0xb8, 0x80, 0xe3, 0x82, 0xa1, 0xef, 0xbd, 0xa1, 0xd0, 0x90},
+               shiftJIS[] = {0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40};
 
        int32_t length;
        char target[100];
@@ -2365,13 +2361,10 @@ int utc_capi_base_utils_i18n_ucnv_from_algorithmic_n5(void)
 int utc_capi_base_utils_i18n_ucnv_from_algorithmic_n6(void)
 {
        static const uint8_t
-               utf8[]={
+               utf8[] = {
                        /* 4e00                   30a1                          ff61                      0410 */
-                       0xe4, 0xb8, 0x80, 0xe3, 0x82, 0xa1, 0xef, 0xbd, 0xa1, 0xd0, 0x90
-               },
-               shiftJIS[]={
-                       0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40
-               };
+                       0xe4, 0xb8, 0x80, 0xe3, 0x82, 0xa1, 0xef, 0xbd, 0xa1, 0xd0, 0x90},
+               shiftJIS[] = {0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40};
 
        int32_t length;
        char target[100];
@@ -2394,13 +2387,10 @@ int utc_capi_base_utils_i18n_ucnv_from_algorithmic_n6(void)
 int utc_capi_base_utils_i18n_ucnv_to_algorithmic_p(void)
 {
        static const uint8_t
-               utf8[]={
+               utf8[] = {
                        /* 4e00                   30a1                          ff61                      0410 */
-                       0xe4, 0xb8, 0x80, 0xe3, 0x82, 0xa1, 0xef, 0xbd, 0xa1, 0xd0, 0x90
-               },
-               shiftJIS[]={
-                       0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40
-               };
+                       0xe4, 0xb8, 0x80, 0xe3, 0x82, 0xa1, 0xef, 0xbd, 0xa1, 0xd0, 0x90},
+               shiftJIS[] = {0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40};
 
        int32_t length;
        char target[100], shiftJIS_nul[100];
@@ -2418,7 +2408,6 @@ int utc_capi_base_utils_i18n_ucnv_to_algorithmic_p(void)
        return 0;
 }
 
-
 /**
  * @testcase utc_capi_base_utils_i18n_ucnv_to_algorithmic_n1
  * @since_tizen 6.0
@@ -2427,9 +2416,8 @@ int utc_capi_base_utils_i18n_ucnv_to_algorithmic_p(void)
 int utc_capi_base_utils_i18n_ucnv_to_algorithmic_n1(void)
 {
        static const uint8_t
-               shiftJIS[]={
-                       0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40
-               };
+               shiftJIS[] = {
+                       0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40};
 
        int32_t length;
        char target[100], shiftJIS_nul[100];
@@ -2452,9 +2440,8 @@ int utc_capi_base_utils_i18n_ucnv_to_algorithmic_n1(void)
 int utc_capi_base_utils_i18n_ucnv_to_algorithmic_n2(void)
 {
        static const uint8_t
-               shiftJIS[]={
-                       0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40
-               };
+               shiftJIS[] = {
+                       0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40};
 
        int32_t length;
        char target[100], shiftJIS_nul[100];
@@ -2480,9 +2467,8 @@ int utc_capi_base_utils_i18n_ucnv_to_algorithmic_n2(void)
 int utc_capi_base_utils_i18n_ucnv_to_algorithmic_n3(void)
 {
        static const uint8_t
-               shiftJIS[]={
-                       0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40
-               };
+               shiftJIS[] = {
+                       0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40};
 
        int32_t length;
        char target[100], shiftJIS_nul[100];
@@ -2528,9 +2514,8 @@ int utc_capi_base_utils_i18n_ucnv_to_algorithmic_n4(void)
 int utc_capi_base_utils_i18n_ucnv_to_algorithmic_n5(void)
 {
        static const uint8_t
-               shiftJIS[]={
-                       0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40
-               };
+               shiftJIS[] = {
+                       0x88, 0xea, 0x83, 0x40, 0xa1, 0x84, 0x40};
 
        int32_t length;
        char target[100], shiftJIS_nul[100];
@@ -2603,7 +2588,8 @@ int utc_capi_base_utils_i18n_ucnv_count_available_p(void)
        count = i18n_ucnv_count_available();
        assert_neq(count, 0);
 
-       for(int i = 0; i<count; ++i) {
+       for (int i = 0; i < count; ++i)
+       {
                ret = i18n_ucnv_get_available_name(i, &result);
                assert_eq(ret, I18N_ERROR_NONE);
        }
@@ -2650,7 +2636,7 @@ int utc_capi_base_utils_i18n_ucnv_get_available_name_n2(void)
 {
        const char *result;
 
-       ret = i18n_ucnv_get_available_name(0xffff+1, &result);
+       ret = i18n_ucnv_get_available_name(0xffff + 1, &result);
        assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -2775,7 +2761,8 @@ int utc_capi_base_utils_i18n_ucnv_get_aliases_p(void)
 
        const char *alias;
        uint16_t alias_num;
-       for(alias_num = 0; alias_num < number; ++alias_num) {
+       for (alias_num = 0; alias_num < number; ++alias_num)
+       {
                ret = i18n_ucnv_get_alias("utf-8", alias_num, &alias);
                assert_eq(ret, I18N_ERROR_NONE);
                assert_eq(strcmp(aliases[alias_num], alias), 0);
@@ -2861,7 +2848,8 @@ int utc_capi_base_utils_i18n_ucnv_count_standards_p(void)
 int utc_capi_base_utils_i18n_ucnv_get_standard_p(void)
 {
        uint16_t count = i18n_ucnv_count_standards();
-       for(int i = 0; i < count -1; ++i) {
+       for (int i = 0; i < count - 1; ++i)
+       {
                const char *standard;
                ret = i18n_ucnv_get_standard(i, &standard);
                assert_eq(ret, I18N_ERROR_NONE);
@@ -2892,7 +2880,7 @@ int utc_capi_base_utils_i18n_ucnv_get_standard_n(void)
 int utc_capi_base_utils_i18n_ucnv_get_standard_name_p(void)
 {
        const char *tag;
-       ret =i18n_ucnv_get_standard_name("ascii", "IANA", &tag);
+       ret = i18n_ucnv_get_standard_name("ascii", "IANA", &tag);
        assert_eq(ret, I18N_ERROR_NONE);
        assert_eq(strcmp(tag, "ANSI_X3.4-1968"), 0);
 
@@ -2907,7 +2895,7 @@ int utc_capi_base_utils_i18n_ucnv_get_standard_name_p(void)
 int utc_capi_base_utils_i18n_ucnv_get_standard_name_n1(void)
 {
        const char *tag;
-       ret =i18n_ucnv_get_standard_name(NULL, "IANA", &tag);
+       ret = i18n_ucnv_get_standard_name(NULL, "IANA", &tag);
        assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
 
        return 0;
@@ -2921,7 +2909,7 @@ int utc_capi_base_utils_i18n_ucnv_get_standard_name_n1(void)
 int utc_capi_base_utils_i18n_ucnv_get_standard_name_n2(void)
 {
        const char *tag;
-       ret =i18n_ucnv_get_standard_name("ascii", NULL, &tag);
+       ret = i18n_ucnv_get_standard_name("ascii", NULL, &tag);
        assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
        return 0;
 }
@@ -3010,8 +2998,7 @@ int utc_capi_base_utils_i18n_ucnv_fix_file_separator_p(void)
                0x5c, 0x73, 0x68, 0x61, 0x72, 0x65,
                0x5c, 0x64, 0x61, 0x74, 0x61,
                0x5c, 0x69, 0x63, 0x75, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x74, 0x78, 0x74,
-               0
-       };
+               0};
 
        i18n_uchar result[200], ascii_result[200];
        int32_t len, ascii_len;
@@ -3050,8 +3037,7 @@ int utc_capi_base_utils_i18n_ucnv_fix_file_separator_n1(void)
                0x5c, 0x73, 0x68, 0x61, 0x72, 0x65,
                0x5c, 0x64, 0x61, 0x74, 0x61,
                0x5c, 0x69, 0x63, 0x75, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x74, 0x78, 0x74,
-               0
-       };
+               0};
 
        i18n_uchar result[200];
        int32_t len;
@@ -3082,8 +3068,7 @@ int utc_capi_base_utils_i18n_ucnv_fix_file_separator_n2(void)
                0x5c, 0x73, 0x68, 0x61, 0x72, 0x65,
                0x5c, 0x64, 0x61, 0x74, 0x61,
                0x5c, 0x69, 0x63, 0x75, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x74, 0x78, 0x74,
-               0
-       };
+               0};
 
        i18n_uchar result[200];
        int32_t len;
@@ -3114,8 +3099,7 @@ int utc_capi_base_utils_i18n_ucnv_fix_file_separator_n3(void)
                0x5c, 0x73, 0x68, 0x61, 0x72, 0x65,
                0x5c, 0x64, 0x61, 0x74, 0x61,
                0x5c, 0x69, 0x63, 0x75, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x74, 0x78, 0x74,
-               0
-       };
+               0};
 
        i18n_uchar result[200];
        int32_t len;
@@ -3239,32 +3223,32 @@ int utc_capi_base_utils_i18n_ucnv_uses_fallback_n(void)
  */
 int utc_capi_base_utils_i18n_ucnv_detect_unicode_signature_p(void)
 {
-       static const chardata[] = {
-               "\xFE\xFF\x00\x00",     /* UTF-16BE */
-               "\xFF\xFE\x00\x00",     /* UTF-16LE */
-               "\xEF\xBB\xBF\x00",     /* UTF-8        */
-               "\x0E\xFE\xFF\x00",     /* SCSU         */
+       static const char *data[] = {
+               "\xFE\xFF\x00\x00", /* UTF-16BE */
+               "\xFF\xFE\x00\x00", /* UTF-16LE */
+               "\xEF\xBB\xBF\x00", /* UTF-8    */
+               "\x0E\xFE\xFF\x00", /* SCSU     */
 
-               "\xFE\xFF",                     /* UTF-16BE */
-               "\xFF\xFE",                     /* UTF-16LE */
-               "\xEF\xBB\xBF",                 /* UTF-8        */
-               "\x0E\xFE\xFF",                 /* SCSU         */
+               "\xFE\xFF",             /* UTF-16BE */
+               "\xFF\xFE",             /* UTF-16LE */
+               "\xEF\xBB\xBF", /* UTF-8        */
+               "\x0E\xFE\xFF", /* SCSU         */
 
-               "\xFE\xFF\x41\x42",     /* UTF-16BE */
-               "\xFF\xFE\x41\x41",     /* UTF-16LE */
-               "\xEF\xBB\xBF\x41",     /* UTF-8        */
-               "\x0E\xFE\xFF\x41",     /* SCSU         */
+               "\xFE\xFF\x41\x42", /* UTF-16BE */
+               "\xFF\xFE\x41\x41", /* UTF-16LE */
+               "\xEF\xBB\xBF\x41", /* UTF-8    */
+               "\x0E\xFE\xFF\x41", /* SCSU     */
 
                "\x2B\x2F\x76\x38\x2D", /* UTF-7        */
                "\x2B\x2F\x76\x38\x41", /* UTF-7        */
                "\x2B\x2F\x76\x39\x41", /* UTF-7        */
                "\x2B\x2F\x76\x2B\x41", /* UTF-7        */
-               "\x2B\x2F\x76\x2F\x41",  /* UTF-7        */
+               "\x2B\x2F\x76\x2F\x41", /* UTF-7         */
 
-               "\xDD\x73\x66\x73"              /* UTF-EBCDIC */
+               "\xDD\x73\x66\x73" /* UTF-EBCDIC */
        };
 
-       static const charexpected[] = {
+       static const char *expected[] = {
                "UTF-16BE",
                "UTF-16LE",
                "UTF-8",
@@ -3286,22 +3270,21 @@ int utc_capi_base_utils_i18n_ucnv_detect_unicode_signature_p(void)
                "UTF-7",
                "UTF-7",
 
-               "UTF-EBCDIC"
-       };
+               "UTF-EBCDIC"};
 
-       static const int32_t expected_len[] ={
+       static const int32_t expected_len[] = {
                2, 2, 3, 3,
                2, 2, 3, 3,
                2, 2, 3, 3,
                5, 4, 4, 4, 4,
-               4
-       };
+               4};
 
        const char *source = NULL;
        const char *name = NULL;
        int32_t signature_length = -1;
 
-       for(int i = 0; i<I18N_UPRV_LENGTHOF(data); ++i) {
+       for (int i = 0; i < I18N_UPRV_LENGTHOF(data); ++i)
+       {
                source = data[i];
                ret = i18n_ucnv_detect_unicode_signature(source, -1, &signature_length, &name);
                assert_eq(ret, I18N_ERROR_NONE);
@@ -3351,19 +3334,21 @@ int utc_capi_base_utils_i18n_ucnv_detect_unicode_signature_n2(void)
  */
 int utc_capi_base_utils_i18n_ucnv_from_ucount_pending_p(void)
 {
-       static const struct {
+       static const struct
+       {
                i18n_uchar input[6];
                int32_t len;
                int32_t exp;
-       }from_unicode_tests[] = {
-               {{ 0xdbc4},1,1},
-               {{ 0xdbc4, 0xde34, 0xd84d},3,1},
+       } from_unicode_tests[] = {
+               {{0xdbc4}, 1, 1},
+               {{0xdbc4, 0xde34, 0xd84d}, 3, 1},
        };
 
        ret = i18n_ucnv_create("UTF-8", &cnv);
        assert_eq(ret, I18N_ERROR_NONE);
 
-       for(int i = 0; i<I18N_UPRV_LENGTHOF(from_unicode_tests); ++i) {
+       for (int i = 0; i < I18N_UPRV_LENGTHOF(from_unicode_tests); ++i)
+       {
                char tgt[10];
                char *target = tgt;
                char *target_limit = target + 10;
@@ -3404,20 +3389,22 @@ int utc_capi_base_utils_i18n_ucnv_from_ucount_pending_n(void)
  */
 int utc_capi_base_utils_i18n_ucnv_to_ucount_pending_p(void)
 {
-       static const struct {
+       static const struct
+       {
                char input[6];
                int32_t len;
                int32_t exp;
-       }to_unicode_tests[] = {
-               {{0x05, 0x01, 0x02},3,3},
-               {{0x01, 0x02},2,2},
-               {{0x07,  0x00, 0x01, 0x02},4,4},
+       } to_unicode_tests[] = {
+               {{0x05, 0x01, 0x02}, 3, 3},
+               {{0x01, 0x02}, 2, 2},
+               {{0x07, 0x00, 0x01, 0x02}, 4, 4},
        };
 
        ret = i18n_ucnv_create("UTF-8", &cnv);
        assert_eq(ret, I18N_ERROR_NONE);
 
-       for(int i = 0; i<I18N_UPRV_LENGTHOF(to_unicode_tests); ++i) {
+       for (int i = 0; i < I18N_UPRV_LENGTHOF(to_unicode_tests); ++i)
+       {
                i18n_uchar tgt[10];
                i18n_uchar *target = tgt;
                i18n_uchar *target_limit = target + 10;
@@ -3460,17 +3447,16 @@ int utc_capi_base_utils_i18n_ucnv_is_fixed_width_p(void)
        const char *fixed_width[] = {
                "US-ASCII",
                "UTF32",
-               "ibm-5478_P100-1995"
-       };
+               "ibm-5478_P100-1995"};
 
        const char *not_fixed_width[] = {
                "GB18030",
                "UTF8",
                "windows-949-2000",
-               "UTF16"
-       };
+               "UTF16"};
 
-       for(int i = 0; i<I18N_UPRV_LENGTHOF(fixed_width); ++i) {
+       for (int i = 0; i < I18N_UPRV_LENGTHOF(fixed_width); ++i)
+       {
                ret = i18n_ucnv_create(fixed_width[i], &cnv);
                assert_eq(ret, I18N_ERROR_NONE);
 
@@ -3480,7 +3466,8 @@ int utc_capi_base_utils_i18n_ucnv_is_fixed_width_p(void)
                assert_eq(result, true);
        }
 
-       for(int i = 0; i<I18N_UPRV_LENGTHOF(not_fixed_width); ++i) {
+       for (int i = 0; i < I18N_UPRV_LENGTHOF(not_fixed_width); ++i)
+       {
                ret = i18n_ucnv_create(not_fixed_width[i], &cnv);
                assert_eq(ret, I18N_ERROR_NONE);