Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(555)

Side by Side Diff: source/test/perf/convperf/convperf.cpp

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/test/perf/convperf/convperf.h ('k') | source/test/perf/dicttrieperf/dicttrieperf.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ********************************************************************** 2 **********************************************************************
3 * Copyright (c) 2002-2005, International Business Machines 3 * Copyright (c) 2002-2014, International Business Machines
4 * Corporation and others. All Rights Reserved. 4 * Corporation and others. All Rights Reserved.
5 ********************************************************************** 5 **********************************************************************
6 ********************************************************************** 6 **********************************************************************
7 */ 7 */
8 /** 8 /**
9 * This Program tests the performance of ICU's Normalization engine against Wind ows 9 * This Program tests the performance of ICU's Normalization engine against Wind ows
10 * to run it use the command like 10 * to run it use the command like
11 * 11 *
12 * c:\normperf.exe -s C:\work\ICUCupertinoRep\icu4c\collation-perf-data -i 10 - p 15 -f TestNames_Asian.txt -u -e UTF-8 -l 12 * c:\normperf.exe -s C:\work\ICUCupertinoRep\icu4c\collation-perf-data -i 10 - p 15 -f TestNames_Asian.txt -u -e UTF-8 -l
13 */ 13 */
14 #include "convperf.h" 14 #include "convperf.h"
15 #include "data.h" 15 #include "data.h"
16 #include <stdio.h> 16 #include <stdio.h>
17 #include "cmemory.h" // for UPRV_LENGTHOF
17 18
18 int main(int argc, const char* argv[]){ 19 int main(int argc, const char* argv[]){
19 UErrorCode status = U_ZERO_ERROR; 20 UErrorCode status = U_ZERO_ERROR;
20 ConverterPerformanceTest test(argc, argv, status); 21 ConverterPerformanceTest test(argc, argv, status);
21 if(U_FAILURE(status)){ 22 if(U_FAILURE(status)){
22 return status; 23 return status;
23 } 24 }
24 if(test.run()==FALSE){ 25 if(test.run()==FALSE){
25 fprintf(stderr,"FAILED: Tests could not be run please check the argument s.\n"); 26 fprintf(stderr,"FAILED: Tests could not be run please check the argument s.\n");
26 return -1; 27 return -1;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 UErrorCode status = U_ZERO_ERROR; 133 UErrorCode status = U_ZERO_ERROR;
133 UPerfFunction* pf = new ICUOpenAllConvertersFunction(FALSE, status); 134 UPerfFunction* pf = new ICUOpenAllConvertersFunction(FALSE, status);
134 if(U_FAILURE(status)){ 135 if(U_FAILURE(status)){
135 return NULL; 136 return NULL;
136 } 137 }
137 return pf; 138 return pf;
138 } 139 }
139 140
140 UPerfFunction* ConverterPerformanceTest::TestICU_UTF8_FromUnicode(){ 141 UPerfFunction* ConverterPerformanceTest::TestICU_UTF8_FromUnicode(){
141 UErrorCode status = U_ZERO_ERROR; 142 UErrorCode status = U_ZERO_ERROR;
142 ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("utf-8",utf8 _uniSource, LENGTHOF(utf8_uniSource), status); 143 ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("utf-8",utf8 _uniSource, UPRV_LENGTHOF(utf8_uniSource), status);
143 if(U_FAILURE(status)){ 144 if(U_FAILURE(status)){
144 return NULL; 145 return NULL;
145 } 146 }
146 return pf; 147 return pf;
147 } 148 }
148 149
149 UPerfFunction* ConverterPerformanceTest::TestICU_UTF8_ToUnicode(){ 150 UPerfFunction* ConverterPerformanceTest::TestICU_UTF8_ToUnicode(){
150 UErrorCode status = U_ZERO_ERROR; 151 UErrorCode status = U_ZERO_ERROR;
151 UPerfFunction* pf = new ICUToUnicodePerfFunction("utf-8",(char*)utf8_encSour ce, LENGTHOF(utf8_encSource), status); 152 UPerfFunction* pf = new ICUToUnicodePerfFunction("utf-8",(char*)utf8_encSour ce, UPRV_LENGTHOF(utf8_encSource), status);
152 if(U_FAILURE(status)){ 153 if(U_FAILURE(status)){
153 return NULL; 154 return NULL;
154 } 155 }
155 return pf; 156 return pf;
156 } 157 }
157 158
158 159
159 UPerfFunction* ConverterPerformanceTest::TestWinIML2_UTF8_FromUnicode(){ 160 UPerfFunction* ConverterPerformanceTest::TestWinIML2_UTF8_FromUnicode(){
160 UErrorCode status = U_ZERO_ERROR; 161 UErrorCode status = U_ZERO_ERROR;
161 UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("utf-8",ut f8_uniSource, LENGTHOF(utf8_uniSource), status); 162 UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("utf-8",ut f8_uniSource, UPRV_LENGTHOF(utf8_uniSource), status);
162 if(U_FAILURE(status)){ 163 if(U_FAILURE(status)){
163 return NULL; 164 return NULL;
164 } 165 }
165 return pf; 166 return pf;
166 } 167 }
167 168
168 UPerfFunction* ConverterPerformanceTest::TestWinIML2_UTF8_ToUnicode(){ 169 UPerfFunction* ConverterPerformanceTest::TestWinIML2_UTF8_ToUnicode(){
169 UErrorCode status = U_ZERO_ERROR; 170 UErrorCode status = U_ZERO_ERROR;
170 UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("utf-8",(cha r*)utf8_encSource, LENGTHOF(utf8_encSource), status); 171 UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("utf-8",(cha r*)utf8_encSource, UPRV_LENGTHOF(utf8_encSource), status);
171 if(U_FAILURE(status)){ 172 if(U_FAILURE(status)){
172 return NULL; 173 return NULL;
173 } 174 }
174 return pf; 175 return pf;
175 } 176 }
176 177
177 UPerfFunction* ConverterPerformanceTest::TestWinANSI_UTF8_FromUnicode(){ 178 UPerfFunction* ConverterPerformanceTest::TestWinANSI_UTF8_FromUnicode(){
178 UErrorCode status = U_ZERO_ERROR; 179 UErrorCode status = U_ZERO_ERROR;
179 UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("utf-8",utf8_uniSourc e, LENGTHOF(utf8_uniSource), status); 180 UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("utf-8",utf8_uniSourc e, UPRV_LENGTHOF(utf8_uniSource), status);
180 if(U_FAILURE(status)){ 181 if(U_FAILURE(status)){
181 return NULL; 182 return NULL;
182 } 183 }
183 return pf; 184 return pf;
184 } 185 }
185 186
186 UPerfFunction* ConverterPerformanceTest::TestWinANSI_UTF8_ToUnicode(){ 187 UPerfFunction* ConverterPerformanceTest::TestWinANSI_UTF8_ToUnicode(){
187 UErrorCode status = U_ZERO_ERROR; 188 UErrorCode status = U_ZERO_ERROR;
188 UPerfFunction* pf = new WinANSIToUnicodePerfFunction("utf-8",(char*)utf8_enc Source, LENGTHOF(utf8_encSource), status); 189 UPerfFunction* pf = new WinANSIToUnicodePerfFunction("utf-8",(char*)utf8_enc Source, UPRV_LENGTHOF(utf8_encSource), status);
189 if(U_FAILURE(status)){ 190 if(U_FAILURE(status)){
190 return NULL; 191 return NULL;
191 } 192 }
192 return pf; 193 return pf;
193 } 194 }
194 195
195 //################ 196 //################
196 197
197 UPerfFunction* ConverterPerformanceTest::TestICU_Latin1_FromUnicode(){ 198 UPerfFunction* ConverterPerformanceTest::TestICU_Latin1_FromUnicode(){
198 UErrorCode status = U_ZERO_ERROR; 199 UErrorCode status = U_ZERO_ERROR;
199 ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-8859-1" ,latin1_uniSource, LENGTHOF(latin1_uniSource), status); 200 ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-8859-1" ,latin1_uniSource, UPRV_LENGTHOF(latin1_uniSource), status);
200 if(U_FAILURE(status)){ 201 if(U_FAILURE(status)){
201 return NULL; 202 return NULL;
202 } 203 }
203 return pf; 204 return pf;
204 } 205 }
205 206
206 UPerfFunction* ConverterPerformanceTest::TestICU_Latin1_ToUnicode(){ 207 UPerfFunction* ConverterPerformanceTest::TestICU_Latin1_ToUnicode(){
207 UErrorCode status = U_ZERO_ERROR; 208 UErrorCode status = U_ZERO_ERROR;
208 UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-8859-1",(char*)latin1_ encSource, LENGTHOF(latin1_encSource), status); 209 UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-8859-1",(char*)latin1_ encSource, UPRV_LENGTHOF(latin1_encSource), status);
209 if(U_FAILURE(status)){ 210 if(U_FAILURE(status)){
210 return NULL; 211 return NULL;
211 } 212 }
212 return pf; 213 return pf;
213 } 214 }
214 215
215 216
216 UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin1_FromUnicode(){ 217 UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin1_FromUnicode(){
217 UErrorCode status = U_ZERO_ERROR; 218 UErrorCode status = U_ZERO_ERROR;
218 UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-8859- 1",latin1_uniSource, LENGTHOF(latin1_uniSource), status); 219 UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-8859- 1",latin1_uniSource, UPRV_LENGTHOF(latin1_uniSource), status);
219 if(U_FAILURE(status)){ 220 if(U_FAILURE(status)){
220 return NULL; 221 return NULL;
221 } 222 }
222 return pf; 223 return pf;
223 } 224 }
224 225
225 UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin1_ToUnicode(){ 226 UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin1_ToUnicode(){
226 UErrorCode status = U_ZERO_ERROR; 227 UErrorCode status = U_ZERO_ERROR;
227 UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-8859-1" ,(char*)latin1_encSource, LENGTHOF(latin1_encSource), status); 228 UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-8859-1" ,(char*)latin1_encSource, UPRV_LENGTHOF(latin1_encSource), status);
228 if(U_FAILURE(status)){ 229 if(U_FAILURE(status)){
229 return NULL; 230 return NULL;
230 } 231 }
231 return pf; 232 return pf;
232 } 233 }
233 234
234 UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin1_FromUnicode(){ 235 UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin1_FromUnicode(){
235 UErrorCode status = U_ZERO_ERROR; 236 UErrorCode status = U_ZERO_ERROR;
236 UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-8859-1",latin1_u niSource, LENGTHOF(latin1_uniSource), status); 237 UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-8859-1",latin1_u niSource, UPRV_LENGTHOF(latin1_uniSource), status);
237 if(U_FAILURE(status)){ 238 if(U_FAILURE(status)){
238 return NULL; 239 return NULL;
239 } 240 }
240 return pf; 241 return pf;
241 } 242 }
242 243
243 UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin1_ToUnicode(){ 244 UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin1_ToUnicode(){
244 UErrorCode status = U_ZERO_ERROR; 245 UErrorCode status = U_ZERO_ERROR;
245 UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-8859-1",(char*)lat in1_encSource, LENGTHOF(latin1_encSource), status); 246 UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-8859-1",(char*)lat in1_encSource, UPRV_LENGTHOF(latin1_encSource), status);
246 if(U_FAILURE(status)){ 247 if(U_FAILURE(status)){
247 return NULL; 248 return NULL;
248 } 249 }
249 return pf; 250 return pf;
250 } 251 }
251 252
252 //################## 253 //##################
253 254
254 UPerfFunction* ConverterPerformanceTest::TestICU_Latin8_FromUnicode(){ 255 UPerfFunction* ConverterPerformanceTest::TestICU_Latin8_FromUnicode(){
255 UErrorCode status = U_ZERO_ERROR; 256 UErrorCode status = U_ZERO_ERROR;
256 ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-8859-8" ,latin8_uniSource, LENGTHOF(latin8_uniSource), status); 257 ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-8859-8" ,latin8_uniSource, UPRV_LENGTHOF(latin8_uniSource), status);
257 if(U_FAILURE(status)){ 258 if(U_FAILURE(status)){
258 return NULL; 259 return NULL;
259 } 260 }
260 return pf; 261 return pf;
261 } 262 }
262 263
263 UPerfFunction* ConverterPerformanceTest::TestICU_Latin8_ToUnicode(){ 264 UPerfFunction* ConverterPerformanceTest::TestICU_Latin8_ToUnicode(){
264 UErrorCode status = U_ZERO_ERROR; 265 UErrorCode status = U_ZERO_ERROR;
265 UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-8859-8",(char*)latin8_ encSource, LENGTHOF(latin8_encSource), status); 266 UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-8859-8",(char*)latin8_ encSource, UPRV_LENGTHOF(latin8_encSource), status);
266 if(U_FAILURE(status)){ 267 if(U_FAILURE(status)){
267 return NULL; 268 return NULL;
268 } 269 }
269 return pf; 270 return pf;
270 } 271 }
271 272
272 273
273 UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin8_FromUnicode(){ 274 UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin8_FromUnicode(){
274 UErrorCode status = U_ZERO_ERROR; 275 UErrorCode status = U_ZERO_ERROR;
275 UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-8859- 8",latin8_uniSource, LENGTHOF(latin8_uniSource), status); 276 UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-8859- 8",latin8_uniSource, UPRV_LENGTHOF(latin8_uniSource), status);
276 if(U_FAILURE(status)){ 277 if(U_FAILURE(status)){
277 return NULL; 278 return NULL;
278 } 279 }
279 return pf; 280 return pf;
280 } 281 }
281 282
282 UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin8_ToUnicode(){ 283 UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin8_ToUnicode(){
283 UErrorCode status = U_ZERO_ERROR; 284 UErrorCode status = U_ZERO_ERROR;
284 UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-8859-8" ,(char*)latin8_encSource, LENGTHOF(latin8_encSource), status); 285 UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-8859-8" ,(char*)latin8_encSource, UPRV_LENGTHOF(latin8_encSource), status);
285 if(U_FAILURE(status)){ 286 if(U_FAILURE(status)){
286 return NULL; 287 return NULL;
287 } 288 }
288 return pf; 289 return pf;
289 } 290 }
290 UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin8_FromUnicode(){ 291 UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin8_FromUnicode(){
291 UErrorCode status = U_ZERO_ERROR; 292 UErrorCode status = U_ZERO_ERROR;
292 UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-8859-8",latin8_u niSource, LENGTHOF(latin8_uniSource), status); 293 UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-8859-8",latin8_u niSource, UPRV_LENGTHOF(latin8_uniSource), status);
293 if(U_FAILURE(status)){ 294 if(U_FAILURE(status)){
294 return NULL; 295 return NULL;
295 } 296 }
296 return pf; 297 return pf;
297 } 298 }
298 299
299 UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin8_ToUnicode(){ 300 UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin8_ToUnicode(){
300 UErrorCode status = U_ZERO_ERROR; 301 UErrorCode status = U_ZERO_ERROR;
301 UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-8859-8",(char*)lat in8_encSource, LENGTHOF(latin8_encSource), status); 302 UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-8859-8",(char*)lat in8_encSource, UPRV_LENGTHOF(latin8_encSource), status);
302 if(U_FAILURE(status)){ 303 if(U_FAILURE(status)){
303 return NULL; 304 return NULL;
304 } 305 }
305 return pf; 306 return pf;
306 } 307 }
307 308
308 //################# 309 //#################
309 310
310 311
311 UPerfFunction* ConverterPerformanceTest::TestICU_EBCDIC_Arabic_FromUnicode(){ 312 UPerfFunction* ConverterPerformanceTest::TestICU_EBCDIC_Arabic_FromUnicode(){
312 UErrorCode status = U_ZERO_ERROR; 313 UErrorCode status = U_ZERO_ERROR;
313 ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("x-EBCDIC-Ar abic",ebcdic_arabic_uniSource, LENGTHOF(ebcdic_arabic_uniSource), status); 314 ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("x-EBCDIC-Ar abic",ebcdic_arabic_uniSource, UPRV_LENGTHOF(ebcdic_arabic_uniSource), status);
314 if(U_FAILURE(status)){ 315 if(U_FAILURE(status)){
315 return NULL; 316 return NULL;
316 } 317 }
317 return pf; 318 return pf;
318 } 319 }
319 320
320 UPerfFunction* ConverterPerformanceTest::TestICU_EBCDIC_Arabic_ToUnicode(){ 321 UPerfFunction* ConverterPerformanceTest::TestICU_EBCDIC_Arabic_ToUnicode(){
321 UErrorCode status = U_ZERO_ERROR; 322 UErrorCode status = U_ZERO_ERROR;
322 UPerfFunction* pf = new ICUToUnicodePerfFunction("x-EBCDIC-Arabic",(char*)eb cdic_arabic_encSource, LENGTHOF(ebcdic_arabic_encSource), status); 323 UPerfFunction* pf = new ICUToUnicodePerfFunction("x-EBCDIC-Arabic",(char*)eb cdic_arabic_encSource, UPRV_LENGTHOF(ebcdic_arabic_encSource), status);
323 if(U_FAILURE(status)){ 324 if(U_FAILURE(status)){
324 return NULL; 325 return NULL;
325 } 326 }
326 return pf; 327 return pf;
327 } 328 }
328 329
329 330
330 UPerfFunction* ConverterPerformanceTest::TestWinIML2_EBCDIC_Arabic_FromUnicode() { 331 UPerfFunction* ConverterPerformanceTest::TestWinIML2_EBCDIC_Arabic_FromUnicode() {
331 UErrorCode status = U_ZERO_ERROR; 332 UErrorCode status = U_ZERO_ERROR;
332 UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("x-EBCDIC- Arabic",ebcdic_arabic_uniSource, LENGTHOF(ebcdic_arabic_uniSource), status); 333 UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("x-EBCDIC- Arabic",ebcdic_arabic_uniSource, UPRV_LENGTHOF(ebcdic_arabic_uniSource), status) ;
333 if(U_FAILURE(status)){ 334 if(U_FAILURE(status)){
334 return NULL; 335 return NULL;
335 } 336 }
336 return pf; 337 return pf;
337 } 338 }
338 339
339 UPerfFunction* ConverterPerformanceTest::TestWinIML2_EBCDIC_Arabic_ToUnicode(){ 340 UPerfFunction* ConverterPerformanceTest::TestWinIML2_EBCDIC_Arabic_ToUnicode(){
340 UErrorCode status = U_ZERO_ERROR; 341 UErrorCode status = U_ZERO_ERROR;
341 UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("x-EBCDIC-Ar abic",(char*)ebcdic_arabic_encSource, LENGTHOF(ebcdic_arabic_encSource), status) ; 342 UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("x-EBCDIC-Ar abic",(char*)ebcdic_arabic_encSource, UPRV_LENGTHOF(ebcdic_arabic_encSource), st atus);
342 if(U_FAILURE(status)){ 343 if(U_FAILURE(status)){
343 return NULL; 344 return NULL;
344 } 345 }
345 return pf; 346 return pf;
346 } 347 }
347 348
348 UPerfFunction* ConverterPerformanceTest::TestWinANSI_EBCDIC_Arabic_FromUnicode() { 349 UPerfFunction* ConverterPerformanceTest::TestWinANSI_EBCDIC_Arabic_FromUnicode() {
349 UErrorCode status = U_ZERO_ERROR; 350 UErrorCode status = U_ZERO_ERROR;
350 UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("x-EBCDIC-Arabic",ebc dic_arabic_uniSource, LENGTHOF(ebcdic_arabic_uniSource), status); 351 UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("x-EBCDIC-Arabic",ebc dic_arabic_uniSource, UPRV_LENGTHOF(ebcdic_arabic_uniSource), status);
351 if(U_FAILURE(status)){ 352 if(U_FAILURE(status)){
352 return NULL; 353 return NULL;
353 } 354 }
354 return pf; 355 return pf;
355 } 356 }
356 357
357 UPerfFunction* ConverterPerformanceTest::TestWinANSI_EBCDIC_Arabic_ToUnicode(){ 358 UPerfFunction* ConverterPerformanceTest::TestWinANSI_EBCDIC_Arabic_ToUnicode(){
358 UErrorCode status = U_ZERO_ERROR; 359 UErrorCode status = U_ZERO_ERROR;
359 UPerfFunction* pf = new WinANSIToUnicodePerfFunction("x-EBCDIC-Arabic",(char *)ebcdic_arabic_encSource, LENGTHOF(ebcdic_arabic_encSource), status); 360 UPerfFunction* pf = new WinANSIToUnicodePerfFunction("x-EBCDIC-Arabic",(char *)ebcdic_arabic_encSource, UPRV_LENGTHOF(ebcdic_arabic_encSource), status);
360 if(U_FAILURE(status)){ 361 if(U_FAILURE(status)){
361 return NULL; 362 return NULL;
362 } 363 }
363 return pf; 364 return pf;
364 } 365 }
365 //################# 366 //#################
366 367
367 368
368 UPerfFunction* ConverterPerformanceTest::TestICU_SJIS_FromUnicode(){ 369 UPerfFunction* ConverterPerformanceTest::TestICU_SJIS_FromUnicode(){
369 UErrorCode status = U_ZERO_ERROR; 370 UErrorCode status = U_ZERO_ERROR;
370 ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("sjis",sjis_ uniSource, LENGTHOF(sjis_uniSource), status); 371 ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("sjis",sjis_ uniSource, UPRV_LENGTHOF(sjis_uniSource), status);
371 if(U_FAILURE(status)){ 372 if(U_FAILURE(status)){
372 return NULL; 373 return NULL;
373 } 374 }
374 return pf; 375 return pf;
375 } 376 }
376 377
377 UPerfFunction* ConverterPerformanceTest::TestICU_SJIS_ToUnicode(){ 378 UPerfFunction* ConverterPerformanceTest::TestICU_SJIS_ToUnicode(){
378 UErrorCode status = U_ZERO_ERROR; 379 UErrorCode status = U_ZERO_ERROR;
379 UPerfFunction* pf = new ICUToUnicodePerfFunction("sjis",(char*)sjis_encSourc e, LENGTHOF(sjis_encSource), status); 380 UPerfFunction* pf = new ICUToUnicodePerfFunction("sjis",(char*)sjis_encSourc e, UPRV_LENGTHOF(sjis_encSource), status);
380 if(U_FAILURE(status)){ 381 if(U_FAILURE(status)){
381 return NULL; 382 return NULL;
382 } 383 }
383 return pf; 384 return pf;
384 } 385 }
385 386
386 387
387 UPerfFunction* ConverterPerformanceTest::TestWinIML2_SJIS_FromUnicode(){ 388 UPerfFunction* ConverterPerformanceTest::TestWinIML2_SJIS_FromUnicode(){
388 UErrorCode status = U_ZERO_ERROR; 389 UErrorCode status = U_ZERO_ERROR;
389 UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("sjis",sji s_uniSource, LENGTHOF(sjis_uniSource), status); 390 UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("sjis",sji s_uniSource, UPRV_LENGTHOF(sjis_uniSource), status);
390 if(U_FAILURE(status)){ 391 if(U_FAILURE(status)){
391 return NULL; 392 return NULL;
392 } 393 }
393 return pf; 394 return pf;
394 } 395 }
395 396
396 UPerfFunction* ConverterPerformanceTest::TestWinIML2_SJIS_ToUnicode(){ 397 UPerfFunction* ConverterPerformanceTest::TestWinIML2_SJIS_ToUnicode(){
397 UErrorCode status = U_ZERO_ERROR; 398 UErrorCode status = U_ZERO_ERROR;
398 UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("sjis",(char *)sjis_encSource, LENGTHOF(sjis_encSource), status); 399 UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("sjis",(char *)sjis_encSource, UPRV_LENGTHOF(sjis_encSource), status);
399 if(U_FAILURE(status)){ 400 if(U_FAILURE(status)){
400 return NULL; 401 return NULL;
401 } 402 }
402 return pf; 403 return pf;
403 } 404 }
404 405
405 UPerfFunction* ConverterPerformanceTest::TestWinANSI_SJIS_FromUnicode(){ 406 UPerfFunction* ConverterPerformanceTest::TestWinANSI_SJIS_FromUnicode(){
406 UErrorCode status = U_ZERO_ERROR; 407 UErrorCode status = U_ZERO_ERROR;
407 UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("sjis",sjis_uniSource , LENGTHOF(sjis_uniSource), status); 408 UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("sjis",sjis_uniSource , UPRV_LENGTHOF(sjis_uniSource), status);
408 if(U_FAILURE(status)){ 409 if(U_FAILURE(status)){
409 return NULL; 410 return NULL;
410 } 411 }
411 return pf; 412 return pf;
412 } 413 }
413 414
414 UPerfFunction* ConverterPerformanceTest::TestWinANSI_SJIS_ToUnicode(){ 415 UPerfFunction* ConverterPerformanceTest::TestWinANSI_SJIS_ToUnicode(){
415 UErrorCode status = U_ZERO_ERROR; 416 UErrorCode status = U_ZERO_ERROR;
416 UPerfFunction* pf = new WinANSIToUnicodePerfFunction("sjis",(char*)sjis_encS ource, LENGTHOF(sjis_encSource), status); 417 UPerfFunction* pf = new WinANSIToUnicodePerfFunction("sjis",(char*)sjis_encS ource, UPRV_LENGTHOF(sjis_encSource), status);
417 if(U_FAILURE(status)){ 418 if(U_FAILURE(status)){
418 return NULL; 419 return NULL;
419 } 420 }
420 return pf; 421 return pf;
421 } 422 }
422 423
423 424
424 //################# 425 //#################
425 426
426 427
427 UPerfFunction* ConverterPerformanceTest::TestICU_EUCJP_FromUnicode(){ 428 UPerfFunction* ConverterPerformanceTest::TestICU_EUCJP_FromUnicode(){
428 UErrorCode status = U_ZERO_ERROR; 429 UErrorCode status = U_ZERO_ERROR;
429 ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("euc-jp",euc jp_uniSource, LENGTHOF(eucjp_uniSource), status); 430 ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("euc-jp",euc jp_uniSource, UPRV_LENGTHOF(eucjp_uniSource), status);
430 if(U_FAILURE(status)){ 431 if(U_FAILURE(status)){
431 return NULL; 432 return NULL;
432 } 433 }
433 return pf; 434 return pf;
434 } 435 }
435 436
436 UPerfFunction* ConverterPerformanceTest::TestICU_EUCJP_ToUnicode(){ 437 UPerfFunction* ConverterPerformanceTest::TestICU_EUCJP_ToUnicode(){
437 UErrorCode status = U_ZERO_ERROR; 438 UErrorCode status = U_ZERO_ERROR;
438 UPerfFunction* pf = new ICUToUnicodePerfFunction("euc-jp",(char*)eucjp_encSo urce, LENGTHOF(eucjp_encSource), status); 439 UPerfFunction* pf = new ICUToUnicodePerfFunction("euc-jp",(char*)eucjp_encSo urce, UPRV_LENGTHOF(eucjp_encSource), status);
439 if(U_FAILURE(status)){ 440 if(U_FAILURE(status)){
440 return NULL; 441 return NULL;
441 } 442 }
442 return pf; 443 return pf;
443 } 444 }
444 445
445 446
446 UPerfFunction* ConverterPerformanceTest::TestWinIML2_EUCJP_FromUnicode(){ 447 UPerfFunction* ConverterPerformanceTest::TestWinIML2_EUCJP_FromUnicode(){
447 UErrorCode status = U_ZERO_ERROR; 448 UErrorCode status = U_ZERO_ERROR;
448 UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("euc-jp",e ucjp_uniSource, LENGTHOF(eucjp_uniSource), status); 449 UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("euc-jp",e ucjp_uniSource, UPRV_LENGTHOF(eucjp_uniSource), status);
449 if(U_FAILURE(status)){ 450 if(U_FAILURE(status)){
450 return NULL; 451 return NULL;
451 } 452 }
452 return pf; 453 return pf;
453 } 454 }
454 455
455 UPerfFunction* ConverterPerformanceTest::TestWinIML2_EUCJP_ToUnicode(){ 456 UPerfFunction* ConverterPerformanceTest::TestWinIML2_EUCJP_ToUnicode(){
456 UErrorCode status = U_ZERO_ERROR; 457 UErrorCode status = U_ZERO_ERROR;
457 UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("euc-jp",(ch ar*)eucjp_encSource, LENGTHOF(eucjp_encSource), status); 458 UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("euc-jp",(ch ar*)eucjp_encSource, UPRV_LENGTHOF(eucjp_encSource), status);
458 if(U_FAILURE(status)){ 459 if(U_FAILURE(status)){
459 return NULL; 460 return NULL;
460 } 461 }
461 return pf; 462 return pf;
462 } 463 }
463 464
464 UPerfFunction* ConverterPerformanceTest::TestWinANSI_EUCJP_FromUnicode(){ 465 UPerfFunction* ConverterPerformanceTest::TestWinANSI_EUCJP_FromUnicode(){
465 UErrorCode status = U_ZERO_ERROR; 466 UErrorCode status = U_ZERO_ERROR;
466 UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("euc-jp",eucjp_uniSou rce, LENGTHOF(eucjp_uniSource), status); 467 UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("euc-jp",eucjp_uniSou rce, UPRV_LENGTHOF(eucjp_uniSource), status);
467 if(U_FAILURE(status)){ 468 if(U_FAILURE(status)){
468 return NULL; 469 return NULL;
469 } 470 }
470 return pf; 471 return pf;
471 } 472 }
472 473
473 UPerfFunction* ConverterPerformanceTest::TestWinANSI_EUCJP_ToUnicode(){ 474 UPerfFunction* ConverterPerformanceTest::TestWinANSI_EUCJP_ToUnicode(){
474 UErrorCode status = U_ZERO_ERROR; 475 UErrorCode status = U_ZERO_ERROR;
475 UPerfFunction* pf = new WinANSIToUnicodePerfFunction("euc-jp",(char*)eucjp_e ncSource, LENGTHOF(eucjp_encSource), status); 476 UPerfFunction* pf = new WinANSIToUnicodePerfFunction("euc-jp",(char*)eucjp_e ncSource, UPRV_LENGTHOF(eucjp_encSource), status);
476 if(U_FAILURE(status)){ 477 if(U_FAILURE(status)){
477 return NULL; 478 return NULL;
478 } 479 }
479 return pf; 480 return pf;
480 } 481 }
481 482
482 483
483 //################# 484 //#################
484 485
485 486
486 UPerfFunction* ConverterPerformanceTest::TestICU_GB2312_FromUnicode(){ 487 UPerfFunction* ConverterPerformanceTest::TestICU_GB2312_FromUnicode(){
487 UErrorCode status = U_ZERO_ERROR; 488 UErrorCode status = U_ZERO_ERROR;
488 ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("gb2312",gb2 312_uniSource, LENGTHOF(gb2312_uniSource), status); 489 ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("gb2312",gb2 312_uniSource, UPRV_LENGTHOF(gb2312_uniSource), status);
489 if(U_FAILURE(status)){ 490 if(U_FAILURE(status)){
490 return NULL; 491 return NULL;
491 } 492 }
492 return pf; 493 return pf;
493 } 494 }
494 495
495 UPerfFunction* ConverterPerformanceTest::TestICU_GB2312_ToUnicode(){ 496 UPerfFunction* ConverterPerformanceTest::TestICU_GB2312_ToUnicode(){
496 UErrorCode status = U_ZERO_ERROR; 497 UErrorCode status = U_ZERO_ERROR;
497 UPerfFunction* pf = new ICUToUnicodePerfFunction("gb2312",(char*)gb2312_encS ource, LENGTHOF(gb2312_encSource), status); 498 UPerfFunction* pf = new ICUToUnicodePerfFunction("gb2312",(char*)gb2312_encS ource, UPRV_LENGTHOF(gb2312_encSource), status);
498 if(U_FAILURE(status)){ 499 if(U_FAILURE(status)){
499 return NULL; 500 return NULL;
500 } 501 }
501 return pf; 502 return pf;
502 } 503 }
503 504
504 505
505 UPerfFunction* ConverterPerformanceTest::TestWinIML2_GB2312_FromUnicode(){ 506 UPerfFunction* ConverterPerformanceTest::TestWinIML2_GB2312_FromUnicode(){
506 UErrorCode status = U_ZERO_ERROR; 507 UErrorCode status = U_ZERO_ERROR;
507 UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("gb2312",g b2312_uniSource, LENGTHOF(gb2312_uniSource), status); 508 UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("gb2312",g b2312_uniSource, UPRV_LENGTHOF(gb2312_uniSource), status);
508 if(U_FAILURE(status)){ 509 if(U_FAILURE(status)){
509 return NULL; 510 return NULL;
510 } 511 }
511 return pf; 512 return pf;
512 } 513 }
513 514
514 UPerfFunction* ConverterPerformanceTest::TestWinIML2_GB2312_ToUnicode(){ 515 UPerfFunction* ConverterPerformanceTest::TestWinIML2_GB2312_ToUnicode(){
515 UErrorCode status = U_ZERO_ERROR; 516 UErrorCode status = U_ZERO_ERROR;
516 UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("gb2312",(ch ar*)gb2312_encSource, LENGTHOF(gb2312_encSource), status); 517 UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("gb2312",(ch ar*)gb2312_encSource, UPRV_LENGTHOF(gb2312_encSource), status);
517 if(U_FAILURE(status)){ 518 if(U_FAILURE(status)){
518 return NULL; 519 return NULL;
519 } 520 }
520 return pf; 521 return pf;
521 } 522 }
522 523
523 UPerfFunction* ConverterPerformanceTest::TestWinANSI_GB2312_FromUnicode(){ 524 UPerfFunction* ConverterPerformanceTest::TestWinANSI_GB2312_FromUnicode(){
524 UErrorCode status = U_ZERO_ERROR; 525 UErrorCode status = U_ZERO_ERROR;
525 UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("gb2312",gb2312_uniSo urce, LENGTHOF(gb2312_uniSource), status); 526 UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("gb2312",gb2312_uniSo urce, UPRV_LENGTHOF(gb2312_uniSource), status);
526 if(U_FAILURE(status)){ 527 if(U_FAILURE(status)){
527 return NULL; 528 return NULL;
528 } 529 }
529 return pf; 530 return pf;
530 } 531 }
531 532
532 UPerfFunction* ConverterPerformanceTest::TestWinANSI_GB2312_ToUnicode(){ 533 UPerfFunction* ConverterPerformanceTest::TestWinANSI_GB2312_ToUnicode(){
533 UErrorCode status = U_ZERO_ERROR; 534 UErrorCode status = U_ZERO_ERROR;
534 UPerfFunction* pf = new WinANSIToUnicodePerfFunction("gb2312",(char*)gb2312_ encSource, LENGTHOF(gb2312_encSource), status); 535 UPerfFunction* pf = new WinANSIToUnicodePerfFunction("gb2312",(char*)gb2312_ encSource, UPRV_LENGTHOF(gb2312_encSource), status);
535 if(U_FAILURE(status)){ 536 if(U_FAILURE(status)){
536 return NULL; 537 return NULL;
537 } 538 }
538 return pf; 539 return pf;
539 } 540 }
540 541
541 //################# 542 //#################
542 543
543 544
544 UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022KR_FromUnicode(){ 545 UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022KR_FromUnicode(){
545 UErrorCode status = U_ZERO_ERROR; 546 UErrorCode status = U_ZERO_ERROR;
546 ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-2022-kr ",iso2022kr_uniSource, LENGTHOF(iso2022kr_uniSource), status); 547 ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-2022-kr ",iso2022kr_uniSource, UPRV_LENGTHOF(iso2022kr_uniSource), status);
547 if(U_FAILURE(status)){ 548 if(U_FAILURE(status)){
548 return NULL; 549 return NULL;
549 } 550 }
550 return pf; 551 return pf;
551 } 552 }
552 553
553 UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022KR_ToUnicode(){ 554 UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022KR_ToUnicode(){
554 UErrorCode status = U_ZERO_ERROR; 555 UErrorCode status = U_ZERO_ERROR;
555 UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-2022-kr",(char*)iso202 2kr_encSource, LENGTHOF(iso2022kr_encSource), status); 556 UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-2022-kr",(char*)iso202 2kr_encSource, UPRV_LENGTHOF(iso2022kr_encSource), status);
556 if(U_FAILURE(status)){ 557 if(U_FAILURE(status)){
557 return NULL; 558 return NULL;
558 } 559 }
559 return pf; 560 return pf;
560 } 561 }
561 562
562 563
563 UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022KR_FromUnicode(){ 564 UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022KR_FromUnicode(){
564 UErrorCode status = U_ZERO_ERROR; 565 UErrorCode status = U_ZERO_ERROR;
565 UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-2022- kr",iso2022kr_uniSource, LENGTHOF(iso2022kr_uniSource), status); 566 UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-2022- kr",iso2022kr_uniSource, UPRV_LENGTHOF(iso2022kr_uniSource), status);
566 if(U_FAILURE(status)){ 567 if(U_FAILURE(status)){
567 return NULL; 568 return NULL;
568 } 569 }
569 return pf; 570 return pf;
570 } 571 }
571 572
572 UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022KR_ToUnicode(){ 573 UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022KR_ToUnicode(){
573 UErrorCode status = U_ZERO_ERROR; 574 UErrorCode status = U_ZERO_ERROR;
574 UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-2022-kr ",(char*)iso2022kr_encSource, LENGTHOF(iso2022kr_encSource), status); 575 UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-2022-kr ",(char*)iso2022kr_encSource, UPRV_LENGTHOF(iso2022kr_encSource), status);
575 if(U_FAILURE(status)){ 576 if(U_FAILURE(status)){
576 return NULL; 577 return NULL;
577 } 578 }
578 return pf; 579 return pf;
579 } 580 }
580 581
581 UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022KR_FromUnicode(){ 582 UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022KR_FromUnicode(){
582 UErrorCode status = U_ZERO_ERROR; 583 UErrorCode status = U_ZERO_ERROR;
583 UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-2022-kr",iso2022 kr_uniSource, LENGTHOF(iso2022kr_uniSource), status); 584 UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-2022-kr",iso2022 kr_uniSource, UPRV_LENGTHOF(iso2022kr_uniSource), status);
584 if(U_FAILURE(status)){ 585 if(U_FAILURE(status)){
585 return NULL; 586 return NULL;
586 } 587 }
587 return pf; 588 return pf;
588 } 589 }
589 590
590 UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022KR_ToUnicode(){ 591 UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022KR_ToUnicode(){
591 UErrorCode status = U_ZERO_ERROR; 592 UErrorCode status = U_ZERO_ERROR;
592 UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-2022-kr",(char*)is o2022kr_encSource, LENGTHOF(iso2022kr_encSource), status); 593 UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-2022-kr",(char*)is o2022kr_encSource, UPRV_LENGTHOF(iso2022kr_encSource), status);
593 if(U_FAILURE(status)){ 594 if(U_FAILURE(status)){
594 return NULL; 595 return NULL;
595 } 596 }
596 return pf; 597 return pf;
597 } 598 }
598 //################# 599 //#################
599 600
600 601
601 UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022JP_FromUnicode(){ 602 UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022JP_FromUnicode(){
602 UErrorCode status = U_ZERO_ERROR; 603 UErrorCode status = U_ZERO_ERROR;
603 ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-2022-jp ",iso2022jp_uniSource, LENGTHOF(iso2022jp_uniSource), status); 604 ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-2022-jp ",iso2022jp_uniSource, UPRV_LENGTHOF(iso2022jp_uniSource), status);
604 if(U_FAILURE(status)){ 605 if(U_FAILURE(status)){
605 return NULL; 606 return NULL;
606 } 607 }
607 return pf; 608 return pf;
608 } 609 }
609 610
610 UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022JP_ToUnicode(){ 611 UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022JP_ToUnicode(){
611 UErrorCode status = U_ZERO_ERROR; 612 UErrorCode status = U_ZERO_ERROR;
612 UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-2022-jp",(char*)iso202 2jp_encSource, LENGTHOF(iso2022jp_encSource), status); 613 UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-2022-jp",(char*)iso202 2jp_encSource, UPRV_LENGTHOF(iso2022jp_encSource), status);
613 if(U_FAILURE(status)){ 614 if(U_FAILURE(status)){
614 return NULL; 615 return NULL;
615 } 616 }
616 return pf; 617 return pf;
617 } 618 }
618 619
619 620
620 UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022JP_FromUnicode(){ 621 UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022JP_FromUnicode(){
621 UErrorCode status = U_ZERO_ERROR; 622 UErrorCode status = U_ZERO_ERROR;
622 UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-2022- jp",iso2022jp_uniSource, LENGTHOF(iso2022jp_uniSource), status); 623 UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-2022- jp",iso2022jp_uniSource, UPRV_LENGTHOF(iso2022jp_uniSource), status);
623 if(U_FAILURE(status)){ 624 if(U_FAILURE(status)){
624 return NULL; 625 return NULL;
625 } 626 }
626 return pf; 627 return pf;
627 } 628 }
628 629
629 UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022JP_ToUnicode(){ 630 UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022JP_ToUnicode(){
630 UErrorCode status = U_ZERO_ERROR; 631 UErrorCode status = U_ZERO_ERROR;
631 UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-2022-jp ",(char*)iso2022jp_encSource, LENGTHOF(iso2022jp_encSource), status); 632 UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-2022-jp ",(char*)iso2022jp_encSource, UPRV_LENGTHOF(iso2022jp_encSource), status);
632 if(U_FAILURE(status)){ 633 if(U_FAILURE(status)){
633 return NULL; 634 return NULL;
634 } 635 }
635 return pf; 636 return pf;
636 } 637 }
637 638
638 UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022JP_FromUnicode(){ 639 UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022JP_FromUnicode(){
639 UErrorCode status = U_ZERO_ERROR; 640 UErrorCode status = U_ZERO_ERROR;
640 UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-2022-jp",iso2022 jp_uniSource, LENGTHOF(iso2022jp_uniSource), status); 641 UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-2022-jp",iso2022 jp_uniSource, UPRV_LENGTHOF(iso2022jp_uniSource), status);
641 if(U_FAILURE(status)){ 642 if(U_FAILURE(status)){
642 return NULL; 643 return NULL;
643 } 644 }
644 return pf; 645 return pf;
645 } 646 }
646 647
647 UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022JP_ToUnicode(){ 648 UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022JP_ToUnicode(){
648 UErrorCode status = U_ZERO_ERROR; 649 UErrorCode status = U_ZERO_ERROR;
649 UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-2022-jp",(char*)is o2022jp_encSource, LENGTHOF(iso2022jp_encSource), status); 650 UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-2022-jp",(char*)is o2022jp_encSource, UPRV_LENGTHOF(iso2022jp_encSource), status);
650 if(U_FAILURE(status)){ 651 if(U_FAILURE(status)){
651 return NULL; 652 return NULL;
652 } 653 }
653 return pf; 654 return pf;
654 } 655 }
OLDNEW
« no previous file with comments | « source/test/perf/convperf/convperf.h ('k') | source/test/perf/dicttrieperf/dicttrieperf.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698