• Home
  • Raw
  • Download

Lines Matching refs:cc

89     ConversionCase cc;  in TestToUnicode()  local
115 cc.caseNr=i; in TestToUnicode()
119 cc.charset=charset; in TestToUnicode()
121 cc.bytes=testCase->getBinary(cc.bytesLength, "bytes", errorCode); in TestToUnicode()
123 cc.unicode=unicode.getBuffer(); in TestToUnicode()
124 cc.unicodeLength=unicode.length(); in TestToUnicode()
127 cc.offsets=testCase->getIntVector(offsetsLength, "offsets", errorCode); in TestToUnicode()
129 cc.offsets=NULL; in TestToUnicode()
136 cc.finalFlush= 0!=testCase->getInt28("flush", errorCode); in TestToUnicode()
137 cc.fallbacks= 0!=testCase->getInt28("fallbacks", errorCode); in TestToUnicode()
141 cc.outErrorCode=U_INVALID_CHAR_FOUND; in TestToUnicode()
143 cc.outErrorCode=U_ILLEGAL_CHAR_FOUND; in TestToUnicode()
145 cc.outErrorCode=U_TRUNCATED_CHAR_FOUND; in TestToUnicode()
147 cc.outErrorCode=U_ILLEGAL_ESCAPE_SEQUENCE; in TestToUnicode()
149 cc.outErrorCode=U_UNSUPPORTED_ESCAPE_SEQUENCE; in TestToUnicode()
151 cc.outErrorCode=U_ZERO_ERROR; in TestToUnicode()
156 cc.cbopt=cbopt; in TestToUnicode()
179 cc.invalidChars=testCase->getBinary(cc.invalidLength, "invalidChars", errorCode); in TestToUnicode()
187 ToUnicodeCase(cc, callback, option); in TestToUnicode()
201 ConversionCase cc; in TestFromUnicode() local
228 cc.caseNr=i; in TestFromUnicode()
232 cc.charset=charset; in TestFromUnicode()
235 cc.unicode=unicode.getBuffer(); in TestFromUnicode()
236 cc.unicodeLength=unicode.length(); in TestFromUnicode()
237 cc.bytes=testCase->getBinary(cc.bytesLength, "bytes", errorCode); in TestFromUnicode()
240 cc.offsets=testCase->getIntVector(offsetsLength, "offsets", errorCode); in TestFromUnicode()
242 cc.offsets=NULL; in TestFromUnicode()
243 } else if(offsetsLength!=cc.bytesLength) { in TestFromUnicode()
245 i, cc.bytesLength, offsetsLength); in TestFromUnicode()
249 cc.finalFlush= 0!=testCase->getInt28("flush", errorCode); in TestFromUnicode()
250 cc.fallbacks= 0!=testCase->getInt28("fallbacks", errorCode); in TestFromUnicode()
254 cc.outErrorCode=U_INVALID_CHAR_FOUND; in TestFromUnicode()
256 cc.outErrorCode=U_ILLEGAL_CHAR_FOUND; in TestFromUnicode()
258 cc.outErrorCode=U_TRUNCATED_CHAR_FOUND; in TestFromUnicode()
260 cc.outErrorCode=U_ZERO_ERROR; in TestFromUnicode()
264 cc.setSub=0; // default: no subchar in TestFromUnicode()
274 if(length<=0 || length>=(int32_t)sizeof(cc.subchar)) { in TestFromUnicode()
280 cc.subchar[j]=(char)p[j]; in TestFromUnicode()
283 cc.subchar[j]=0; in TestFromUnicode()
284 cc.setSub=1; in TestFromUnicode()
293 if(length<0 || length>=UPRV_LENGTHOF(cc.subString)) { in TestFromUnicode()
296 u_memcpy(cc.subString, p, length); in TestFromUnicode()
298 cc.subString[length]=0; in TestFromUnicode()
299 cc.setSub=-1; in TestFromUnicode()
307 cc.cbopt=cbopt; in TestFromUnicode()
331 cc.invalidUChars=invalidUChars.getBuffer(); in TestFromUnicode()
332 cc.invalidLength=invalidUChars.length(); in TestFromUnicode()
340 FromUnicodeCase(cc, callback, option); in TestFromUnicode()
1008 stepToUnicode(ConversionCase &cc, UConverter *cnv, in stepToUnicode() argument
1017 source=(const char *)cc.bytes; in stepToUnicode()
1019 bytesLimit=source+cc.bytesLength; in stepToUnicode()
1032 flush=cc.finalFlush; in stepToUnicode()
1088 flush=(UBool)(cc.finalFlush && sourceLimit==bytesLimit); in stepToUnicode()
1198 ConversionTest::ToUnicodeCase(ConversionCase &cc, UConverterToUCallback callback, const char *optio… in ToUnicodeCase() argument
1201 LocalUConverterPointer cnv(cnv_open(cc.charset, errorCode)); in ToUnicodeCase()
1205cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, errorCode.errorName()); in ToUnicodeCase()
1215cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, u_errorName(errorCode)); in ToUnicodeCase()
1246 if(step<0 && !cc.finalFlush) { in ToUnicodeCase()
1253 cc.offsets=NULL; in ToUnicodeCase()
1264 resultLength=stepToUnicode(cc, cnv.getAlias(), in ToUnicodeCase()
1269 cc, cnv.getAlias(), steps[i].name, in ToUnicodeCase()
1271 cc.offsets!=NULL ? resultOffsets : NULL, in ToUnicodeCase()
1273 if(errorCode.isFailure() || !cc.finalFlush) { in ToUnicodeCase()
1278 if (cc.offsets != NULL && resultOffsets[resultLength] != -1) { in ToUnicodeCase()
1280 cc.caseNr, cc.charset, resultLength); in ToUnicodeCase()
1284 cc.caseNr, cc.charset, resultLength); in ToUnicodeCase()
1289 while(ok && cc.finalFlush) { in ToUnicodeCase()
1296 (const char *)cc.bytes, cc.bytesLength, in ToUnicodeCase()
1299 cc, cnv.getAlias(), "toUChars", in ToUnicodeCase()
1312 (const char *)cc.bytes, cc.bytesLength, in ToUnicodeCase()
1318 cc, cnv.getAlias(), "preflight toUChars", in ToUnicodeCase()
1330 ConversionTest::checkToUnicode(ConversionCase &cc, UConverter *cnv, const char *name, in checkToUnicode() argument
1348cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, name, u_errorName(errorCode)); in checkToUnicode()
1353 if(cc.unicodeLength!=resultLength) { in checkToUnicode()
1355 } else if(0!=u_memcmp(cc.unicode, result, cc.unicodeLength)) { in checkToUnicode()
1357 …} else if(cc.offsets!=NULL && 0!=memcmp(cc.offsets, resultOffsets, cc.unicodeLength*sizeof(*cc.off… in checkToUnicode()
1359 } else if(cc.outErrorCode!=resultErrorCode) { in checkToUnicode()
1361 } else if(cc.invalidLength!=resultInvalidLength) { in checkToUnicode()
1363 } else if(0!=memcmp(cc.invalidChars, resultInvalidChars, cc.invalidLength)) { in checkToUnicode()
1376 s=printBytes(cc.bytes, cc.bytesLength, bytesString); in checkToUnicode()
1377 s=printUnicode(cc.unicode, cc.unicodeLength, unicodeString=s); in checkToUnicode()
1379 s=printOffsets(cc.offsets, cc.unicodeLength, offsetsString=s); in checkToUnicode()
1381 s=printBytes(cc.invalidChars, cc.invalidLength, invalidCharsString=s); in checkToUnicode()
1386cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, name, (int)(s-buffer)); in checkToUnicode()
1398 cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, name, msg, in checkToUnicode()
1399 bytesString, cc.bytesLength, in checkToUnicode()
1400 unicodeString, cc.unicodeLength, in checkToUnicode()
1404 u_errorName(cc.outErrorCode), u_errorName(resultErrorCode), in checkToUnicode()
1414 stepFromUTF8(ConversionCase &cc, in stepFromUTF8() argument
1425 source=cc.utf8; in stepFromUTF8()
1428 utf8Limit=source+cc.utf8Length; in stepFromUTF8()
1440 flush=cc.finalFlush; in stepFromUTF8()
1512 flush=(UBool)(cc.finalFlush && sourceLimit==utf8Limit); in stepFromUTF8()
1520 stepFromUnicode(ConversionCase &cc, UConverter *cnv, in stepFromUnicode() argument
1529 source=cc.unicode; in stepFromUnicode()
1531 unicodeLimit=source+cc.unicodeLength; in stepFromUnicode()
1543 flush=cc.finalFlush; in stepFromUnicode()
1599 flush=(UBool)(cc.finalFlush && sourceLimit==unicodeLimit); in stepFromUnicode()
1607 ConversionTest::FromUnicodeCase(ConversionCase &cc, UConverterFromUCallback callback, const char *o… in FromUnicodeCase() argument
1613 cnv=cnv_open(cc.charset, errorCode); in FromUnicodeCase()
1616cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, u_errorName(errorCode)); in FromUnicodeCase()
1626cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, u_errorName(errorCode)); in FromUnicodeCase()
1634 ucnv_setFallback(cnv, cc.fallbacks); in FromUnicodeCase()
1639 if(cc.setSub>0) { in FromUnicodeCase()
1640 length=(int32_t)strlen(cc.subchar); in FromUnicodeCase()
1641 ucnv_setSubstChars(cnv, cc.subchar, (int8_t)length, &errorCode); in FromUnicodeCase()
1644cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, u_errorName(errorCode)); in FromUnicodeCase()
1648 } else if(cc.setSub<0) { in FromUnicodeCase()
1649 ucnv_setSubstString(cnv, cc.subString, -1, &errorCode); in FromUnicodeCase()
1652cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, u_errorName(errorCode)); in FromUnicodeCase()
1660 cc.utf8=utf8; in FromUnicodeCase()
1661 u_strToUTF8(utf8, UPRV_LENGTHOF(utf8), &cc.utf8Length, in FromUnicodeCase()
1662 cc.unicode, cc.unicodeLength, in FromUnicodeCase()
1668 cc.utf8Length=-1; in FromUnicodeCase()
1697 resultLength=stepFromUnicode(cc, cnv, in FromUnicodeCase()
1702 cc, cnv, steps[i].name, in FromUnicodeCase()
1704 cc.offsets!=NULL ? resultOffsets : NULL, in FromUnicodeCase()
1706 if(U_FAILURE(errorCode) || !cc.finalFlush) { in FromUnicodeCase()
1713 cc.caseNr, cc.charset, resultLength); in FromUnicodeCase()
1717 cc.caseNr, cc.charset, resultLength); in FromUnicodeCase()
1721 cc.offsets=NULL; in FromUnicodeCase()
1724 if(cc.utf8Length>=0) { in FromUnicodeCase()
1726 resultLength=stepFromUTF8(cc, utf8Cnv, cnv, in FromUnicodeCase()
1730 cc, cnv, steps[i].utf8Name, in FromUnicodeCase()
1734 if(U_FAILURE(errorCode) || !cc.finalFlush) { in FromUnicodeCase()
1744 while(ok && cc.finalFlush) { in FromUnicodeCase()
1751 cc.unicode, cc.unicodeLength, in FromUnicodeCase()
1754 cc, cnv, "fromUChars", in FromUnicodeCase()
1767 cc.unicode, cc.unicodeLength, in FromUnicodeCase()
1773 cc, cnv, "preflight fromUChars", in FromUnicodeCase()
1785 ConversionTest::checkFromUnicode(ConversionCase &cc, UConverter *cnv, const char *name, in checkFromUnicode() argument
1803cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, name, u_errorName(errorCode)); in checkFromUnicode()
1808 if(cc.bytesLength!=resultLength) { in checkFromUnicode()
1810 } else if(0!=memcmp(cc.bytes, result, cc.bytesLength)) { in checkFromUnicode()
1812 …} else if(cc.offsets!=NULL && 0!=memcmp(cc.offsets, resultOffsets, cc.bytesLength*sizeof(*cc.offse… in checkFromUnicode()
1814 } else if(cc.outErrorCode!=resultErrorCode) { in checkFromUnicode()
1816 } else if(cc.invalidLength!=resultInvalidLength) { in checkFromUnicode()
1818 } else if(0!=u_memcmp(cc.invalidUChars, resultInvalidUChars, cc.invalidLength)) { in checkFromUnicode()
1831 s=printUnicode(cc.unicode, cc.unicodeLength, unicodeString); in checkFromUnicode()
1832 s=printBytes(cc.bytes, cc.bytesLength, bytesString=s); in checkFromUnicode()
1834 s=printOffsets(cc.offsets, cc.bytesLength, offsetsString=s); in checkFromUnicode()
1836 s=printUnicode(cc.invalidUChars, cc.invalidLength, invalidCharsString=s); in checkFromUnicode()
1841cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, name, (int)(s-buffer)); in checkFromUnicode()
1853 cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, name, msg, in checkFromUnicode()
1854 unicodeString, cc.unicodeLength, in checkFromUnicode()
1855 bytesString, cc.bytesLength, in checkFromUnicode()
1859 u_errorName(cc.outErrorCode), u_errorName(resultErrorCode), in checkFromUnicode()