• Home
  • Raw
  • Download

Lines Matching refs:cnv

28 static void TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t res…
29 static void TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode e…
113 static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err);
124 static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err) in my_ucnv_open() argument
126 if(cnv && cnv[0] == '@') { in my_ucnv_open()
127 return ucnv_openPackage(loadTestData(err), cnv+1, err); in my_ucnv_open()
129 return ucnv_open(cnv, err); in my_ucnv_open()
169 TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t results[], cons… in TestNextUChar() argument
179 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode); in TestNextUChar()
199 TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode expected, con… in TestNextUCharError() argument
204 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode); in TestNextUCharError()
1471 TestAmbiguousConverter(UConverter *cnv) { in TestAmbiguousConverter() argument
1484 ucnv_toUnicode(cnv, &u, u+20, &s, s+3, NULL, TRUE, &errorCode); in TestAmbiguousConverter()
1497 isAmbiguous=ucnv_isAmbiguous(cnv); in TestAmbiguousConverter()
1502 ucnv_getName(cnv, &errorCode), outUnicode[2]!=0x5c, isAmbiguous); in TestAmbiguousConverter()
1508 ucnv_fixFileSeparator(cnv, outUnicode, (int32_t)(u-outUnicode)); in TestAmbiguousConverter()
1511 log_err("error: ucnv_fixFileSeparator(%s) failed\n", ucnv_getName(cnv, &errorCode)); in TestAmbiguousConverter()
1520 UConverter *ascii_cnv = 0, *sjis_cnv = 0, *cnv; in TestAmbiguous() local
1537 cnv=ucnv_open(name, &status); in TestAmbiguous()
1542 const char* cnvName = ucnv_getName(cnv, &status); in TestAmbiguous()
1545 TestAmbiguousConverter(cnv); in TestAmbiguous()
1548 ucnv_close(cnv); in TestAmbiguous()
1850 UConverter *cnv=ucnv_open("UTF-7", &errorCode); in TestUTF7() local
1855 TestNextUChar(cnv, source, limit, results, "UTF-7"); in TestUTF7()
1857 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF7()
1858 cnvName = ucnv_getName(cnv, &errorCode); in TestUTF7()
1862 ucnv_close(cnv); in TestUTF7()
1893 UConverter *cnv=ucnv_open("IMAP-mailbox-name", &errorCode); in TestIMAP() local
1898 TestNextUChar(cnv, source, limit, results, "IMAP-mailbox-name"); in TestIMAP()
1900 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestIMAP()
1901 cnvName = ucnv_getName(cnv, &errorCode); in TestIMAP()
1905 ucnv_close(cnv); in TestIMAP()
1955 UConverter *cnv=ucnv_open("UTF-8", &errorCode); in TestUTF8() local
1960 TestNextUChar(cnv, source, limit, results, "UTF-8"); in TestUTF8()
1962 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF8()
1965 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode); in TestUTF8()
1968 TestNextUChar(cnv, source, limit, results2, "UTF-8"); in TestUTF8()
1970 ucnv_close(cnv); in TestUTF8()
2026 UConverter *cnv=ucnv_open("CESU-8", &errorCode); in TestCESU8() local
2031 TestNextUChar(cnv, source, limit, results, "CESU-8"); in TestCESU8()
2033 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestCESU8()
2036 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode); in TestCESU8()
2039 TestNextUChar(cnv, source, limit, results2, "CESU-8"); in TestCESU8()
2041 ucnv_close(cnv); in TestCESU8()
2078 UConverter *cnv=ucnv_open("UTF-16", &errorCode); in TestUTF16() local
2085 TestNextUChar(cnv, source, limit, results1, "UTF-16"); in TestUTF16()
2088 ucnv_resetToUnicode(cnv); in TestUTF16()
2089 TestNextUChar(cnv, source, limit, results2, "UTF-16"); in TestUTF16()
2092 ucnv_resetToUnicode(cnv); in TestUTF16()
2093 TestNextUChar(cnv, source, limit, results3, "UTF-16"); in TestUTF16()
2096 ucnv_resetToUnicode(cnv); in TestUTF16()
2097 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF16()
2099 ucnv_close(cnv); in TestUTF16()
2126 UConverter *cnv=ucnv_open("utf-16be", &errorCode); in TestUTF16BE() local
2131 TestNextUChar(cnv, source, limit, results, "UTF-16BE"); in TestUTF16BE()
2133 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF16BE()
2137 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestUTF16BE()
2138 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CH… in TestUTF16BE()
2151 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CH… in TestUTF16BE()
2154 ucnv_close(cnv); in TestUTF16BE()
2180 UConverter *cnv=ucnv_open("utf-16le", &errorCode); in TestUTF16LE() local
2185 TestNextUChar(cnv, source, limit, results, "UTF-16LE"); in TestUTF16LE()
2187 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF16LE()
2191 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestUTF16LE()
2192 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CH… in TestUTF16LE()
2205 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_TRUNCATED_CH… in TestUTF16LE()
2209 ucnv_close(cnv); in TestUTF16LE()
2246 UConverter *cnv=ucnv_open("UTF-32", &errorCode); in TestUTF32() local
2253 TestNextUChar(cnv, source, limit, results1, "UTF-32"); in TestUTF32()
2256 ucnv_resetToUnicode(cnv); in TestUTF32()
2257 TestNextUChar(cnv, source, limit, results2, "UTF-32"); in TestUTF32()
2260 ucnv_resetToUnicode(cnv); in TestUTF32()
2261 TestNextUChar(cnv, source, limit, results3, "UTF-32"); in TestUTF32()
2264 ucnv_resetToUnicode(cnv); in TestUTF32()
2265 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF32()
2267 ucnv_close(cnv); in TestUTF32()
2322 UConverter *cnv=ucnv_open("UTF-32BE", &errorCode); in TestUTF32BE() local
2327 TestNextUChar(cnv, source, limit, results, "UTF-32BE"); in TestUTF32BE()
2330 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF32BE()
2333 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode); in TestUTF32BE()
2336 TestNextUChar(cnv, source, limit, results2, "UTF-32BE"); in TestUTF32BE()
2338 ucnv_close(cnv); in TestUTF32BE()
2393 UConverter *cnv=ucnv_open("UTF-32LE", &errorCode); in TestUTF32LE() local
2398 TestNextUChar(cnv, source, limit, results, "UTF-32LE"); in TestUTF32LE()
2401 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestUTF32LE()
2404 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_SKIP, NULL, &cb, &p, &errorCode); in TestUTF32LE()
2407 TestNextUChar(cnv, source, limit, results2, "UTF-32LE"); in TestUTF32LE()
2409 ucnv_close(cnv); in TestUTF32LE()
2526 UConverter *cnv=ucnv_open("LATIN_1", &errorCode); in TestLATIN1() local
2531 TestNextUChar(cnv, source, limit, results, "LATIN_1"); in TestLATIN1()
2533 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestLATIN1()
2537 ucnv_close(cnv); in TestLATIN1()
2557 UConverter *cnv=ucnv_open("x-mac-turkish", &errorCode); in TestSBCS() local
2562 TestNextUChar(cnv, source, limit, results, "SBCS(x-mac-turkish)"); in TestSBCS()
2564 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestSBCS()
2572 ucnv_close(cnv); in TestSBCS()
2600 UConverter *cnv=my_ucnv_open("@ibm9027", &errorCode); in TestDBCS() local
2605 TestNextUChar(cnv, source, limit, results, "DBCS(@ibm9027)"); in TestDBCS()
2607 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestDBCS()
2611 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestDBCS()
2616 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestDBCS()
2617 …TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CH… in TestDBCS()
2619 ucnv_close(cnv); in TestDBCS()
2651 UConverter *cnv=ucnv_open("ibm-1363", &errorCode); in TestMBCS() local
2656 TestNextUChar(cnv, source, limit, results, "MBCS(ibm-1363)"); in TestMBCS()
2658 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestMBCS()
2662 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestMBCS()
2667 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestMBCS()
2668 …TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CH… in TestMBCS()
2670 ucnv_close(cnv); in TestMBCS()
2686 UConverter *cnv=ucnv_open(cnvName, &status); in TestICCRunout() local
2697 ucnv_toUnicode(cnv, &target, targetLim, &source, sourceLim, NULL, TRUE, &status); in TestICCRunout()
2710 c1=ucnv_getNextUChar(cnv, &source, sourceLim, &status); in TestICCRunout()
2713 c2=ucnv_getNextUChar(cnv, &source, sourceLim, &status); in TestICCRunout()
2716 c3=ucnv_getNextUChar(cnv, &source, sourceLim, &status); in TestICCRunout()
2725 ucnv_close(cnv); in TestICCRunout()
2760 UConverter *cnv; in TestISO_2022() local
2762 cnv=ucnv_open("ISO_2022", &errorCode); in TestISO_2022()
2767 TestNextUChar(cnv, source, limit, results, "ISO_2022"); in TestISO_2022()
2770 TestNextUCharError(cnv, source, source-1, U_ILLEGAL_ARGUMENT_ERROR, "sourceLimit < source"); in TestISO_2022()
2771 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestISO_2022()
2775 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestISO_2022()
2776 …TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_TRUNCATED_CH… in TestISO_2022()
2781 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_CHAR… in TestISO_2022()
2783 ucnv_close(cnv); in TestISO_2022()
2789 TestSmallTargetBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){ in TestSmallTargetBuffer() argument
2806 ucnv_reset(cnv); in TestSmallTargetBuffer()
2819 … ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,FALSE, &errorCode); in TestSmallTargetBuffer()
2835 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,FALSE,&errorCode); in TestSmallTargetBuffer()
2858 static void TestToAndFromUChars(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){ in TestToAndFromUChars() argument
2879 ucnv_reset(cnv); in TestToAndFromUChars()
2880 …numCharsInTarget=ucnv_fromUChars(cnv, cTarget, (int32_t)(cTargetLimit-cTarget), uSource, (int32_t)… in TestToAndFromUChars()
2887 ucnv_toUChars(cnv,uTarget,(int32_t)(uTargetLimit-uTarget),cSource,numCharsInTarget,&errorCode); in TestToAndFromUChars()
2905 static void TestSmallSourceBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){ in TestSmallSourceBuffer() argument
2924 ucnv_reset(cnv); in TestSmallSourceBuffer()
2939 … ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,FALSE, &errorCode); in TestSmallSourceBuffer()
2957 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,FALSE,&errorCode); in TestSmallSourceBuffer()
2980 TestGetNextUChar2022(UConverter* cnv, const char* source, const char* limit, in TestGetNextUChar2022() argument
2987 ucnv_reset(cnv); in TestGetNextUChar2022()
2990 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode); in TestGetNextUChar2022()
3111 UConverter *cnv; in TestHZ() local
3114 cnv=ucnv_open("HZ", &errorCode); in TestHZ()
3128 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestHZ()
3137 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestHZ()
3151 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "HZ encoding"); in TestHZ()
3152 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestHZ()
3153 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestHZ()
3154 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestHZ()
3156 ucnv_close(cnv); in TestHZ()
3330 UConverter *cnv; in TestISO_2022_JP() local
3333 cnv=ucnv_open("ISO_2022_JP_1", &errorCode); in TestISO_2022_JP()
3347 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_JP()
3356 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_JP()
3372 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP()
3373 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP()
3374 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-JP encoding"); in TestISO_2022_JP()
3375 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP()
3377 ucnv_close(cnv); in TestISO_2022_JP()
3396 UConverter *cnv; in TestConv() local
3399 cnv=my_ucnv_open(conv, &errorCode); in TestConv()
3413 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestConv()
3423 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestConv()
3437 TestSmallTargetBuffer(in,(const UChar*)&in[len],cnv); in TestConv()
3438 TestSmallSourceBuffer(in,(const UChar*)&in[len],cnv); in TestConv()
3439 TestGetNextUChar2022(cnv, cBuf, cTarget, in, conv); in TestConv()
3441 TestGetNextUChar2022(cnv, byteArr, (byteArr+byteArrLen), in, lang); in TestConv()
3442 TestToAndFromUChars(in,(const UChar*)&in[len],cnv); in TestConv()
3448 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestConv()
3465 ucnv_close(cnv); in TestConv()
3862 UConverter *cnv; in TestISO_2022_JP_1() local
3864 cnv=ucnv_open("ISO_2022_JP_1", &errorCode); in TestISO_2022_JP_1()
3878 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,NULL,TRUE, &errorCode); in TestISO_2022_JP_1()
3886 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,NULL,TRUE,&errorCode); in TestISO_2022_JP_1()
3903 ucnv_reset(cnv); in TestISO_2022_JP_1()
3906 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestISO_2022_JP_1()
3908 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP_1()
3909 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP_1()
3910 ucnv_close(cnv); in TestISO_2022_JP_1()
3951 UConverter *cnv; in TestISO_2022_JP_2() local
3954 cnv=ucnv_open("ISO_2022_JP_2", &errorCode); in TestISO_2022_JP_2()
3968 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_JP_2()
3977 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_JP_2()
3991 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP_2()
3992 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP_2()
3993 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_JP_2()
3995 ucnv_reset(cnv); in TestISO_2022_JP_2()
3998 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestISO_2022_JP_2()
4000 ucnv_close(cnv); in TestISO_2022_JP_2()
4028 UConverter *cnv; in TestISO_2022_KR() local
4031 cnv=ucnv_open("ISO_2022,locale=kr", &errorCode); in TestISO_2022_KR()
4045 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_KR()
4054 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_KR()
4067 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-KR encoding"); in TestISO_2022_KR()
4068 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_KR()
4069 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_KR()
4070 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_KR()
4073 ucnv_reset(cnv); in TestISO_2022_KR()
4076 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestISO_2022_KR()
4077 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_ESCA… in TestISO_2022_KR()
4079 ucnv_close(cnv); in TestISO_2022_KR()
4107 UConverter *cnv; in TestISO_2022_KR_1() local
4110 cnv=ucnv_open("ibm-25546", &errorCode); in TestISO_2022_KR_1()
4124 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_KR_1()
4133 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_KR_1()
4146 ucnv_reset(cnv); in TestISO_2022_KR_1()
4147 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-KR encoding"); in TestISO_2022_KR_1()
4148 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_KR_1()
4149 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_KR_1()
4150 ucnv_reset(cnv); in TestISO_2022_KR_1()
4151 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_KR_1()
4153 ucnv_reset(cnv); in TestISO_2022_KR_1()
4156 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestISO_2022_KR_1()
4157 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ILLEGAL_ESCA… in TestISO_2022_KR_1()
4159 ucnv_close(cnv); in TestISO_2022_KR_1()
4413 UConverter *cnv;
4416 cnv=ucnv_open("ISO_2022,locale=cn,version=1", &errorCode);
4430 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode);
4439 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode);
4455 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4456 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv);
4458 ucnv_reset(cnv);
4461 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, …
4463 ucnv_close(cnv);
4512 UConverter *cnv; in TestISO_2022_CN() local
4515 cnv=ucnv_open("ISO_2022,locale=cn,version=0", &errorCode); in TestISO_2022_CN()
4529 ucnv_fromUnicode( cnv , &cTarget, cTargetLimit,&uSource,uSourceLimit,myOff,TRUE, &errorCode); in TestISO_2022_CN()
4538 ucnv_toUnicode(cnv,&uTarget,uTargetLimit,&cSource,cSourceLimit,myOff,TRUE,&errorCode); in TestISO_2022_CN()
4554 TestGetNextUChar2022(cnv, cBuf, cTarget, in, "ISO-2022-CN encoding"); in TestISO_2022_CN()
4555 TestSmallTargetBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_CN()
4556 TestSmallSourceBuffer(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_CN()
4557 TestToAndFromUChars(in,(const UChar*)in + (sizeof(in)/sizeof(in[0])),cnv); in TestISO_2022_CN()
4560 ucnv_reset(cnv); in TestISO_2022_CN()
4563 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestISO_2022_CN()
4566 ucnv_close(cnv); in TestISO_2022_CN()
4613 UConverter * cnv = ucnv_open(testPtr->converterName, &err); in TestJitterbug6175() local
4618 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_EMPTYSEGMENT, NULL, NULL, NULL, &err); in TestJitterbug6175()
4621 ucnv_close(cnv); in TestJitterbug6175()
4630 … ucnv_toUnicode(cnv, &toUCharsPtr, toUCharsLimit, &inCharsPtr, inCharsLimit, NULL, TRUE, &err); in TestJitterbug6175()
4632 ucnv_close(cnv); in TestJitterbug6175()
4674 UConverter *cnv=ucnv_open("ibm-930", &errorCode); in TestEBCDIC_STATEFUL() local
4679 TestNextUChar(cnv, source, limit, results, "EBCDIC_STATEFUL(ibm-930)"); in TestEBCDIC_STATEFUL()
4680 ucnv_reset(cnv); in TestEBCDIC_STATEFUL()
4682 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); in TestEBCDIC_STATEFUL()
4683 ucnv_reset(cnv); in TestEBCDIC_STATEFUL()
4687 …TestNextUCharError(cnv, (const char*)source1, (const char*)source1+sizeof(source1), U_INDEX_OUTOFB… in TestEBCDIC_STATEFUL()
4690 ucnv_reset(cnv); in TestEBCDIC_STATEFUL()
4693 …TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, … in TestEBCDIC_STATEFUL()
4695 ucnv_reset(cnv); in TestEBCDIC_STATEFUL()
4698 TestNextUChar(cnv,source,limit,results2,"EBCDIC_STATEFUL(ibm-930),seq#2"); in TestEBCDIC_STATEFUL()
4699 ucnv_close(cnv); in TestEBCDIC_STATEFUL()
4750 UConverter *cnv=ucnv_open("gb18030", &errorCode); in TestGB18030() local
4755 TestNextUChar(cnv, (const char *)in, (const char *)in+sizeof(in), results, "gb18030"); in TestGB18030()
4756 ucnv_close(cnv); in TestGB18030()
4840 UConverter *cnv; in TestLMBCS() local
4932 cnv=ucnv_open("lmbcs", &errorCode); /* use generic name for LMBCS-1 */ in TestLMBCS()
4940 ucnv_toUnicode (cnv, in TestLMBCS()
4958 ucnv_close(cnv); in TestLMBCS()
4971 cnv=ucnv_open("LMBCS-1", &errorCode); in TestLMBCS()
4981 uniChar=ucnv_getNextUChar(cnv, &source, source + (off[1] - off[0]), &errorCode); in TestLMBCS()
4994 ucnv_close(cnv); in TestLMBCS()
5094 cnv = ucnv_open(NAME_LMBCS_1, &errorCode); in TestLMBCS()
5103 ucnv_toUnicode (cnv, in TestLMBCS()
5153 ucnv_fromUnicode(cnv, &pLOut, pLOut+1, &pUIn, pUIn-1, off, FALSE, &errorCode); in TestLMBCS()
5161 …ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)(pLIn-1),off,FALSE, &errorCo… in TestLMBCS()
5168 uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)(pLIn-1), &errorCode); in TestLMBCS()
5176 … ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)pLIn,off,FALSE, &errorCode); in TestLMBCS()
5177 ucnv_fromUnicode(cnv, &pLOut,pLOut+1,&pUIn,pUIn,off,FALSE, &errorCode); in TestLMBCS()
5186 uniChar = ucnv_getNextUChar(cnv, (const char **)&pLIn, (const char *)pLIn, &errorCode); in TestLMBCS()
5200 …ucnv_fromUnicode(cnv, &pLOut,pLOut+offsets[4],&pUIn,pUIn+sizeof(pszUnicode)/sizeof(UChar),off,FALS… in TestLMBCS()
5209 ucnv_toUnicode(cnv, &pUOut,pUOut+4,&pLIn,(pLIn+sizeof(pszLMBCS)),off,FALSE, &errorCode); in TestLMBCS()
5227 ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in TestLMBCS()
5228 …ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pL… in TestLMBCS()
5242 …ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pL… in TestLMBCS()
5259 …ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pL… in TestLMBCS()
5276 …ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pL… in TestLMBCS()
5293 …ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pL… in TestLMBCS()
5309 …ucnv_toUnicode(cnv, &pUOut,pUOut+sizeof(UOut)/sizeof(UChar),(const char **)&pLIn,(const char *)(pL… in TestLMBCS()
5317 ucnv_close(cnv); /* final cleanup */ in TestLMBCS()
5328 UConverter *cnv = 0; in TestJitterbug255() local
5330 cnv = ucnv_open("shift-jis", &status); in TestJitterbug255()
5331 if (U_FAILURE(status) || cnv == 0) { in TestJitterbug255()
5337 /*result = */ucnv_getNextUChar (cnv, &testBuffer, testEnd , &status); in TestJitterbug255()
5344 ucnv_close(cnv); in TestJitterbug255()
5359 UConverter *cnv = 0; in TestEBCDICUS4XML() local
5361 cnv = ucnv_open("ebcdic-xml-us", &status); in TestEBCDICUS4XML()
5362 if (U_FAILURE(status) || cnv == 0) { in TestEBCDICUS4XML()
5366 …ucnv_toUnicode(cnv, &unicodes, unicodes+3, (const char**)&newLines, newLines+3, NULL, TRUE, &statu… in TestEBCDICUS4XML()
5374 …ucnv_fromUnicode(cnv, &target, target+3, (const UChar**)&toUnicodeMaps, toUnicodeMaps+3, NULL, TRU… in TestEBCDICUS4XML()
5381 ucnv_close(cnv); in TestEBCDICUS4XML()