2 ***********************************************************************
3 * © 2016 and later: Unicode, Inc. and others.
4 * License & terms of use: http://www.unicode.org/copyright.html#License
5 ***********************************************************************
6 ***********************************************************************
7 * Copyright (c) 2002-2014, International Business Machines
8 * Corporation and others. All Rights Reserved.
9 ***********************************************************************
10 ***********************************************************************
13 * This Program tests the performance of ICU's Normalization engine against Windows
14 * to run it use the command like
16 * c:\normperf.exe -s C:\work\ICUCupertinoRep\icu4c\collation-perf-data -i 10 -p 15 -f TestNames_Asian.txt -u -e UTF-8 -l
21 #include "cmemory.h" // for UPRV_LENGTHOF
23 int main(int argc
, const char* argv
[]){
24 UErrorCode status
= U_ZERO_ERROR
;
25 ConverterPerformanceTest
test(argc
, argv
, status
);
26 if(U_FAILURE(status
)){
29 if(test
.run()==FALSE
){
30 fprintf(stderr
,"FAILED: Tests could not be run please check the arguments.\n");
37 ConverterPerformanceTest::ConverterPerformanceTest(int32_t argc
, const char* argv
[], UErrorCode
& status
)
38 : UPerfTest(argc
,argv
,status
){
42 ConverterPerformanceTest::~ConverterPerformanceTest(){
46 UPerfFunction
* ConverterPerformanceTest::runIndexedTest(int32_t index
, UBool exec
,const char* &name
, char* par
) {
48 TESTCASE(0,TestICU_CleanOpenAllConverters
);// This calls u_cleanup()
49 TESTCASE(1,TestICU_OpenAllConverters
);// This doesn't call u_cleanup()
51 TESTCASE(2,TestICU_UTF8_ToUnicode
);
52 TESTCASE(3,TestICU_UTF8_FromUnicode
);
53 TESTCASE(4,TestWinANSI_UTF8_ToUnicode
);
54 TESTCASE(5,TestWinANSI_UTF8_FromUnicode
);
55 TESTCASE(6,TestWinIML2_UTF8_ToUnicode
);
56 TESTCASE(7,TestWinIML2_UTF8_FromUnicode
);
58 TESTCASE(8,TestICU_Latin1_ToUnicode
);
59 TESTCASE(9,TestICU_Latin1_FromUnicode
);
60 TESTCASE(10,TestWinIML2_Latin1_ToUnicode
);
61 TESTCASE(11,TestWinIML2_Latin1_FromUnicode
);
63 TESTCASE(12,TestICU_Latin8_ToUnicode
);
64 TESTCASE(13,TestICU_Latin8_FromUnicode
);
65 TESTCASE(14,TestWinIML2_Latin8_ToUnicode
);
66 TESTCASE(15,TestWinIML2_Latin8_FromUnicode
);
68 TESTCASE(16,TestICU_EBCDIC_Arabic_ToUnicode
);
69 TESTCASE(17,TestICU_EBCDIC_Arabic_FromUnicode
);
70 TESTCASE(18,TestWinIML2_EBCDIC_Arabic_ToUnicode
);
71 TESTCASE(19,TestWinIML2_EBCDIC_Arabic_FromUnicode
);
73 TESTCASE(20,TestICU_SJIS_ToUnicode
);
74 TESTCASE(21,TestICU_SJIS_FromUnicode
);
75 TESTCASE(22,TestWinIML2_SJIS_ToUnicode
);
76 TESTCASE(23,TestWinIML2_SJIS_FromUnicode
);
78 TESTCASE(24,TestICU_EUCJP_ToUnicode
);
79 TESTCASE(25,TestICU_EUCJP_FromUnicode
);
80 TESTCASE(26,TestWinIML2_EUCJP_ToUnicode
);
81 TESTCASE(27,TestWinIML2_EUCJP_FromUnicode
);
83 TESTCASE(28,TestICU_GB2312_FromUnicode
);
84 TESTCASE(29,TestICU_GB2312_ToUnicode
);
85 TESTCASE(30,TestWinIML2_GB2312_ToUnicode
);
86 TESTCASE(31,TestWinIML2_GB2312_FromUnicode
);
88 TESTCASE(32,TestICU_ISO2022KR_ToUnicode
);
89 TESTCASE(33,TestICU_ISO2022KR_FromUnicode
);
90 TESTCASE(34,TestWinIML2_ISO2022KR_ToUnicode
);
91 TESTCASE(35,TestWinIML2_ISO2022KR_FromUnicode
);
93 TESTCASE(36,TestICU_ISO2022JP_ToUnicode
);
94 TESTCASE(37,TestICU_ISO2022JP_FromUnicode
);
95 TESTCASE(38,TestWinIML2_ISO2022JP_ToUnicode
);
96 TESTCASE(39,TestWinIML2_ISO2022JP_FromUnicode
);
98 TESTCASE(40,TestWinANSI_Latin1_ToUnicode
);
99 TESTCASE(41,TestWinANSI_Latin1_FromUnicode
);
101 TESTCASE(42,TestWinANSI_Latin8_ToUnicode
);
102 TESTCASE(43,TestWinANSI_Latin8_FromUnicode
);
104 TESTCASE(44,TestWinANSI_SJIS_ToUnicode
);
105 TESTCASE(45,TestWinANSI_SJIS_FromUnicode
);
107 TESTCASE(46,TestWinANSI_EUCJP_ToUnicode
);
108 TESTCASE(47,TestWinANSI_EUCJP_FromUnicode
);
110 TESTCASE(48,TestWinANSI_GB2312_ToUnicode
);
111 TESTCASE(49,TestWinANSI_GB2312_FromUnicode
);
113 TESTCASE(50,TestWinANSI_ISO2022KR_ToUnicode
);
114 TESTCASE(51,TestWinANSI_ISO2022KR_FromUnicode
);
116 TESTCASE(52,TestWinANSI_ISO2022JP_ToUnicode
);
117 TESTCASE(53,TestWinANSI_ISO2022JP_FromUnicode
);
127 UPerfFunction
* ConverterPerformanceTest::TestICU_CleanOpenAllConverters() {
128 UErrorCode status
= U_ZERO_ERROR
;
129 UPerfFunction
* pf
= new ICUOpenAllConvertersFunction(TRUE
, status
);
130 if(U_FAILURE(status
)){
136 UPerfFunction
* ConverterPerformanceTest::TestICU_OpenAllConverters() {
137 UErrorCode status
= U_ZERO_ERROR
;
138 UPerfFunction
* pf
= new ICUOpenAllConvertersFunction(FALSE
, status
);
139 if(U_FAILURE(status
)){
145 UPerfFunction
* ConverterPerformanceTest::TestICU_UTF8_FromUnicode(){
146 UErrorCode status
= U_ZERO_ERROR
;
147 ICUFromUnicodePerfFunction
* pf
= new ICUFromUnicodePerfFunction("utf-8",utf8_uniSource
, UPRV_LENGTHOF(utf8_uniSource
), status
);
148 if(U_FAILURE(status
)){
154 UPerfFunction
* ConverterPerformanceTest::TestICU_UTF8_ToUnicode(){
155 UErrorCode status
= U_ZERO_ERROR
;
156 UPerfFunction
* pf
= new ICUToUnicodePerfFunction("utf-8",(char*)utf8_encSource
, UPRV_LENGTHOF(utf8_encSource
), status
);
157 if(U_FAILURE(status
)){
164 UPerfFunction
* ConverterPerformanceTest::TestWinIML2_UTF8_FromUnicode(){
165 UErrorCode status
= U_ZERO_ERROR
;
166 UPerfFunction
* pf
= new WinIMultiLanguage2FromUnicodePerfFunction("utf-8",utf8_uniSource
, UPRV_LENGTHOF(utf8_uniSource
), status
);
167 if(U_FAILURE(status
)){
173 UPerfFunction
* ConverterPerformanceTest::TestWinIML2_UTF8_ToUnicode(){
174 UErrorCode status
= U_ZERO_ERROR
;
175 UPerfFunction
* pf
= new WinIMultiLanguage2ToUnicodePerfFunction("utf-8",(char*)utf8_encSource
, UPRV_LENGTHOF(utf8_encSource
), status
);
176 if(U_FAILURE(status
)){
182 UPerfFunction
* ConverterPerformanceTest::TestWinANSI_UTF8_FromUnicode(){
183 UErrorCode status
= U_ZERO_ERROR
;
184 UPerfFunction
* pf
= new WinANSIFromUnicodePerfFunction("utf-8",utf8_uniSource
, UPRV_LENGTHOF(utf8_uniSource
), status
);
185 if(U_FAILURE(status
)){
191 UPerfFunction
* ConverterPerformanceTest::TestWinANSI_UTF8_ToUnicode(){
192 UErrorCode status
= U_ZERO_ERROR
;
193 UPerfFunction
* pf
= new WinANSIToUnicodePerfFunction("utf-8",(char*)utf8_encSource
, UPRV_LENGTHOF(utf8_encSource
), status
);
194 if(U_FAILURE(status
)){
202 UPerfFunction
* ConverterPerformanceTest::TestICU_Latin1_FromUnicode(){
203 UErrorCode status
= U_ZERO_ERROR
;
204 ICUFromUnicodePerfFunction
* pf
= new ICUFromUnicodePerfFunction("iso-8859-1",latin1_uniSource
, UPRV_LENGTHOF(latin1_uniSource
), status
);
205 if(U_FAILURE(status
)){
211 UPerfFunction
* ConverterPerformanceTest::TestICU_Latin1_ToUnicode(){
212 UErrorCode status
= U_ZERO_ERROR
;
213 UPerfFunction
* pf
= new ICUToUnicodePerfFunction("iso-8859-1",(char*)latin1_encSource
, UPRV_LENGTHOF(latin1_encSource
), status
);
214 if(U_FAILURE(status
)){
221 UPerfFunction
* ConverterPerformanceTest::TestWinIML2_Latin1_FromUnicode(){
222 UErrorCode status
= U_ZERO_ERROR
;
223 UPerfFunction
* pf
= new WinIMultiLanguage2FromUnicodePerfFunction("iso-8859-1",latin1_uniSource
, UPRV_LENGTHOF(latin1_uniSource
), status
);
224 if(U_FAILURE(status
)){
230 UPerfFunction
* ConverterPerformanceTest::TestWinIML2_Latin1_ToUnicode(){
231 UErrorCode status
= U_ZERO_ERROR
;
232 UPerfFunction
* pf
= new WinIMultiLanguage2ToUnicodePerfFunction("iso-8859-1",(char*)latin1_encSource
, UPRV_LENGTHOF(latin1_encSource
), status
);
233 if(U_FAILURE(status
)){
239 UPerfFunction
* ConverterPerformanceTest::TestWinANSI_Latin1_FromUnicode(){
240 UErrorCode status
= U_ZERO_ERROR
;
241 UPerfFunction
* pf
= new WinANSIFromUnicodePerfFunction("iso-8859-1",latin1_uniSource
, UPRV_LENGTHOF(latin1_uniSource
), status
);
242 if(U_FAILURE(status
)){
248 UPerfFunction
* ConverterPerformanceTest::TestWinANSI_Latin1_ToUnicode(){
249 UErrorCode status
= U_ZERO_ERROR
;
250 UPerfFunction
* pf
= new WinANSIToUnicodePerfFunction("iso-8859-1",(char*)latin1_encSource
, UPRV_LENGTHOF(latin1_encSource
), status
);
251 if(U_FAILURE(status
)){
259 UPerfFunction
* ConverterPerformanceTest::TestICU_Latin8_FromUnicode(){
260 UErrorCode status
= U_ZERO_ERROR
;
261 ICUFromUnicodePerfFunction
* pf
= new ICUFromUnicodePerfFunction("iso-8859-8",latin8_uniSource
, UPRV_LENGTHOF(latin8_uniSource
), status
);
262 if(U_FAILURE(status
)){
268 UPerfFunction
* ConverterPerformanceTest::TestICU_Latin8_ToUnicode(){
269 UErrorCode status
= U_ZERO_ERROR
;
270 UPerfFunction
* pf
= new ICUToUnicodePerfFunction("iso-8859-8",(char*)latin8_encSource
, UPRV_LENGTHOF(latin8_encSource
), status
);
271 if(U_FAILURE(status
)){
278 UPerfFunction
* ConverterPerformanceTest::TestWinIML2_Latin8_FromUnicode(){
279 UErrorCode status
= U_ZERO_ERROR
;
280 UPerfFunction
* pf
= new WinIMultiLanguage2FromUnicodePerfFunction("iso-8859-8",latin8_uniSource
, UPRV_LENGTHOF(latin8_uniSource
), status
);
281 if(U_FAILURE(status
)){
287 UPerfFunction
* ConverterPerformanceTest::TestWinIML2_Latin8_ToUnicode(){
288 UErrorCode status
= U_ZERO_ERROR
;
289 UPerfFunction
* pf
= new WinIMultiLanguage2ToUnicodePerfFunction("iso-8859-8",(char*)latin8_encSource
, UPRV_LENGTHOF(latin8_encSource
), status
);
290 if(U_FAILURE(status
)){
295 UPerfFunction
* ConverterPerformanceTest::TestWinANSI_Latin8_FromUnicode(){
296 UErrorCode status
= U_ZERO_ERROR
;
297 UPerfFunction
* pf
= new WinANSIFromUnicodePerfFunction("iso-8859-8",latin8_uniSource
, UPRV_LENGTHOF(latin8_uniSource
), status
);
298 if(U_FAILURE(status
)){
304 UPerfFunction
* ConverterPerformanceTest::TestWinANSI_Latin8_ToUnicode(){
305 UErrorCode status
= U_ZERO_ERROR
;
306 UPerfFunction
* pf
= new WinANSIToUnicodePerfFunction("iso-8859-8",(char*)latin8_encSource
, UPRV_LENGTHOF(latin8_encSource
), status
);
307 if(U_FAILURE(status
)){
316 UPerfFunction
* ConverterPerformanceTest::TestICU_EBCDIC_Arabic_FromUnicode(){
317 UErrorCode status
= U_ZERO_ERROR
;
318 ICUFromUnicodePerfFunction
* pf
= new ICUFromUnicodePerfFunction("x-EBCDIC-Arabic",ebcdic_arabic_uniSource
, UPRV_LENGTHOF(ebcdic_arabic_uniSource
), status
);
319 if(U_FAILURE(status
)){
325 UPerfFunction
* ConverterPerformanceTest::TestICU_EBCDIC_Arabic_ToUnicode(){
326 UErrorCode status
= U_ZERO_ERROR
;
327 UPerfFunction
* pf
= new ICUToUnicodePerfFunction("x-EBCDIC-Arabic",(char*)ebcdic_arabic_encSource
, UPRV_LENGTHOF(ebcdic_arabic_encSource
), status
);
328 if(U_FAILURE(status
)){
335 UPerfFunction
* ConverterPerformanceTest::TestWinIML2_EBCDIC_Arabic_FromUnicode(){
336 UErrorCode status
= U_ZERO_ERROR
;
337 UPerfFunction
* pf
= new WinIMultiLanguage2FromUnicodePerfFunction("x-EBCDIC-Arabic",ebcdic_arabic_uniSource
, UPRV_LENGTHOF(ebcdic_arabic_uniSource
), status
);
338 if(U_FAILURE(status
)){
344 UPerfFunction
* ConverterPerformanceTest::TestWinIML2_EBCDIC_Arabic_ToUnicode(){
345 UErrorCode status
= U_ZERO_ERROR
;
346 UPerfFunction
* pf
= new WinIMultiLanguage2ToUnicodePerfFunction("x-EBCDIC-Arabic",(char*)ebcdic_arabic_encSource
, UPRV_LENGTHOF(ebcdic_arabic_encSource
), status
);
347 if(U_FAILURE(status
)){
353 UPerfFunction
* ConverterPerformanceTest::TestWinANSI_EBCDIC_Arabic_FromUnicode(){
354 UErrorCode status
= U_ZERO_ERROR
;
355 UPerfFunction
* pf
= new WinANSIFromUnicodePerfFunction("x-EBCDIC-Arabic",ebcdic_arabic_uniSource
, UPRV_LENGTHOF(ebcdic_arabic_uniSource
), status
);
356 if(U_FAILURE(status
)){
362 UPerfFunction
* ConverterPerformanceTest::TestWinANSI_EBCDIC_Arabic_ToUnicode(){
363 UErrorCode status
= U_ZERO_ERROR
;
364 UPerfFunction
* pf
= new WinANSIToUnicodePerfFunction("x-EBCDIC-Arabic",(char*)ebcdic_arabic_encSource
, UPRV_LENGTHOF(ebcdic_arabic_encSource
), status
);
365 if(U_FAILURE(status
)){
373 UPerfFunction
* ConverterPerformanceTest::TestICU_SJIS_FromUnicode(){
374 UErrorCode status
= U_ZERO_ERROR
;
375 ICUFromUnicodePerfFunction
* pf
= new ICUFromUnicodePerfFunction("sjis",sjis_uniSource
, UPRV_LENGTHOF(sjis_uniSource
), status
);
376 if(U_FAILURE(status
)){
382 UPerfFunction
* ConverterPerformanceTest::TestICU_SJIS_ToUnicode(){
383 UErrorCode status
= U_ZERO_ERROR
;
384 UPerfFunction
* pf
= new ICUToUnicodePerfFunction("sjis",(char*)sjis_encSource
, UPRV_LENGTHOF(sjis_encSource
), status
);
385 if(U_FAILURE(status
)){
392 UPerfFunction
* ConverterPerformanceTest::TestWinIML2_SJIS_FromUnicode(){
393 UErrorCode status
= U_ZERO_ERROR
;
394 UPerfFunction
* pf
= new WinIMultiLanguage2FromUnicodePerfFunction("sjis",sjis_uniSource
, UPRV_LENGTHOF(sjis_uniSource
), status
);
395 if(U_FAILURE(status
)){
401 UPerfFunction
* ConverterPerformanceTest::TestWinIML2_SJIS_ToUnicode(){
402 UErrorCode status
= U_ZERO_ERROR
;
403 UPerfFunction
* pf
= new WinIMultiLanguage2ToUnicodePerfFunction("sjis",(char*)sjis_encSource
, UPRV_LENGTHOF(sjis_encSource
), status
);
404 if(U_FAILURE(status
)){
410 UPerfFunction
* ConverterPerformanceTest::TestWinANSI_SJIS_FromUnicode(){
411 UErrorCode status
= U_ZERO_ERROR
;
412 UPerfFunction
* pf
= new WinANSIFromUnicodePerfFunction("sjis",sjis_uniSource
, UPRV_LENGTHOF(sjis_uniSource
), status
);
413 if(U_FAILURE(status
)){
419 UPerfFunction
* ConverterPerformanceTest::TestWinANSI_SJIS_ToUnicode(){
420 UErrorCode status
= U_ZERO_ERROR
;
421 UPerfFunction
* pf
= new WinANSIToUnicodePerfFunction("sjis",(char*)sjis_encSource
, UPRV_LENGTHOF(sjis_encSource
), status
);
422 if(U_FAILURE(status
)){
432 UPerfFunction
* ConverterPerformanceTest::TestICU_EUCJP_FromUnicode(){
433 UErrorCode status
= U_ZERO_ERROR
;
434 ICUFromUnicodePerfFunction
* pf
= new ICUFromUnicodePerfFunction("euc-jp",eucjp_uniSource
, UPRV_LENGTHOF(eucjp_uniSource
), status
);
435 if(U_FAILURE(status
)){
441 UPerfFunction
* ConverterPerformanceTest::TestICU_EUCJP_ToUnicode(){
442 UErrorCode status
= U_ZERO_ERROR
;
443 UPerfFunction
* pf
= new ICUToUnicodePerfFunction("euc-jp",(char*)eucjp_encSource
, UPRV_LENGTHOF(eucjp_encSource
), status
);
444 if(U_FAILURE(status
)){
451 UPerfFunction
* ConverterPerformanceTest::TestWinIML2_EUCJP_FromUnicode(){
452 UErrorCode status
= U_ZERO_ERROR
;
453 UPerfFunction
* pf
= new WinIMultiLanguage2FromUnicodePerfFunction("euc-jp",eucjp_uniSource
, UPRV_LENGTHOF(eucjp_uniSource
), status
);
454 if(U_FAILURE(status
)){
460 UPerfFunction
* ConverterPerformanceTest::TestWinIML2_EUCJP_ToUnicode(){
461 UErrorCode status
= U_ZERO_ERROR
;
462 UPerfFunction
* pf
= new WinIMultiLanguage2ToUnicodePerfFunction("euc-jp",(char*)eucjp_encSource
, UPRV_LENGTHOF(eucjp_encSource
), status
);
463 if(U_FAILURE(status
)){
469 UPerfFunction
* ConverterPerformanceTest::TestWinANSI_EUCJP_FromUnicode(){
470 UErrorCode status
= U_ZERO_ERROR
;
471 UPerfFunction
* pf
= new WinANSIFromUnicodePerfFunction("euc-jp",eucjp_uniSource
, UPRV_LENGTHOF(eucjp_uniSource
), status
);
472 if(U_FAILURE(status
)){
478 UPerfFunction
* ConverterPerformanceTest::TestWinANSI_EUCJP_ToUnicode(){
479 UErrorCode status
= U_ZERO_ERROR
;
480 UPerfFunction
* pf
= new WinANSIToUnicodePerfFunction("euc-jp",(char*)eucjp_encSource
, UPRV_LENGTHOF(eucjp_encSource
), status
);
481 if(U_FAILURE(status
)){
491 UPerfFunction
* ConverterPerformanceTest::TestICU_GB2312_FromUnicode(){
492 UErrorCode status
= U_ZERO_ERROR
;
493 ICUFromUnicodePerfFunction
* pf
= new ICUFromUnicodePerfFunction("gb2312",gb2312_uniSource
, UPRV_LENGTHOF(gb2312_uniSource
), status
);
494 if(U_FAILURE(status
)){
500 UPerfFunction
* ConverterPerformanceTest::TestICU_GB2312_ToUnicode(){
501 UErrorCode status
= U_ZERO_ERROR
;
502 UPerfFunction
* pf
= new ICUToUnicodePerfFunction("gb2312",(char*)gb2312_encSource
, UPRV_LENGTHOF(gb2312_encSource
), status
);
503 if(U_FAILURE(status
)){
510 UPerfFunction
* ConverterPerformanceTest::TestWinIML2_GB2312_FromUnicode(){
511 UErrorCode status
= U_ZERO_ERROR
;
512 UPerfFunction
* pf
= new WinIMultiLanguage2FromUnicodePerfFunction("gb2312",gb2312_uniSource
, UPRV_LENGTHOF(gb2312_uniSource
), status
);
513 if(U_FAILURE(status
)){
519 UPerfFunction
* ConverterPerformanceTest::TestWinIML2_GB2312_ToUnicode(){
520 UErrorCode status
= U_ZERO_ERROR
;
521 UPerfFunction
* pf
= new WinIMultiLanguage2ToUnicodePerfFunction("gb2312",(char*)gb2312_encSource
, UPRV_LENGTHOF(gb2312_encSource
), status
);
522 if(U_FAILURE(status
)){
528 UPerfFunction
* ConverterPerformanceTest::TestWinANSI_GB2312_FromUnicode(){
529 UErrorCode status
= U_ZERO_ERROR
;
530 UPerfFunction
* pf
= new WinANSIFromUnicodePerfFunction("gb2312",gb2312_uniSource
, UPRV_LENGTHOF(gb2312_uniSource
), status
);
531 if(U_FAILURE(status
)){
537 UPerfFunction
* ConverterPerformanceTest::TestWinANSI_GB2312_ToUnicode(){
538 UErrorCode status
= U_ZERO_ERROR
;
539 UPerfFunction
* pf
= new WinANSIToUnicodePerfFunction("gb2312",(char*)gb2312_encSource
, UPRV_LENGTHOF(gb2312_encSource
), status
);
540 if(U_FAILURE(status
)){
549 UPerfFunction
* ConverterPerformanceTest::TestICU_ISO2022KR_FromUnicode(){
550 UErrorCode status
= U_ZERO_ERROR
;
551 ICUFromUnicodePerfFunction
* pf
= new ICUFromUnicodePerfFunction("iso-2022-kr",iso2022kr_uniSource
, UPRV_LENGTHOF(iso2022kr_uniSource
), status
);
552 if(U_FAILURE(status
)){
558 UPerfFunction
* ConverterPerformanceTest::TestICU_ISO2022KR_ToUnicode(){
559 UErrorCode status
= U_ZERO_ERROR
;
560 UPerfFunction
* pf
= new ICUToUnicodePerfFunction("iso-2022-kr",(char*)iso2022kr_encSource
, UPRV_LENGTHOF(iso2022kr_encSource
), status
);
561 if(U_FAILURE(status
)){
568 UPerfFunction
* ConverterPerformanceTest::TestWinIML2_ISO2022KR_FromUnicode(){
569 UErrorCode status
= U_ZERO_ERROR
;
570 UPerfFunction
* pf
= new WinIMultiLanguage2FromUnicodePerfFunction("iso-2022-kr",iso2022kr_uniSource
, UPRV_LENGTHOF(iso2022kr_uniSource
), status
);
571 if(U_FAILURE(status
)){
577 UPerfFunction
* ConverterPerformanceTest::TestWinIML2_ISO2022KR_ToUnicode(){
578 UErrorCode status
= U_ZERO_ERROR
;
579 UPerfFunction
* pf
= new WinIMultiLanguage2ToUnicodePerfFunction("iso-2022-kr",(char*)iso2022kr_encSource
, UPRV_LENGTHOF(iso2022kr_encSource
), status
);
580 if(U_FAILURE(status
)){
586 UPerfFunction
* ConverterPerformanceTest::TestWinANSI_ISO2022KR_FromUnicode(){
587 UErrorCode status
= U_ZERO_ERROR
;
588 UPerfFunction
* pf
= new WinANSIFromUnicodePerfFunction("iso-2022-kr",iso2022kr_uniSource
, UPRV_LENGTHOF(iso2022kr_uniSource
), status
);
589 if(U_FAILURE(status
)){
595 UPerfFunction
* ConverterPerformanceTest::TestWinANSI_ISO2022KR_ToUnicode(){
596 UErrorCode status
= U_ZERO_ERROR
;
597 UPerfFunction
* pf
= new WinANSIToUnicodePerfFunction("iso-2022-kr",(char*)iso2022kr_encSource
, UPRV_LENGTHOF(iso2022kr_encSource
), status
);
598 if(U_FAILURE(status
)){
606 UPerfFunction
* ConverterPerformanceTest::TestICU_ISO2022JP_FromUnicode(){
607 UErrorCode status
= U_ZERO_ERROR
;
608 ICUFromUnicodePerfFunction
* pf
= new ICUFromUnicodePerfFunction("iso-2022-jp",iso2022jp_uniSource
, UPRV_LENGTHOF(iso2022jp_uniSource
), status
);
609 if(U_FAILURE(status
)){
615 UPerfFunction
* ConverterPerformanceTest::TestICU_ISO2022JP_ToUnicode(){
616 UErrorCode status
= U_ZERO_ERROR
;
617 UPerfFunction
* pf
= new ICUToUnicodePerfFunction("iso-2022-jp",(char*)iso2022jp_encSource
, UPRV_LENGTHOF(iso2022jp_encSource
), status
);
618 if(U_FAILURE(status
)){
625 UPerfFunction
* ConverterPerformanceTest::TestWinIML2_ISO2022JP_FromUnicode(){
626 UErrorCode status
= U_ZERO_ERROR
;
627 UPerfFunction
* pf
= new WinIMultiLanguage2FromUnicodePerfFunction("iso-2022-jp",iso2022jp_uniSource
, UPRV_LENGTHOF(iso2022jp_uniSource
), status
);
628 if(U_FAILURE(status
)){
634 UPerfFunction
* ConverterPerformanceTest::TestWinIML2_ISO2022JP_ToUnicode(){
635 UErrorCode status
= U_ZERO_ERROR
;
636 UPerfFunction
* pf
= new WinIMultiLanguage2ToUnicodePerfFunction("iso-2022-jp",(char*)iso2022jp_encSource
, UPRV_LENGTHOF(iso2022jp_encSource
), status
);
637 if(U_FAILURE(status
)){
643 UPerfFunction
* ConverterPerformanceTest::TestWinANSI_ISO2022JP_FromUnicode(){
644 UErrorCode status
= U_ZERO_ERROR
;
645 UPerfFunction
* pf
= new WinANSIFromUnicodePerfFunction("iso-2022-jp",iso2022jp_uniSource
, UPRV_LENGTHOF(iso2022jp_uniSource
), status
);
646 if(U_FAILURE(status
)){
652 UPerfFunction
* ConverterPerformanceTest::TestWinANSI_ISO2022JP_ToUnicode(){
653 UErrorCode status
= U_ZERO_ERROR
;
654 UPerfFunction
* pf
= new WinANSIToUnicodePerfFunction("iso-2022-jp",(char*)iso2022jp_encSource
, UPRV_LENGTHOF(iso2022jp_encSource
), status
);
655 if(U_FAILURE(status
)){