| OLD | NEW |
| 1 /******************************************************************** | 1 /******************************************************************** |
| 2 * COPYRIGHT: | 2 * COPYRIGHT: |
| 3 * Copyright (c) 1997-2010, International Business Machines Corporation and | 3 * Copyright (c) 1997-2010, International Business Machines Corporation and |
| 4 * others. All Rights Reserved. | 4 * others. All Rights Reserved. |
| 5 ********************************************************************/ | 5 ********************************************************************/ |
| 6 /******************************************************************************* | 6 /******************************************************************************* |
| 7 * | 7 * |
| 8 * File CRESTST.C | 8 * File CRESTST.C |
| 9 * | 9 * |
| 10 * Modification History: | 10 * Modification History: |
| (...skipping 2170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2181 checkStatus(__LINE__, U_ZERO_ERROR, status); | 2181 checkStatus(__LINE__, U_ZERO_ERROR, status); |
| 2182 | 2182 |
| 2183 if(U_FAILURE(status)) { | 2183 if(U_FAILURE(status)) { |
| 2184 log_err("%s trying to get string via separate getters\n", u_errorName(st
atus)); | 2184 log_err("%s trying to get string via separate getters\n", u_errorName(st
atus)); |
| 2185 } else if(seqLen != strLen || u_strncmp(sequence, string, seqLen) != 0) { | 2185 } else if(seqLen != strLen || u_strncmp(sequence, string, seqLen) != 0) { |
| 2186 log_err("Referencing alias didn't get the right string (3)\n"); | 2186 log_err("Referencing alias didn't get the right string (3)\n"); |
| 2187 } | 2187 } |
| 2188 | 2188 |
| 2189 | 2189 |
| 2190 { | 2190 { |
| 2191 UResourceBundle* ja = ures_open(U_ICUDATA_BRKITR,"ja", &status); | 2191 UResourceBundle* th = ures_open(U_ICUDATA_BRKITR,"th", &status); |
| 2192 const UChar *got = NULL, *exp=NULL; | 2192 const UChar *got = NULL, *exp=NULL; |
| 2193 int32_t gotLen = 0, expLen=0; | 2193 int32_t gotLen = 0, expLen=0; |
| 2194 ja = ures_getByKey(ja, "boundaries", ja, &status); | 2194 th = ures_getByKey(th, "boundaries", th, &status); |
| 2195 exp = tres_getString(ja, -1, "word", &expLen, &status); | 2195 exp = tres_getString(th, -1, "grapheme", &expLen, &status); |
| 2196 | 2196 |
| 2197 tb = ures_getByKey(aliasB, "boundaries", tb, &status); | 2197 tb = ures_getByKey(aliasB, "boundaries", tb, &status); |
| 2198 got = tres_getString(tb, -1, "word", &gotLen, &status); | 2198 got = tres_getString(tb, -1, "grapheme", &gotLen, &status); |
| 2199 | 2199 |
| 2200 if(U_FAILURE(status)) { | 2200 if(U_FAILURE(status)) { |
| 2201 log_err("%s trying to read str boundaries\n", u_errorName(status
)); | 2201 log_err("%s trying to read str boundaries\n", u_errorName(status
)); |
| 2202 } else if(gotLen != expLen || u_strncmp(exp, got, gotLen) != 0) { | 2202 } else if(gotLen != expLen || u_strncmp(exp, got, gotLen) != 0) { |
| 2203 log_err("Referencing alias didn't get the right data\n"); | 2203 log_err("Referencing alias didn't get the right data\n"); |
| 2204 } | 2204 } |
| 2205 ures_close(ja); | 2205 ures_close(th); |
| 2206 status = U_ZERO_ERROR; | 2206 status = U_ZERO_ERROR; |
| 2207 } | 2207 } |
| 2208 /* simple alias */ | 2208 /* simple alias */ |
| 2209 testtypes = ures_open(testdatapath, "testtypes", &status); | 2209 testtypes = ures_open(testdatapath, "testtypes", &status); |
| 2210 strcpy(buffer, "menu/file/open"); | 2210 strcpy(buffer, "menu/file/open"); |
| 2211 s = buffer; | 2211 s = buffer; |
| 2212 uk = ures_findSubResource(testtypes, s, uk, &status); | 2212 uk = ures_findSubResource(testtypes, s, uk, &status); |
| 2213 sequence = tres_getString(uk, -1, NULL, &seqLen, &status); | 2213 sequence = tres_getString(uk, -1, NULL, &seqLen, &status); |
| 2214 | 2214 |
| 2215 tb = ures_getByKey(aliasB, "simplealias", tb, &status); | 2215 tb = ures_getByKey(aliasB, "simplealias", tb, &status); |
| (...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3023 } | 3023 } |
| 3024 u_versionToString(testCurrent,tmp); | 3024 u_versionToString(testCurrent,tmp); |
| 3025 log_verbose("(data) CurrentCLDRVersion { %s }\n", tmp); | 3025 log_verbose("(data) CurrentCLDRVersion { %s }\n", tmp); |
| 3026 switch(memcmp(cldrVersion, testCurrent, sizeof(UVersionInfo))) { | 3026 switch(memcmp(cldrVersion, testCurrent, sizeof(UVersionInfo))) { |
| 3027 case 0: break; /* OK- current. */ | 3027 case 0: break; /* OK- current. */ |
| 3028 case -1: log_info("CLDR version is behind 'current' (for testdata/root.txt)
%s. Some things may fail.\n", tmp); break; | 3028 case -1: log_info("CLDR version is behind 'current' (for testdata/root.txt)
%s. Some things may fail.\n", tmp); break; |
| 3029 case 1: log_info("CLDR version is ahead of 'current' (for testdata/root.txt)
%s. Some things may fail.\n", tmp); break; | 3029 case 1: log_info("CLDR version is ahead of 'current' (for testdata/root.txt)
%s. Some things may fail.\n", tmp); break; |
| 3030 } | 3030 } |
| 3031 | 3031 |
| 3032 } | 3032 } |
| OLD | NEW |