Lines Matching defs:source

32 static void TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t results[], const char* message);
33 static void TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode expected, const char* message);
177 TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t results[], const char* message)
180 const char* s=(char*)source;
207 TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode expected, const char* message)
209 const char* s=(char*)source;
363 static ETestConvertResult testConvertFromU( const UChar *source, int sourceLen, const uint8_t *expect, int expectLen,
405 src = source;
411 realSourceEnd = source + sourceLen;
508 printUSeqErr(source, sourceLen);
520 static ETestConvertResult testConvertToU( const uint8_t *source, int sourcelen, const UChar *expect, int expectlen,
563 src = (const char *)source;
596 (UBool)(srcLimit == realSourceEnd), /* flush if we're at the end of the source data */
659 for(i=0; i<(src-(const char *)source); i++) {
660 log_err("%X,", (unsigned char)source[i]);
1677 const char* source = NULL;
1681 source = data[i];
1682 enc = ucnv_detectUnicodeSignature(source, -1 , &signatureLength, &err);
1684 log_err("ucnv_detectUnicodeSignature failed for source : %s at index :%i. Error: %s\n", source,i,u_errorName(err));
1688 log_err("ucnv_detectUnicodeSignature failed for source : %s at index :%i. Expected: %s. Got: %s\n",source,i,expected[i],enc);
1692 log_err("ucnv_detectUnicodeSignature failed for source : %s at index :%i.Expected Length: %i. Got length: %i\n",source,i,signatureLength,expectedLength[i]);
1790 const char* source = NULL;
1794 source = data[i];
1796 enc = ucnv_detectUnicodeSignature(source, sourceLength , &signatureLength, &err);
1798 log_err("ucnv_detectUnicodeSignature test2 failed for source : %s at index :%i. Error: %s\n", source,i,u_errorName(err));
1803 log_err("ucnv_detectUnicodeSignature test2 failed for source : %s at index :%i. Expected: %s. Got: %s\n",source,i,expected[i],enc);
1808 log_err("ucnv_detectUnicodeSignature test2 failed for source : %s at index :%i.Expected Length: %i. Got length: %i\n",source,i,signatureLength,expectedLength[i]);
1840 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
1847 TestNextUChar(cnv, source, limit, results, "UTF-7");
1848 /* Test the condition when source >= sourceLimit */
1849 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
1883 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
1890 TestNextUChar(cnv, source, limit, results, "IMAP-mailbox-name");
1891 /* Test the condition when source >= sourceLimit */
1892 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
1945 const char *source=(const char *)in,*limit=(const char *)in+sizeof(in);
1952 TestNextUChar(cnv, source, limit, results, "UTF-8");
1953 /* Test the condition when source >= sourceLimit */
1954 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
1958 source=(const char *)in2;
1960 TestNextUChar(cnv, source, limit, results2, "UTF-8");
2016 const char *source=(const char *)in,*limit=(const char *)in+sizeof(in);
2023 TestNextUChar(cnv, source, limit, results, "CESU-8");
2024 /* Test the condition when source >= sourceLimit */
2025 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2029 source=(const char *)in2;
2031 TestNextUChar(cnv, source, limit, results2, "CESU-8");
2067 const char *source, *limit;
2076 source=(const char *)in1, limit=(const char *)in1+sizeof(in1);
2077 TestNextUChar(cnv, source, limit, results1, "UTF-16");
2079 source=(const char *)in2, limit=(const char *)in2+sizeof(in2);
2081 TestNextUChar(cnv, source, limit, results2, "UTF-16");
2083 source=(const char *)in3, limit=(const char *)in3+sizeof(in3);
2085 TestNextUChar(cnv, source, limit, results3, "UTF-16");
2087 /* Test the condition when source >= sourceLimit */
2089 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2116 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
2123 TestNextUChar(cnv, source, limit, results, "UTF-16BE");
2124 /* Test the condition when source >= sourceLimit */
2125 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2170 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
2177 TestNextUChar(cnv, source, limit, results, "UTF-16LE");
2178 /* Test the condition when source >= sourceLimit */
2179 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2235 const char *source, *limit;
2244 source=(const char *)in1, limit=(const char *)in1+sizeof(in1);
2245 TestNextUChar(cnv, source, limit, results1, "UTF-32");
2247 source=(const char *)in2, limit=(const char *)in2+sizeof(in2);
2249 TestNextUChar(cnv, source, limit, results2, "UTF-32");
2251 source=(const char *)in3, limit=(const char *)in3+sizeof(in3);
2253 TestNextUChar(cnv, source, limit, results3, "UTF-32");
2255 /* Test the condition when source >= sourceLimit */
2257 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2312 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
2319 TestNextUChar(cnv, source, limit, results, "UTF-32BE");
2321 /* Test the condition when source >= sourceLimit */
2322 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2326 source=(const char *)in2;
2328 TestNextUChar(cnv, source, limit, results2, "UTF-32BE");
2383 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
2390 TestNextUChar(cnv, source, limit, results, "UTF-32LE");
2392 /* Test the condition when source >= sourceLimit */
2393 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2397 source=(const char *)in2;
2399 TestNextUChar(cnv, source, limit, results2, "UTF-32LE");
2514 const char *source=(const char *)in;
2523 TestNextUChar(cnv, source, limit, results, "LATIN_1");
2524 /* Test the condition when source >= sourceLimit */
2525 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2547 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
2554 TestNextUChar(cnv, source, limit, results, "SBCS(x-mac-turkish)");
2555 /* Test the condition when source >= sourceLimit */
2556 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2561 TestNextUCharError(cnv, illegalsource, illegalsource+sizeof(illegalsource), U_INVALID_CHAR_FOUND, "source has a illegal character");
2589 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
2597 TestNextUChar(cnv, source, limit, results, "DBCS(@ibm9027)");
2598 /* Test the condition when source >= sourceLimit */
2599 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2640 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
2648 TestNextUChar(cnv, source, limit, results, "MBCS(ibm-1363)");
2649 /* Test the condition when source >= sourceLimit */
2650 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2675 const char *source = sourceData;
2689 ucnv_toUnicode(cnv, &target, targetLim, &source, sourceLim, NULL, true, &status);
2691 log_info("After convert: target@%d, source@%d, status%s\n",
2692 target-targetBuf, source-sourceData, u_errorName(status));
2702 c1=ucnv_getNextUChar(cnv, &source, sourceLim, &status);
2703 log_verbose("c1: U+%04X, source@%d, status %s\n", c1, source-sourceData, u_errorName(status));
2705 c2=ucnv_getNextUChar(cnv, &source, sourceLim, &status);
2706 log_verbose("c2: U+%04X, source@%d, status %s\n", c2, source-sourceData, u_errorName(status));
2708 c3=ucnv_getNextUChar(cnv, &source, sourceLim, &status);
2709 log_verbose("c3: U+%04X, source@%d, status %s\n", c3, source-sourceData, u_errorName(status));
2750 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
2759 TestNextUChar(cnv, source, limit, results, "ISO_2022");
2761 /* Test the condition when source >= sourceLimit */
2762 TestNextUCharError(cnv, source, source-1, U_ILLEGAL_ARGUMENT_ERROR, "sourceLimit < source");
2763 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
2781 TestSmallTargetBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){
2800 uSource = (UChar*) source;
2838 uSource = source;
2840 for(len=0;len<(int)(source - sourceLimit);len++){
2850 static void TestToAndFromUChars(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){
2865 uSource = source;
2884 uSource = source;
2897 static void TestSmallSourceBuffer(const uint16_t* source, const UChar* sourceLimit,UConverter* cnv){
2918 uSource = (UChar*) source;
2960 uSource = source;
2962 for(;len<(int)(source - sourceLimit);len++){
2972 TestGetNextUChar2022(UConverter* cnv, const char* source, const char* limit,
2975 const char* s=(char*)source;
3009 const UChar*source = in;
3026 &source,
3027 source+3,
3053 &source,
3054 source,
3794 char source[] = { 0x1b,0x24,0x42,0x3d,0x45,0x1b,0x28,0x4a,0x0d,0x0a,
3805 const char* csource=source;
3814 ucnv_toUnicode(conv,&utarget,utargetLimit,&csource,csource+sizeof(source),NULL,true,&err);
4184 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"
4196 ucnv_toUnicode(kr,&target,targetLimit,&source,source+uprv_strlen(source),NULL,true,&errorCode);
4208 ucnv_toUnicode(kr,&target,targetLimit,&source,source+uprv_strlen(source),NULL,true,&errorCode);
4699 const char *source=(const char *)in, *limit=(const char *)in+sizeof(in);
4706 TestNextUChar(cnv, source, limit, results, "EBCDIC_STATEFUL(ibm-930)");
4708 /* Test the condition when source >= sourceLimit */
4709 TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source");
4711 /*Test for the condition where source > sourcelimit after consuming the shift character */
4723 source=(const char*)in2;
4725 TestNextUChar(cnv,source,limit,results2,"EBCDIC_STATEFUL(ibm-930),seq#2");
4775 /* const char *source=(const char *)in,*limit=(const char *)in+sizeof(in); */
4990 const char *source=(const char *)pszLMBCS;
5006 while(source<limit) {
5007 sourceStart=source;
5008 uniChar=ucnv_getNextUChar(cnv, &source, source + (off[1] - off[0]), &errorCode);
5012 } else if(source-sourceStart != off[1] - off[0] || uniChar != *results) {
5014 uniChar, (source-sourceStart), *results, *off);
5108 /* Small source buffer testing, LMBCS -> Unicode */
5178 /* negative source request should always return U_ILLEGAL_ARGUMENT_ERROR */
5183 log_err("Unexpected Error on negative source request to ucnv_fromUnicode: %s\n", u_errorName(errorCode));
5191 log_err("Unexpected Error on negative source request to ucnv_toUnicode: %s\n", u_errorName(errorCode));
5198 log_err("Unexpected Error on negative source request to ucnv_getNextUChar: %s\n", u_errorName(errorCode));
5202 /* 0 byte source request - no error, no pointer movement */
5206 log_err("0 byte source request: unexpected error: %s\n", u_errorName(errorCode));
5210 log_err("Unexpected pointer move in 0 byte source request \n");
5212 /*0 byte source request - GetNextUChar : error & value == fffe or ffff */
5216 log_err("Unexpected Error on 0-byte source request to ucnv_getnextUChar: %s\n", u_errorName(errorCode));
5220 log_err("Unexpected value on 0-byte source request to ucnv_getnextUChar \n");
5519 const char* source = data;
5529 ucnv_toUnicode(conv, &target, targetLimit, &source, sourceLimit, NULL, true, &status);
5572 const char* source = data;
5575 ucnv_toUnicode(conv, &target, targetLimit, &source, sourceLimit, NULL, true, &status);