Lines Matching refs:offset
197 uint32_t offset=0; in TestGetChar() local
199 for(offset=0; offset<sizeof(input); offset++) { in TestGetChar()
200 if (offset < sizeof(input) - 1) { in TestGetChar()
201 UTF8_GET_CHAR_UNSAFE(input, offset, c); in TestGetChar()
203 …"ERROR: UTF8_GET_CHAR_UNSAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i], c); in TestGetChar()
207 U8_GET_UNSAFE(input, offset, c); in TestGetChar()
209 …og_err("ERROR: U8_GET_UNSAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i], c); in TestGetChar()
214 UTF8_GET_CHAR_SAFE(input, 0, offset, sizeof(input), c, FALSE); in TestGetChar()
217 …rr("ERROR: UTF8_GET_CHAR_SAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, expected, c); in TestGetChar()
220 U8_GET(input, 0, offset, sizeof(input), c); in TestGetChar()
223 … log_err("ERROR: U8_GET failed for offset=%ld. Expected:%lx Got:%lx\n", offset, expected, c); in TestGetChar()
226 U8_GET_OR_FFFD(input, 0, offset, sizeof(input), c); in TestGetChar()
229 …log_err("ERROR: U8_GET_OR_FFFD failed for offset=%ld. Expected:%lx Got:%lx\n", offset, expected, c… in TestGetChar()
232 UTF8_GET_CHAR_SAFE(input, 0, offset, sizeof(input), c, TRUE); in TestGetChar()
234 …UTF8_GET_CHAR_SAFE(strict) failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i+2], c); in TestGetChar()
285 uint32_t offset=0; in TestNextPrevChar() local
287 for(offset=0; offset<sizeof(input); offset++){ in TestNextPrevChar()
288 setOffset=offset; in TestNextPrevChar()
292 offset, movedOffset[i+1], setOffset); in TestNextPrevChar()
296 …rr("ERROR: UTF8_NEXT_CHAR_SAFE failed for input=%ld. Expected:%lx Got:%lx\n", offset, expected, c); in TestNextPrevChar()
299 setOffset=offset; in TestNextPrevChar()
303 offset, movedOffset[i+1], setOffset); in TestNextPrevChar()
307 … log_err("ERROR: U8_NEXT failed for input=%ld. Expected:%lx Got:%lx\n", offset, expected, c); in TestNextPrevChar()
310 setOffset=offset; in TestNextPrevChar()
314 offset, movedOffset[i+1], setOffset); in TestNextPrevChar()
318 …log_err("ERROR: U8_NEXT_OR_FFFD failed for input=%ld. Expected:%lx Got:%lx\n", offset, expected, c… in TestNextPrevChar()
321 setOffset=offset; in TestNextPrevChar()
325 offset, movedOffset[i+2], setOffset); in TestNextPrevChar()
328 …UTF8_NEXT_CHAR_SAFE(strict) failed for input=%ld. Expected:%lx Got:%lx\n", offset, result[i+2], c); in TestNextPrevChar()
335 for(offset=sizeof(input); offset > 0; --offset){ in TestNextPrevChar()
336 setOffset=offset; in TestNextPrevChar()
340 offset, movedOffset[i+4], setOffset); in TestNextPrevChar()
344 …rr("ERROR: UTF8_PREV_CHAR_SAFE failed for input=%ld. Expected:%lx Got:%lx\n", offset, expected, c); in TestNextPrevChar()
347 setOffset=offset; in TestNextPrevChar()
351 offset, movedOffset[i+4], setOffset); in TestNextPrevChar()
355 … log_err("ERROR: U8_PREV failed for input=%ld. Expected:%lx Got:%lx\n", offset, expected, c); in TestNextPrevChar()
358 setOffset=offset; in TestNextPrevChar()
362 offset, movedOffset[i+4], setOffset); in TestNextPrevChar()
366 …log_err("ERROR: U8_PREV_OR_FFFD failed for input=%ld. Expected:%lx Got:%lx\n", offset, expected, c… in TestNextPrevChar()
369 setOffset=offset; in TestNextPrevChar()
373 offset, movedOffset[i+5], setOffset); in TestNextPrevChar()
376 …UTF8_PREV_CHAR_SAFE(strict) failed for input=%ld. Expected:%lx Got:%lx\n", offset, result[i+5], c); in TestNextPrevChar()
527 uint32_t offset; in TestNextPrevCharUnsafe() local
528 for(i=0, offset=0; offset<sizeof(input); ++i) { in TestNextPrevCharUnsafe()
529 UTF8_NEXT_CHAR_UNSAFE(input, offset, c); in TestNextPrevCharUnsafe()
532 offset, codePoints[i], c); in TestNextPrevCharUnsafe()
535 for(i=0, offset=0; offset<sizeof(input); ++i) { in TestNextPrevCharUnsafe()
536 U8_NEXT_UNSAFE(input, offset, c); in TestNextPrevCharUnsafe()
539 offset, codePoints[i], c); in TestNextPrevCharUnsafe()
543 for(i=UPRV_LENGTHOF(codePoints)-1, offset=sizeof(input); offset > 0; --i){ in TestNextPrevCharUnsafe()
544 UTF8_PREV_CHAR_UNSAFE(input, offset, c); in TestNextPrevCharUnsafe()
547 offset, codePoints[i], c); in TestNextPrevCharUnsafe()
550 for(i=UPRV_LENGTHOF(codePoints)-1, offset=sizeof(input); offset > 0; --i){ in TestNextPrevCharUnsafe()
551 U8_PREV_UNSAFE(input, offset, c); in TestNextPrevCharUnsafe()
554 offset, codePoints[i], c); in TestNextPrevCharUnsafe()
659 int32_t offset; in TestFwdBackUnsafe() local
661 for(i=1, offset=0; offset<UPRV_LENGTHOF(input); ++i) { in TestFwdBackUnsafe()
662 UTF8_FWD_1_UNSAFE(input, offset); in TestFwdBackUnsafe()
663 if(offset != boundaries[i]){ in TestFwdBackUnsafe()
664 log_err("ERROR: UTF8_FWD_1_UNSAFE offset expected:%d, Got:%d\n", boundaries[i], offset); in TestFwdBackUnsafe()
667 for(i=1, offset=0; offset<UPRV_LENGTHOF(input); ++i) { in TestFwdBackUnsafe()
668 U8_FWD_1_UNSAFE(input, offset); in TestFwdBackUnsafe()
669 if(offset != boundaries[i]){ in TestFwdBackUnsafe()
670 log_err("ERROR: U8_FWD_1_UNSAFE offset expected:%d, Got:%d\n", boundaries[i], offset); in TestFwdBackUnsafe()
674 for(i=UPRV_LENGTHOF(boundaries)-2, offset=UPRV_LENGTHOF(input); offset>0; --i) { in TestFwdBackUnsafe()
675 UTF8_BACK_1_UNSAFE(input, offset); in TestFwdBackUnsafe()
676 if(offset != boundaries[i]){ in TestFwdBackUnsafe()
677 … log_err("ERROR: UTF8_BACK_1_UNSAFE offset expected:%d, Got:%d\n", boundaries[i], offset); in TestFwdBackUnsafe()
680 for(i=UPRV_LENGTHOF(boundaries)-2, offset=UPRV_LENGTHOF(input); offset>0; --i) { in TestFwdBackUnsafe()
681 U8_BACK_1_UNSAFE(input, offset); in TestFwdBackUnsafe()
682 if(offset != boundaries[i]){ in TestFwdBackUnsafe()
683 log_err("ERROR: U8_BACK_1_UNSAFE offset expected:%d, Got:%d\n", boundaries[i], offset); in TestFwdBackUnsafe()
688 offset=0; in TestFwdBackUnsafe()
689 UTF8_FWD_N_UNSAFE(input, offset, i); in TestFwdBackUnsafe()
690 if(offset != boundaries[i]) { in TestFwdBackUnsafe()
691 log_err("ERROR: UTF8_FWD_N_UNSAFE offset expected:%d, Got:%d\n", boundaries[i], offset); in TestFwdBackUnsafe()
695 offset=0; in TestFwdBackUnsafe()
696 U8_FWD_N_UNSAFE(input, offset, i); in TestFwdBackUnsafe()
697 if(offset != boundaries[i]) { in TestFwdBackUnsafe()
698 log_err("ERROR: U8_FWD_N_UNSAFE offset expected:%d, Got:%d\n", boundaries[i], offset); in TestFwdBackUnsafe()
704 offset=UPRV_LENGTHOF(input); in TestFwdBackUnsafe()
705 UTF8_BACK_N_UNSAFE(input, offset, i); in TestFwdBackUnsafe()
706 if(offset != boundaries[j]) { in TestFwdBackUnsafe()
707 … log_err("ERROR: UTF8_BACK_N_UNSAFE offset expected:%d, Got:%d\n", boundaries[j], offset); in TestFwdBackUnsafe()
712 offset=UPRV_LENGTHOF(input); in TestFwdBackUnsafe()
713 U8_BACK_N_UNSAFE(input, offset, i); in TestFwdBackUnsafe()
714 if(offset != boundaries[j]) { in TestFwdBackUnsafe()
715 log_err("ERROR: U8_BACK_N_UNSAFE offset expected:%d, Got:%d\n", boundaries[j], offset); in TestFwdBackUnsafe()
729 int32_t offset=0, setOffset=0; in TestSetChar() local
730 for(offset=0; offset<=UPRV_LENGTHOF(input); offset++){ in TestSetChar()
731 if (offset<UPRV_LENGTHOF(input)){ in TestSetChar()
732 setOffset=offset; in TestSetChar()
735 …UTF8_SET_CHAR_START_SAFE failed for offset=%ld. Expected:%ld Got:%ld\n", offset, start_safe[i], se… in TestSetChar()
738 setOffset=offset; in TestSetChar()
741 …("ERROR: U8_SET_CP_START failed for offset=%ld. Expected:%ld Got:%ld\n", offset, start_safe[i], se… in TestSetChar()
745 setOffset=offset; in TestSetChar()
748 …UTF8_SET_CHAR_LIMIT_SAFE failed for offset=%ld. Expected:%ld Got:%ld\n", offset, limit_safe[i], se… in TestSetChar()
751 setOffset=offset; in TestSetChar()
754 …log_err("ERROR: U8_SET_CP_LIMIT failed for offset=%ld. Expected:%ld Got:%ld\n", offset, limit_safe… in TestSetChar()
770 int32_t offset=0, setOffset=0; in TestSetCharUnsafe() local
771 for(offset=0; offset<=UPRV_LENGTHOF(input); offset++){ in TestSetCharUnsafe()
772 if (offset<UPRV_LENGTHOF(input)){ in TestSetCharUnsafe()
773 setOffset=offset; in TestSetCharUnsafe()
776 …F8_SET_CHAR_START_UNSAFE failed for offset=%ld. Expected:%ld Got:%ld\n", offset, start_unsafe[i], … in TestSetCharUnsafe()
779 setOffset=offset; in TestSetCharUnsafe()
782 …: U8_SET_CP_START_UNSAFE failed for offset=%ld. Expected:%ld Got:%ld\n", offset, start_unsafe[i], … in TestSetCharUnsafe()
786 if (offset != 0) { /* Can't have it go off the end of the array */ in TestSetCharUnsafe()
787 setOffset=offset; in TestSetCharUnsafe()
790 …F8_SET_CHAR_LIMIT_UNSAFE failed for offset=%ld. Expected:%ld Got:%ld\n", offset, limit_unsafe[i], … in TestSetCharUnsafe()
793 setOffset=offset; in TestSetCharUnsafe()
796 …: U8_SET_CP_LIMIT_UNSAFE failed for offset=%ld. Expected:%ld Got:%ld\n", offset, limit_unsafe[i], … in TestSetCharUnsafe()
910 uint32_t offset; in TestAppendChar() local
915 offset=test[i]; in TestAppendChar()
917 UTF8_APPEND_CHAR_UNSAFE(str, offset, test[i+1]); in TestAppendChar()
918 if(offset != movedOffset[count]){ in TestAppendChar()
920 count, movedOffset[count], offset); in TestAppendChar()
931 UTF8_APPEND_CHAR_SAFE(str, offset, size, test[i+1]); in TestAppendChar()
932 if(offset != movedOffset[count]){ in TestAppendChar()
934 count, movedOffset[count], offset); in TestAppendChar()