/*
-**********************************************************************
-* Copyright (c) 2002-2004, International Business Machines
+***********************************************************************
+* © 2016 and later: Unicode, Inc. and others.
+* License & terms of use: http://www.unicode.org/copyright.html#License
+***********************************************************************
+***********************************************************************
+* Copyright (c) 2002-2014, International Business Machines
* Corporation and others. All Rights Reserved.
-**********************************************************************
-**********************************************************************
+***********************************************************************
+***********************************************************************
*/
/**
* This Program tests the performance of ICU's Normalization engine against Windows
*/
#include "convperf.h"
#include "data.h"
+#include <stdio.h>
+#include "cmemory.h" // for UPRV_LENGTHOF
int main(int argc, const char* argv[]){
UErrorCode status = U_ZERO_ERROR;
UPerfFunction* ConverterPerformanceTest::TestICU_UTF8_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("utf-8",utf8_uniSource, LENGTHOF(utf8_uniSource), status);
+ ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("utf-8", (UChar *)utf8_uniSource, UPRV_LENGTHOF(utf8_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestICU_UTF8_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new ICUToUnicodePerfFunction("utf-8",(char*)utf8_encSource, LENGTHOF(utf8_encSource), status);
+ UPerfFunction* pf = new ICUToUnicodePerfFunction("utf-8",(char*)utf8_encSource, UPRV_LENGTHOF(utf8_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinIML2_UTF8_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("utf-8",utf8_uniSource, LENGTHOF(utf8_uniSource), status);
+ UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("utf-8",utf8_uniSource, UPRV_LENGTHOF(utf8_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinIML2_UTF8_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("utf-8",(char*)utf8_encSource, LENGTHOF(utf8_encSource), status);
+ UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("utf-8",(char*)utf8_encSource, UPRV_LENGTHOF(utf8_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinANSI_UTF8_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("utf-8",utf8_uniSource, LENGTHOF(utf8_uniSource), status);
+ UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("utf-8",utf8_uniSource, UPRV_LENGTHOF(utf8_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinANSI_UTF8_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinANSIToUnicodePerfFunction("utf-8",(char*)utf8_encSource, LENGTHOF(utf8_encSource), status);
+ UPerfFunction* pf = new WinANSIToUnicodePerfFunction("utf-8",(char*)utf8_encSource, UPRV_LENGTHOF(utf8_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestICU_Latin1_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-8859-1",latin1_uniSource, LENGTHOF(latin1_uniSource), status);
+ ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-8859-1", (UChar *)latin1_uniSource, UPRV_LENGTHOF(latin1_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestICU_Latin1_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-8859-1",(char*)latin1_encSource, LENGTHOF(latin1_encSource), status);
+ UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-8859-1",(char*)latin1_encSource, UPRV_LENGTHOF(latin1_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin1_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-8859-1",latin1_uniSource, LENGTHOF(latin1_uniSource), status);
+ UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-8859-1",latin1_uniSource, UPRV_LENGTHOF(latin1_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin1_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-8859-1",(char*)latin1_encSource, LENGTHOF(latin1_encSource), status);
+ UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-8859-1",(char*)latin1_encSource, UPRV_LENGTHOF(latin1_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin1_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-8859-1",latin1_uniSource, LENGTHOF(latin1_uniSource), status);
+ UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-8859-1",latin1_uniSource, UPRV_LENGTHOF(latin1_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin1_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-8859-1",(char*)latin1_encSource, LENGTHOF(latin1_encSource), status);
+ UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-8859-1",(char*)latin1_encSource, UPRV_LENGTHOF(latin1_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestICU_Latin8_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-8859-8",latin8_uniSource, LENGTHOF(latin8_uniSource), status);
+ ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-8859-8", (UChar *)latin8_uniSource, UPRV_LENGTHOF(latin8_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestICU_Latin8_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-8859-8",(char*)latin8_encSource, LENGTHOF(latin8_encSource), status);
+ UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-8859-8",(char*)latin8_encSource, UPRV_LENGTHOF(latin8_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin8_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-8859-8",latin8_uniSource, LENGTHOF(latin8_uniSource), status);
+ UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-8859-8",latin8_uniSource, UPRV_LENGTHOF(latin8_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin8_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-8859-8",(char*)latin8_encSource, LENGTHOF(latin8_encSource), status);
+ UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-8859-8",(char*)latin8_encSource, UPRV_LENGTHOF(latin8_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
}
UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin8_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-8859-8",latin8_uniSource, LENGTHOF(latin8_uniSource), status);
+ UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-8859-8",latin8_uniSource, UPRV_LENGTHOF(latin8_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin8_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-8859-8",(char*)latin8_encSource, LENGTHOF(latin8_encSource), status);
+ UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-8859-8",(char*)latin8_encSource, UPRV_LENGTHOF(latin8_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestICU_EBCDIC_Arabic_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("x-EBCDIC-Arabic",ebcdic_arabic_uniSource, LENGTHOF(ebcdic_arabic_uniSource), status);
+ ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("x-EBCDIC-Arabic", (UChar *)ebcdic_arabic_uniSource, UPRV_LENGTHOF(ebcdic_arabic_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestICU_EBCDIC_Arabic_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new ICUToUnicodePerfFunction("x-EBCDIC-Arabic",(char*)ebcdic_arabic_encSource, LENGTHOF(ebcdic_arabic_encSource), status);
+ UPerfFunction* pf = new ICUToUnicodePerfFunction("x-EBCDIC-Arabic",(char*)ebcdic_arabic_encSource, UPRV_LENGTHOF(ebcdic_arabic_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinIML2_EBCDIC_Arabic_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("x-EBCDIC-Arabic",ebcdic_arabic_uniSource, LENGTHOF(ebcdic_arabic_uniSource), status);
+ UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("x-EBCDIC-Arabic",ebcdic_arabic_uniSource, UPRV_LENGTHOF(ebcdic_arabic_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinIML2_EBCDIC_Arabic_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("x-EBCDIC-Arabic",(char*)ebcdic_arabic_encSource, LENGTHOF(ebcdic_arabic_encSource), status);
+ UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("x-EBCDIC-Arabic",(char*)ebcdic_arabic_encSource, UPRV_LENGTHOF(ebcdic_arabic_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinANSI_EBCDIC_Arabic_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("x-EBCDIC-Arabic",ebcdic_arabic_uniSource, LENGTHOF(ebcdic_arabic_uniSource), status);
+ UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("x-EBCDIC-Arabic",ebcdic_arabic_uniSource, UPRV_LENGTHOF(ebcdic_arabic_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinANSI_EBCDIC_Arabic_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinANSIToUnicodePerfFunction("x-EBCDIC-Arabic",(char*)ebcdic_arabic_encSource, LENGTHOF(ebcdic_arabic_encSource), status);
+ UPerfFunction* pf = new WinANSIToUnicodePerfFunction("x-EBCDIC-Arabic",(char*)ebcdic_arabic_encSource, UPRV_LENGTHOF(ebcdic_arabic_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestICU_SJIS_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("sjis",sjis_uniSource, LENGTHOF(sjis_uniSource), status);
+ ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("sjis", (UChar *)sjis_uniSource, UPRV_LENGTHOF(sjis_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestICU_SJIS_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new ICUToUnicodePerfFunction("sjis",(char*)sjis_encSource, LENGTHOF(sjis_encSource), status);
+ UPerfFunction* pf = new ICUToUnicodePerfFunction("sjis",(char*)sjis_encSource, UPRV_LENGTHOF(sjis_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinIML2_SJIS_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("sjis",sjis_uniSource, LENGTHOF(sjis_uniSource), status);
+ UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("sjis",sjis_uniSource, UPRV_LENGTHOF(sjis_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinIML2_SJIS_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("sjis",(char*)sjis_encSource, LENGTHOF(sjis_encSource), status);
+ UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("sjis",(char*)sjis_encSource, UPRV_LENGTHOF(sjis_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinANSI_SJIS_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("sjis",sjis_uniSource, LENGTHOF(sjis_uniSource), status);
+ UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("sjis",sjis_uniSource, UPRV_LENGTHOF(sjis_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinANSI_SJIS_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinANSIToUnicodePerfFunction("sjis",(char*)sjis_encSource, LENGTHOF(sjis_encSource), status);
+ UPerfFunction* pf = new WinANSIToUnicodePerfFunction("sjis",(char*)sjis_encSource, UPRV_LENGTHOF(sjis_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestICU_EUCJP_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("euc-jp",eucjp_uniSource, LENGTHOF(eucjp_uniSource), status);
+ ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("euc-jp", (UChar *)eucjp_uniSource, UPRV_LENGTHOF(eucjp_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestICU_EUCJP_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new ICUToUnicodePerfFunction("euc-jp",(char*)eucjp_encSource, LENGTHOF(eucjp_encSource), status);
+ UPerfFunction* pf = new ICUToUnicodePerfFunction("euc-jp",(char*)eucjp_encSource, UPRV_LENGTHOF(eucjp_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinIML2_EUCJP_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("euc-jp",eucjp_uniSource, LENGTHOF(eucjp_uniSource), status);
+ UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("euc-jp",eucjp_uniSource, UPRV_LENGTHOF(eucjp_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinIML2_EUCJP_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("euc-jp",(char*)eucjp_encSource, LENGTHOF(eucjp_encSource), status);
+ UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("euc-jp",(char*)eucjp_encSource, UPRV_LENGTHOF(eucjp_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinANSI_EUCJP_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("euc-jp",eucjp_uniSource, LENGTHOF(eucjp_uniSource), status);
+ UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("euc-jp",eucjp_uniSource, UPRV_LENGTHOF(eucjp_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinANSI_EUCJP_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinANSIToUnicodePerfFunction("euc-jp",(char*)eucjp_encSource, LENGTHOF(eucjp_encSource), status);
+ UPerfFunction* pf = new WinANSIToUnicodePerfFunction("euc-jp",(char*)eucjp_encSource, UPRV_LENGTHOF(eucjp_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestICU_GB2312_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("gb2312",gb2312_uniSource, LENGTHOF(gb2312_uniSource), status);
+ ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("gb2312", (UChar *)gb2312_uniSource, UPRV_LENGTHOF(gb2312_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestICU_GB2312_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new ICUToUnicodePerfFunction("gb2312",(char*)gb2312_encSource, LENGTHOF(gb2312_encSource), status);
+ UPerfFunction* pf = new ICUToUnicodePerfFunction("gb2312",(char*)gb2312_encSource, UPRV_LENGTHOF(gb2312_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinIML2_GB2312_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("gb2312",gb2312_uniSource, LENGTHOF(gb2312_uniSource), status);
+ UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("gb2312",gb2312_uniSource, UPRV_LENGTHOF(gb2312_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinIML2_GB2312_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("gb2312",(char*)gb2312_encSource, LENGTHOF(gb2312_encSource), status);
+ UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("gb2312",(char*)gb2312_encSource, UPRV_LENGTHOF(gb2312_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinANSI_GB2312_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("gb2312",gb2312_uniSource, LENGTHOF(gb2312_uniSource), status);
+ UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("gb2312",gb2312_uniSource, UPRV_LENGTHOF(gb2312_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinANSI_GB2312_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinANSIToUnicodePerfFunction("gb2312",(char*)gb2312_encSource, LENGTHOF(gb2312_encSource), status);
+ UPerfFunction* pf = new WinANSIToUnicodePerfFunction("gb2312",(char*)gb2312_encSource, UPRV_LENGTHOF(gb2312_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022KR_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-2022-kr",iso2022kr_uniSource, LENGTHOF(iso2022kr_uniSource), status);
+ ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-2022-kr", (UChar *)iso2022kr_uniSource, UPRV_LENGTHOF(iso2022kr_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022KR_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-2022-kr",(char*)iso2022kr_encSource, LENGTHOF(iso2022kr_encSource), status);
+ UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-2022-kr",(char*)iso2022kr_encSource, UPRV_LENGTHOF(iso2022kr_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022KR_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-2022-kr",iso2022kr_uniSource, LENGTHOF(iso2022kr_uniSource), status);
+ UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-2022-kr",iso2022kr_uniSource, UPRV_LENGTHOF(iso2022kr_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022KR_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-2022-kr",(char*)iso2022kr_encSource, LENGTHOF(iso2022kr_encSource), status);
+ UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-2022-kr",(char*)iso2022kr_encSource, UPRV_LENGTHOF(iso2022kr_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022KR_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-2022-kr",iso2022kr_uniSource, LENGTHOF(iso2022kr_uniSource), status);
+ UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-2022-kr",iso2022kr_uniSource, UPRV_LENGTHOF(iso2022kr_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022KR_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-2022-kr",(char*)iso2022kr_encSource, LENGTHOF(iso2022kr_encSource), status);
+ UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-2022-kr",(char*)iso2022kr_encSource, UPRV_LENGTHOF(iso2022kr_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022JP_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-2022-jp",iso2022jp_uniSource, LENGTHOF(iso2022jp_uniSource), status);
+ ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-2022-jp", (UChar *)iso2022jp_uniSource, UPRV_LENGTHOF(iso2022jp_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022JP_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-2022-jp",(char*)iso2022jp_encSource, LENGTHOF(iso2022jp_encSource), status);
+ UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-2022-jp",(char*)iso2022jp_encSource, UPRV_LENGTHOF(iso2022jp_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022JP_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-2022-jp",iso2022jp_uniSource, LENGTHOF(iso2022jp_uniSource), status);
+ UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-2022-jp",iso2022jp_uniSource, UPRV_LENGTHOF(iso2022jp_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022JP_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-2022-jp",(char*)iso2022jp_encSource, LENGTHOF(iso2022jp_encSource), status);
+ UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-2022-jp",(char*)iso2022jp_encSource, UPRV_LENGTHOF(iso2022jp_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022JP_FromUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-2022-jp",iso2022jp_uniSource, LENGTHOF(iso2022jp_uniSource), status);
+ UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-2022-jp",iso2022jp_uniSource, UPRV_LENGTHOF(iso2022jp_uniSource), status);
if(U_FAILURE(status)){
return NULL;
}
UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022JP_ToUnicode(){
UErrorCode status = U_ZERO_ERROR;
- UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-2022-jp",(char*)iso2022jp_encSource, LENGTHOF(iso2022jp_encSource), status);
+ UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-2022-jp",(char*)iso2022jp_encSource, UPRV_LENGTHOF(iso2022jp_encSource), status);
if(U_FAILURE(status)){
return NULL;
}
return pf;
-}
\ No newline at end of file
+}