Lines Matching defs:boundaries
378 * Use a (mostly) well-formed UTF-8 string and test at code point boundaries.
520 * Use a (mostly) well-formed UTF-8 string and test at code point boundaries.
532 static const int8_t boundaries[]={ 0, 1, 5, 7, 10, 12, 16, 17 };
538 if(offset != boundaries[i]){
539 log_err("ERROR: UTF8_FWD_1_UNSAFE offset expected:%d, Got:%d\n", boundaries[i], offset);
544 if(offset != boundaries[i]){
545 log_err("ERROR: U8_FWD_1_UNSAFE offset expected:%d, Got:%d\n", boundaries[i], offset);
549 for(i=LENGTHOF(boundaries)-2, offset=LENGTHOF(input); offset>0; --i) {
551 if(offset != boundaries[i]){
552 log_err("ERROR: UTF8_BACK_1_UNSAFE offset expected:%d, Got:%d\n", boundaries[i], offset);
555 for(i=LENGTHOF(boundaries)-2, offset=LENGTHOF(input); offset>0; --i) {
557 if(offset != boundaries[i]){
558 log_err("ERROR: U8_BACK_1_UNSAFE offset expected:%d, Got:%d\n", boundaries[i], offset);
562 for(i=0; i<LENGTHOF(boundaries); ++i) {
565 if(offset != boundaries[i]) {
566 log_err("ERROR: UTF8_FWD_N_UNSAFE offset expected:%d, Got:%d\n", boundaries[i], offset);
569 for(i=0; i<LENGTHOF(boundaries); ++i) {
572 if(offset != boundaries[i]) {
573 log_err("ERROR: U8_FWD_N_UNSAFE offset expected:%d, Got:%d\n", boundaries[i], offset);
577 for(i=0; i<LENGTHOF(boundaries); ++i) {
578 int32_t j=LENGTHOF(boundaries)-1-i;
581 if(offset != boundaries[j]) {
582 log_err("ERROR: UTF8_BACK_N_UNSAFE offset expected:%d, Got:%d\n", boundaries[j], offset);
585 for(i=0; i<LENGTHOF(boundaries); ++i) {
586 int32_t j=LENGTHOF(boundaries)-1-i;
589 if(offset != boundaries[j]) {
590 log_err("ERROR: U8_BACK_N_UNSAFE offset expected:%d, Got:%d\n", boundaries[j], offset);