• Home
  • Raw
  • Download

Lines Matching refs:cnv

31 static void TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t res…
32 static void TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode e…
120 static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err);
131 static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err) in my_ucnv_open() argument
133 if(cnv && cnv[0] == '@') { in my_ucnv_open()
134 return ucnv_openPackage(loadTestData(err), cnv+1, err); in my_ucnv_open()
136 return ucnv_open(cnv, err); in my_ucnv_open()
176 TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t results[], cons… in TestNextUChar() argument
186 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode); in TestNextUChar()
206 TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode expected, con… in TestNextUCharError() argument
211 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode); in TestNextUCharError()
1469 TestAmbiguousConverter(UConverter *cnv) { in TestAmbiguousConverter() argument
1482 ucnv_toUnicode(cnv, &u, u+20, &s, s+3, NULL, TRUE, &errorCode); in TestAmbiguousConverter()
1495 isAmbiguous=ucnv_isAmbiguous(cnv); in TestAmbiguousConverter()
1500 ucnv_getName(cnv, &errorCode), outUnicode[2]!=0x5c, isAmbiguous); in TestAmbiguousConverter()
1506 ucnv_fixFileSeparator(cnv, outUnicode, (int32_t)(u-outUnicode)); in TestAmbiguousConverter()
1509 log_err("error: ucnv_fixFileSeparator(%s) failed\n", ucnv_getName(cnv, &errorCode)); in TestAmbiguousConverter()
1518 UConverter *ascii_cnv = 0, *sjis_cnv = 0, *cnv; in TestAmbiguous() local
1535 cnv=ucnv_open(name, &status); in TestAmbiguous()
1538 const char* cnvName = ucnv_getName(cnv, &status); in TestAmbiguous()
1541 TestAmbiguousConverter(cnv); in TestAmbiguous()
1544 ucnv_close(cnv); in TestAmbiguous()
1846 UConverter *cnv=ucnv_open("UTF-7", &errorCode); in TestUTF7() local
1851 TestNextUChar(cnv, source, limit, results, "UTF-7"); in TestUTF7()
1853 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF7()
1854 cnvName = ucnv_getName(cnv, &errorCode); in TestUTF7()
1858 ucnv_close(cnv); in TestUTF7()
1889 UConverter *cnv=ucnv_open("IMAP-mailbox-name", &errorCode); in TestIMAP() local
1894 TestNextUChar(cnv, source, limit, results, "IMAP-mailbox-name"); in TestIMAP()
1896 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestIMAP()
1897 cnvName = ucnv_getName(cnv, &errorCode); in TestIMAP()
1901 ucnv_close(cnv); in TestIMAP()
1951 UConverter *cnv=ucnv_open("UTF-8", &errorCode); in TestUTF8() local
1956 TestNextUChar(cnv, source, limit, results, "UTF-8"); in TestUTF8()
1958 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF8()
1961 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode); in TestUTF8()
1964 TestNextUChar(cnv, source, limit, results2, "UTF-8"); in TestUTF8()
1966 ucnv_close(cnv); in TestUTF8()
2022 UConverter *cnv=ucnv_open("CESU-8", &errorCode); in TestCESU8() local
2027 TestNextUChar(cnv, source, limit, results, "CESU-8"); in TestCESU8()
2029 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestCESU8()
2032 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode); in TestCESU8()
2035 TestNextUChar(cnv, source, limit, results2, "CESU-8"); in TestCESU8()
2037 ucnv_close(cnv); in TestCESU8()
2074 UConverter *cnv=ucnv_open("UTF-16", &errorCode); in TestUTF16() local
2081 TestNextUChar(cnv, source, limit, results1, "UTF-16"); in TestUTF16()
2084 ucnv_resetToUnicode(cnv); in TestUTF16()
2085 TestNextUChar(cnv, source, limit, results2, "UTF-16"); in TestUTF16()
2088 ucnv_resetToUnicode(cnv); in TestUTF16()
2089 TestNextUChar(cnv, source, limit, results3, "UTF-16"); in TestUTF16()
2092 ucnv_resetToUnicode(cnv); in TestUTF16()
2093 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF16()
2095 ucnv_close(cnv); in TestUTF16()
2122 UConverter *cnv=ucnv_open("utf-16be", &errorCode); in TestUTF16BE() local
2127 TestNextUChar(cnv, source, limit, results, "UTF-16BE"); in TestUTF16BE()
2129 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF16BE()
2133 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestUTF16BE()
2134 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CH… in TestUTF16BE()
2147 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CH… in TestUTF16BE()
2150 ucnv_close(cnv); in TestUTF16BE()
2176 UConverter *cnv=ucnv_open("utf-16le", &errorCode); in TestUTF16LE() local
2181 TestNextUChar(cnv, source, limit, results, "UTF-16LE"); in TestUTF16LE()
2183 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF16LE()
2187 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestUTF16LE()
2188 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CH… in TestUTF16LE()
2201 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CH… in TestUTF16LE()
2205 ucnv_close(cnv); in TestUTF16LE()
2242 UConverter *cnv=ucnv_open("UTF-32", &errorCode); in TestUTF32() local
2249 TestNextUChar(cnv, source, limit, results1, "UTF-32"); in TestUTF32()
2252 ucnv_resetToUnicode(cnv); in TestUTF32()
2253 TestNextUChar(cnv, source, limit, results2, "UTF-32"); in TestUTF32()
2256 ucnv_resetToUnicode(cnv); in TestUTF32()
2257 TestNextUChar(cnv, source, limit, results3, "UTF-32"); in TestUTF32()
2260 ucnv_resetToUnicode(cnv); in TestUTF32()
2261 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF32()
2263 ucnv_close(cnv); in TestUTF32()
2318 UConverter *cnv=ucnv_open("UTF-32BE", &errorCode); in TestUTF32BE() local
2323 TestNextUChar(cnv, source, limit, results, "UTF-32BE"); in TestUTF32BE()
2326 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF32BE()
2329 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode); in TestUTF32BE()
2332 TestNextUChar(cnv, source, limit, results2, "UTF-32BE"); in TestUTF32BE()
2334 ucnv_close(cnv); in TestUTF32BE()
2389 UConverter *cnv=ucnv_open("UTF-32LE", &errorCode); in TestUTF32LE() local
2394 TestNextUChar(cnv, source, limit, results, "UTF-32LE"); in TestUTF32LE()
2397 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF32LE()
2400 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode); in TestUTF32LE()
2403 TestNextUChar(cnv, source, limit, results2, "UTF-32LE"); in TestUTF32LE()
2405 ucnv_close(cnv); in TestUTF32LE()
2522 UConverter *cnv=ucnv_open("LATIN_1", &errorCode); in TestLATIN1() local
2527 TestNextUChar(cnv, source, limit, results, "LATIN_1"); in TestLATIN1()
2529 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestLATIN1()
2533 ucnv_close(cnv); in TestLATIN1()
2553 UConverter *cnv=ucnv_open("x-mac-turkish", &errorCode); in TestSBCS() local
2558 TestNextUChar(cnv, source, limit, results, "SBCS(x-mac-turkish)"); in TestSBCS()
2560 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestSBCS()
2568 ucnv_close(cnv); in TestSBCS()
2596 UConverter *cnv=my_ucnv_open("@ibm9027", &errorCode); in TestDBCS() local
2601 TestNextUChar(cnv, source, limit, results, "DBCS(@ibm9027)"); in TestDBCS()
2603 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestDBCS()
2607 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestDBCS()
2612 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestDBCS()
2613 …TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CH… in TestDBCS()
2615 ucnv_close(cnv); in TestDBCS()
2647 UConverter *cnv=ucnv_open("ibm-1363", &errorCode); in TestMBCS() local
2652 TestNextUChar(cnv, source, limit, results, "MBCS(ibm-1363)"); in TestMBCS()
2654 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestMBCS()
2658 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestMBCS()
2663 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestMBCS()
2664 …TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CH… in TestMBCS()
2666 ucnv_close(cnv); in TestMBCS()
2682 UConverter *cnv=ucnv_open(cnvName, &status); in TestICCRunout() local
2693 ucnv_toUnicode(cnv, &target, targetLim, &source, sourceLim, NULL, TRUE, &status); in TestICCRunout()
2706 c1=ucnv_getNextUChar(cnv, &source, sourceLim, &status); in TestICCRunout()
2709 c2=ucnv_getNextUChar(cnv, &source, sourceLim, &status); in TestICCRunout()
2712 c3=ucnv_getNextUChar(cnv, &source, sourceLim, &status); in TestICCRunout()
2721 ucnv_close(cnv); in TestICCRunout()
2756 UConverter *cnv; in TestISO_2022() local
2758 cnv=ucnv_open("ISO_2022", &errorCode); in TestISO_2022()
2763 TestNextUChar(cnv, source, limit, results, "ISO_2022"); in TestISO_2022()
2766 TestNextUCharError(cnv, source, source-1, U_ILLEGAL_ARGUMENT_ERROR, "sourceLimit < source"); in TestISO_2022()
2767 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestISO_2022()
2771 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestISO_2022()
2772 …TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CH… in TestISO_2022()
2777 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_CHAR… in TestISO_2022()
2779 ucnv_close(cnv); in TestISO_2022()
2785 TestSmallTargetBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){ in TestSmallTargetBuffer() argument
2802 ucnv_reset(cnv); in TestSmallTargetBuffer()
2815 … ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,FALSE, &errorCode); in TestSmallTargetBuffer()
2831 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,FALSE,&errorCode); in TestSmallTargetBuffer()
2854 static void TestToAndFromUChars(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){ in TestToAndFromUChars() argument
2875 ucnv_reset(cnv); in TestToAndFromUChars()
2876 …numCharsInTarget=ucnv_fromUChars(cnv, cTarget, (int32_t)(cTargetLimit-cTarget), uSource, (int32_t)… in TestToAndFromUChars()
2883 ucnv_toUChars(cnv,uTarget,(int32_t)(uTargetLimit-uTarget),cSource,numCharsInTarget,&errorCode); in TestToAndFromUChars()
2901 static void TestSmallSourceBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){ in TestSmallSourceBuffer() argument
2920 ucnv_reset(cnv); in TestSmallSourceBuffer()
2935 … ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,FALSE, &errorCode); in TestSmallSourceBuffer()
2953 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,FALSE,&errorCode); in TestSmallSourceBuffer()
2976 TestGetNextUChar2022(UConverter* cnv, const char* source, const char* limit, in TestGetNextUChar2022() argument
2983 ucnv_reset(cnv); in TestGetNextUChar2022()
2986 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode); in TestGetNextUChar2022()
3107 UConverter *cnv; in TestHZ() local
3110 cnv=ucnv_open("HZ", &errorCode); in TestHZ()
3124 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestHZ()
3133 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestHZ()
3147 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "HZ encoding"); in TestHZ()
3148 TestSmallTargetBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestHZ()
3149 TestSmallSourceBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestHZ()
3150 TestToAndFromUChars(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestHZ()
3152 ucnv_close(cnv); in TestHZ()
3326 UConverter *cnv; in TestISO_2022_JP() local
3329 cnv=ucnv_open("ISO_2022_JP_1", &errorCode); in TestISO_2022_JP()
3343 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_JP()
3352 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_JP()
3368 TestSmallTargetBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestISO_2022_JP()
3369 TestSmallSourceBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestISO_2022_JP()
3370 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-JP encoding"); in TestISO_2022_JP()
3371 TestToAndFromUChars(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestISO_2022_JP()
3373 ucnv_close(cnv); in TestISO_2022_JP()
3392 UConverter *cnv; in TestConv() local
3395 cnv=my_ucnv_open(conv, &errorCode); in TestConv()
3409 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestConv()
3419 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestConv()
3433 TestSmallTargetBuffer(in,(const UChar*)&in[len],cnv); in TestConv()
3434 TestSmallSourceBuffer(in,(const UChar*)&in[len],cnv); in TestConv()
3435 TestGetNextUChar2022(cnv, cBuf, cTarget, in, conv); in TestConv()
3437 TestGetNextUChar2022(cnv, byteArr, (byteArr+byteArrLen), in, lang); in TestConv()
3438 TestToAndFromUChars(in,(const UChar*)&in[len],cnv); in TestConv()
3444 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestConv()
3461 ucnv_close(cnv); in TestConv()
3869 UConverter *cnv; in TestISO_2022_JP_1() local
3871 cnv=ucnv_open("ISO_2022_JP_1", &errorCode); in TestISO_2022_JP_1()
3885 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,TRUE, &errorCode); in TestISO_2022_JP_1()
3893 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,TRUE,&errorCode); in TestISO_2022_JP_1()
3910 ucnv_reset(cnv); in TestISO_2022_JP_1()
3913 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestISO_2022_JP_1()
3915 TestSmallTargetBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestISO_2022_JP_1()
3916 TestSmallSourceBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestISO_2022_JP_1()
3917 ucnv_close(cnv); in TestISO_2022_JP_1()
3958 UConverter *cnv; in TestISO_2022_JP_2() local
3961 cnv=ucnv_open("ISO_2022_JP_2", &errorCode); in TestISO_2022_JP_2()
3975 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_JP_2()
3984 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_JP_2()
3998 TestSmallTargetBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestISO_2022_JP_2()
3999 TestSmallSourceBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestISO_2022_JP_2()
4000 TestToAndFromUChars(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestISO_2022_JP_2()
4002 ucnv_reset(cnv); in TestISO_2022_JP_2()
4005 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestISO_2022_JP_2()
4007 ucnv_close(cnv); in TestISO_2022_JP_2()
4035 UConverter *cnv; in TestISO_2022_KR() local
4038 cnv=ucnv_open("ISO_2022,locale=kr", &errorCode); in TestISO_2022_KR()
4052 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_KR()
4061 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_KR()
4074 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-KR encoding"); in TestISO_2022_KR()
4075 TestSmallTargetBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestISO_2022_KR()
4076 TestSmallSourceBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestISO_2022_KR()
4077 TestToAndFromUChars(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestISO_2022_KR()
4080 ucnv_reset(cnv); in TestISO_2022_KR()
4083 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestISO_2022_KR()
4084 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_ESCA… in TestISO_2022_KR()
4086 ucnv_close(cnv); in TestISO_2022_KR()
4114 UConverter *cnv; in TestISO_2022_KR_1() local
4117 cnv=ucnv_open("ibm-25546", &errorCode); in TestISO_2022_KR_1()
4131 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_KR_1()
4140 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_KR_1()
4153 ucnv_reset(cnv); in TestISO_2022_KR_1()
4154 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-KR encoding"); in TestISO_2022_KR_1()
4155 TestSmallTargetBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestISO_2022_KR_1()
4156 TestSmallSourceBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestISO_2022_KR_1()
4157 ucnv_reset(cnv); in TestISO_2022_KR_1()
4158 TestToAndFromUChars(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestISO_2022_KR_1()
4160 ucnv_reset(cnv); in TestISO_2022_KR_1()
4163 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestISO_2022_KR_1()
4164 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_ESCA… in TestISO_2022_KR_1()
4166 ucnv_close(cnv); in TestISO_2022_KR_1()
4420 UConverter *cnv;
4423 cnv=ucnv_open("ISO_2022,locale=cn,version=1", &errorCode);
4437 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4446 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4462 TestSmallTargetBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
4463 TestSmallSourceBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv);
4465 ucnv_reset(cnv);
4468 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, …
4470 ucnv_close(cnv);
4519 UConverter *cnv; in TestISO_2022_CN() local
4522 cnv=ucnv_open("ISO_2022,locale=cn,version=0", &errorCode); in TestISO_2022_CN()
4536 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_CN()
4545 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_CN()
4561 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-CN encoding"); in TestISO_2022_CN()
4562 TestSmallTargetBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestISO_2022_CN()
4563 TestSmallSourceBuffer(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestISO_2022_CN()
4564 TestToAndFromUChars(in,(const UChar*)in + UPRV_LENGTHOF(in),cnv); in TestISO_2022_CN()
4567 ucnv_reset(cnv); in TestISO_2022_CN()
4570 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestISO_2022_CN()
4573 ucnv_close(cnv); in TestISO_2022_CN()
4620 UConverter * cnv = ucnv_open(testPtr->converterName, &err); in TestJitterbug6175() local
4625 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_EMPTYSEGMENT, NULL, NULL, NULL, &err); in TestJitterbug6175()
4628 ucnv_close(cnv); in TestJitterbug6175()
4637 … ucnv_toUnicode(cnv, &toUCharsPtr, toUCharsLimit, &inCharsPtr, inCharsLimit, NULL, TRUE, &err); in TestJitterbug6175()
4639 ucnv_close(cnv); in TestJitterbug6175()
4681 UConverter *cnv=ucnv_open("ibm-930", &errorCode); in TestEBCDIC_STATEFUL() local
4686 TestNextUChar(cnv, source, limit, results, "EBCDIC_STATEFUL(ibm-930)"); in TestEBCDIC_STATEFUL()
4687 ucnv_reset(cnv); in TestEBCDIC_STATEFUL()
4689 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestEBCDIC_STATEFUL()
4690 ucnv_reset(cnv); in TestEBCDIC_STATEFUL()
4694 …TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_INDEX_OUTOFB… in TestEBCDIC_STATEFUL()
4697 ucnv_reset(cnv); in TestEBCDIC_STATEFUL()
4700 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestEBCDIC_STATEFUL()
4702 ucnv_reset(cnv); in TestEBCDIC_STATEFUL()
4705 TestNextUChar(cnv,source,limit,results2,"EBCDIC_STATEFUL(ibm-930),seq#2"); in TestEBCDIC_STATEFUL()
4706 ucnv_close(cnv); in TestEBCDIC_STATEFUL()
4757 UConverter *cnv=ucnv_open("gb18030", &errorCode); in TestGB18030() local
4762 TestNextUChar(cnv, (const char *)in, (const char *)in+sizeof(in), results, "gb18030"); in TestGB18030()
4763 ucnv_close(cnv); in TestGB18030()
4847 UConverter *cnv; in TestLMBCS() local
4939 cnv=ucnv_open("lmbcs", &errorCode); /* use generic name for LMBCS-1 */ in TestLMBCS()
4947 ucnv_toUnicode (cnv, in TestLMBCS()
4965 ucnv_close(cnv); in TestLMBCS()
4978 cnv=ucnv_open("LMBCS-1", &errorCode); in TestLMBCS()
4988 uniChar=ucnv_getNextUChar(cnv, &source, source + (off[1] - off[0]), &errorCode); in TestLMBCS()
5001 ucnv_close(cnv); in TestLMBCS()
5101 cnv = ucnv_open(NAME_LMBCS_1, &errorCode); in TestLMBCS()
5110 ucnv_toUnicode (cnv, in TestLMBCS()
5160 ucnv_fromUnicode(cnv, &pLOut, pLOut+1, &pUIn, pUIn-1, off, FALSE, &errorCode); in TestLMBCS()
5168 …ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)(pLIn-1),off,FALSE, &errorCo… in TestLMBCS()
5175 uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)(pLIn-1), &errorCode); in TestLMBCS()
5183 … ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)pLIn,off,FALSE, &errorCode); in TestLMBCS()
5184 ucnv_fromUnicode(cnv, &pLOut,pLOut+1,&pUIn,pUIn,off,FALSE, &errorCode); in TestLMBCS()
5193 uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)pLIn, &errorCode); in TestLMBCS()
5207 …ucnv_fromUnicode(cnv, &pLOut,pLOut+offsets[4],&pUIn,pUIn+UPRV_LENGTHOF(pszUnicode),off,FALSE, &err… in TestLMBCS()
5216 ucnv_toUnicode(cnv, &pUOut,pUOut+4,&pLIn,(pLIn+sizeof(pszLMBCS)),off,FALSE, &errorCode); in TestLMBCS()
5234 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestLMBCS()
5235 …ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+5),o… in TestLMBCS()
5249 …ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+3),o… in TestLMBCS()
5266 …ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+6),o… in TestLMBCS()
5283 …ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+5),o… in TestLMBCS()
5300 …ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+5),o… in TestLMBCS()
5316 …ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+4),o… in TestLMBCS()
5324 ucnv_close(cnv); /* final cleanup */ in TestLMBCS()
5335 UConverter *cnv = 0; in TestJitterbug255() local
5337 cnv = ucnv_open("shift-jis", &status); in TestJitterbug255()
5338 if (U_FAILURE(status) || cnv == 0) { in TestJitterbug255()
5344 /*result = */ucnv_getNextUChar (cnv, &testBuffer, testEnd , &status); in TestJitterbug255()
5351 ucnv_close(cnv); in TestJitterbug255()
5366 UConverter *cnv = 0; in TestEBCDICUS4XML() local
5368 cnv = ucnv_open("ebcdic-xml-us", &status); in TestEBCDICUS4XML()
5369 if (U_FAILURE(status) || cnv == 0) { in TestEBCDICUS4XML()
5373 …ucnv_toUnicode(cnv, &unicodes, unicodes+3, (const char**)&newLines, newLines+3, NULL, TRUE, &statu… in TestEBCDICUS4XML()
5381 …ucnv_fromUnicode(cnv, &target, target+3, (const UChar**)&toUnicodeMaps, toUnicodeMaps+3, NULL, TRU… in TestEBCDICUS4XML()
5388 ucnv_close(cnv); in TestEBCDICUS4XML()
5577 UConverter *cnv = NULL; in TestIsFixedWidth() local
5594 cnv = ucnv_open(fixedWidth[i], &status); in TestIsFixedWidth()
5595 if (cnv == NULL || U_FAILURE(status)) { in TestIsFixedWidth()
5600 if (!ucnv_isFixedWidth(cnv, &status)) { in TestIsFixedWidth()
5603 ucnv_close(cnv); in TestIsFixedWidth()
5607 cnv = ucnv_open(notFixedWidth[i], &status); in TestIsFixedWidth()
5608 if (cnv == NULL || U_FAILURE(status)) { in TestIsFixedWidth()
5613 if (ucnv_isFixedWidth(cnv, &status)) { in TestIsFixedWidth()
5616 ucnv_close(cnv); in TestIsFixedWidth()