Home | History | Annotate | Download | only in cintltst

Lines Matching defs:source

31 static void TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t results[], const char* message);
32 static void TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode expected, const char* message);
176 TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t results[], const char* message)
179 const char* s=(char*)source;
206 TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode expected, const char* message)
208 const char* s=(char*)source;
375 static ETestConvertResult testConvertFromU( const UChar *source, int sourceLen, const uint8_t *expect, int expectLen,
417 src = source;
423 realSourceEnd = source + sourceLen;
439 log_verbose("calling fromUnicode @ SOURCE:%08lx to %08lx TARGET: %08lx to %08lx, flush=%s\n", src,sourceLimit, targ,end, doFlush?"TRUE":"FALSE");
520 printUSeqErr(source, sourceLen);
532 static ETestConvertResult testConvertToU( const uint8_t *source, int sourcelen, const UChar *expect, int expectlen,
575 src = (const char *)source;
608 (UBool)(srcLimit == realSourceEnd), /* flush if we're at the end of hte source data */
671 for(i=0; i<(src-(const char *)source); i++) {
672 log_err("%X,", (unsigned char)source[i]);
1686 const char* source = NULL;
1690 source = data[i];
1691 enc = ucnv_detectUnicodeSignature(source, -1 , &signatureLength, &err);
1693 log_err("ucnv_detectUnicodeSignature failed for source : %s at index :%i. Error: %s\n", source,i,u_errorName(err));
1697 log_err("ucnv_detectUnicodeSignature failed for source : %s at index :%i. Expected: %s. Got: %s\n",source,i,expected[i],enc);
1701 log_err("ucnv_detectUnicodeSignature failed for source : %s at index :%i.Expected Length: %i. Got length: %i\n",source,i,signatureLength,expectedLength[i]);
1799 const char* source = NULL;
1803 source = data[i];
1805 enc = ucnv_detectUnicodeSignature(source, sourceLength , &signatureLength, &err);
1807 log_err("ucnv_detectUnicodeSignature test2 failed for source : %s at index :%i. Error: %s\n", source,i,u_errorName(err));
1812 log_err("ucnv_detectUnicodeSignature test2 failed for source : %s at index :%i. Expected: %s. Got: %s\n",source,i,expected[i],enc);
1817 log_err("ucnv_detectUnicodeSignature test2 failed for source : %s at index :%i.Expected Length: %i. Got length: %i\n",source,i,signatureLength,expectedLength[i]);
1849 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
1856 TestNextUChar(cnv, source, limit, results, "UTF-7");
1857 /* Test the condition when source >= sourceLimit */
1858 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
1892 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
1899 TestNextUChar(cnv, source, limit, results, "IMAP-mailbox-name");
1900 /* Test the condition when source >= sourceLimit */
1901 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
1954 const char *source=(const char *)in,*limit=(const char *)in+sizeof(in);
1961 TestNextUChar(cnv, source, limit, results, "UTF-8");
1962 /* Test the condition when source >= sourceLimit */
1963 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
1967 source=(const char *)in2;
1969 TestNextUChar(cnv, source, limit, results2, "UTF-8");
2025 const char *source=(const char *)in,*limit=(const char *)in+sizeof(in);
2032 TestNextUChar(cnv, source, limit, results, "CESU-8");
2033 /* Test the condition when source >= sourceLimit */
2034 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2038 source=(const char *)in2;
2040 TestNextUChar(cnv, source, limit, results2, "CESU-8");
2076 const char *source, *limit;
2085 source=(const char *)in1, limit=(const char *)in1+sizeof(in1);
2086 TestNextUChar(cnv, source, limit, results1, "UTF-16");
2088 source=(const char *)in2, limit=(const char *)in2+sizeof(in2);
2090 TestNextUChar(cnv, source, limit, results2, "UTF-16");
2092 source=(const char *)in3, limit=(const char *)in3+sizeof(in3);
2094 TestNextUChar(cnv, source, limit, results3, "UTF-16");
2096 /* Test the condition when source >= sourceLimit */
2098 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2125 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
2132 TestNextUChar(cnv, source, limit, results, "UTF-16BE");
2133 /* Test the condition when source >= sourceLimit */
2134 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2179 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
2186 TestNextUChar(cnv, source, limit, results, "UTF-16LE");
2187 /* Test the condition when source >= sourceLimit */
2188 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2244 const char *source, *limit;
2253 source=(const char *)in1, limit=(const char *)in1+sizeof(in1);
2254 TestNextUChar(cnv, source, limit, results1, "UTF-32");
2256 source=(const char *)in2, limit=(const char *)in2+sizeof(in2);
2258 TestNextUChar(cnv, source, limit, results2, "UTF-32");
2260 source=(const char *)in3, limit=(const char *)in3+sizeof(in3);
2262 TestNextUChar(cnv, source, limit, results3, "UTF-32");
2264 /* Test the condition when source >= sourceLimit */
2266 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2321 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
2328 TestNextUChar(cnv, source, limit, results, "UTF-32BE");
2330 /* Test the condition when source >= sourceLimit */
2331 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2335 source=(const char *)in2;
2337 TestNextUChar(cnv, source, limit, results2, "UTF-32BE");
2392 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
2399 TestNextUChar(cnv, source, limit, results, "UTF-32LE");
2401 /* Test the condition when source >= sourceLimit */
2402 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2406 source=(const char *)in2;
2408 TestNextUChar(cnv, source, limit, results2, "UTF-32LE");
2523 const char *source=(const char *)in;
2532 TestNextUChar(cnv, source, limit, results, "LATIN_1");
2533 /* Test the condition when source >= sourceLimit */
2534 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2556 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
2563 TestNextUChar(cnv, source, limit, results, "SBCS(x-mac-turkish)");
2564 /* Test the condition when source >= sourceLimit */
2565 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2570 TestNextUCharError(cnv, illegalsource, illegalsource+sizeof(illegalsource), U_INVALID_CHAR_FOUND, "source has a illegal characte");
2598 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
2606 TestNextUChar(cnv, source, limit, results, "DBCS(@ibm9027)");
2607 /* Test the condition when source >= sourceLimit */
2608 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2649 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
2657 TestNextUChar(cnv, source, limit, results, "MBCS(ibm-1363)");
2658 /* Test the condition when source >= sourceLimit */
2659 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2684 const char *source = sourceData;
2698 ucnv_toUnicode(cnv, &target, targetLim, &source, sourceLim, NULL, TRUE, &status);
2700 log_info("After convert: target@%d, source@%d, status%s\n",
2701 target-targetBuf, source-sourceData, u_errorName(status));
2711 c1=ucnv_getNextUChar(cnv, &source, sourceLim, &status);
2712 log_verbose("c1: U+%04X, source@%d, status %s\n", c1, source-sourceData, u_errorName(status));
2714 c2=ucnv_getNextUChar(cnv, &source, sourceLim, &status);
2715 log_verbose("c2: U+%04X, source@%d, status %s\n", c2, source-sourceData, u_errorName(status));
2717 c3=ucnv_getNextUChar(cnv, &source, sourceLim, &status);
2718 log_verbose("c3: U+%04X, sourcesource-sourceData, u_errorName(status));
2759 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
2768 TestNextUChar(cnv, source, limit, results, "ISO_2022");
2770 /* Test the condition when source >= sourceLimit */
2771 TestNextUCharError(cnv, source, source-1, U_ILLEGAL_ARGUMENT_ERROR, "sourceLimit < source");
2772 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2790 TestSmallTargetBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){
2809 uSource = (UChar*) source;
2847 uSource = source;
2849 for(len=0;len<(int)(source - sourceLimit);len++){
2859 static void TestToAndFromUChars(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){
2874 uSource = source;
2893 uSource = source;
2906 static void TestSmallSourceBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){
2927 uSource = (UChar*) source;
2969 uSource = source;
2971 for(;len<(int)(source - sourceLimit);len++){
2981 TestGetNextUChar2022(UConverter* cnv, const char* source, const char* limit,
2984 const char* s=(char*)source;
3018 const UChar*source = in;
3035 &source,
3036 source+3,
3062 &source,
3063 source,
3797 char source[] = { 0x1b,0x24,0x42,0x3d,0x45,0x1b,0x28,0x4a,0x0d,0x0a,
3808 const char* csource=source;
3817 ucnv_toUnicode(conv,&utarget,utargetLimit,&csource,csource+sizeof(source),NULL,TRUE,&err);
4178 static const char* source = "\x1b\x24\x29\x43\x6b\x6b\x6e\x6e\x6a\x68\x70\x6f\x69\x75\x79\x71\x77\x65\x68\x67\x0A"
4190 ucnv_toUnicode(kr,&target,targetLimit,&source,source+uprv_strlen(source),NULL,TRUE,&errorCode);
4202 ucnv_toUnicode(kr,&target,targetLimit,&source,source+uprv_strlen(source),NULL,TRUE,&errorCode);
4684 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
4691 TestNextUChar(cnv, source, limit, results, "EBCDIC_STATEFUL(ibm-930)");
4693 /* Test the condition when source >= sourceLimit */
4694 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
4696 /*Test for the condition where source > sourcelimit after consuming the shift chracter */
4708 source=(const char*)in2;
4710 TestNextUChar(cnv,source,limit,results2,"EBCDIC_STATEFUL(ibm-930),seq#2");
4760 /* const char *source=(const char *)in,*limit=(const char *)in+sizeof(in); */
4975 const char *source=(const char *)pszLMBCS;
4991 while(source<limit) {
4992 sourceStart=source;
4993 uniChar=ucnv_getNextUChar(cnv, &source, source + (off[1] - off[0]), &errorCode);
4997 } else if(source-sourceStart != off[1] - off[0] || uniChar != *results) {
4999 uniChar, (source-sourceStart), *results, *off);
5093 /* Small source buffer testing, LMBCS -> Unicode */
5163 /* negative source request should always return U_ILLEGAL_ARGUMENT_ERROR */
5168 log_err("Unexpected Error on negative source request to ucnv_fromUnicode: %s\n", u_errorName(errorCode));
5176 log_err("Unexpected Error on negative source request to ucnv_toUnicode: %s\n", u_errorName(errorCode));
5183 log_err("Unexpected Error on negative source request to ucnv_getNextUChar: %s\n", u_errorName(errorCode));
5187 /* 0 byte source request - no error, no pointer movement */
5191 log_err("0 byte source request: unexpected error: %s\n", u_errorName(errorCode));
5195 log_err("Unexpected pointer move in 0 byte source request \n");
5197 /*0 byte source request - GetNextUChar : error & value == fffe or ffff */
5201 log_err("Unexpected Error on 0-byte source request to ucnv_getnextUChar: %s\n", u_errorName(errorCode));
5205 log_err("Unexpected value on 0-byte source request to ucnv_getnextUChar \n");
5498 const char* source = data;
5508 ucnv_toUnicode(conv, &target, targetLimit, &source, sourceLimit, NULL, TRUE, &status);
5551 const char* source = data;
5554 ucnv_toUnicode(conv, &target, targetLimit, &source, sourceLimit, NULL, TRUE, &status);