Lines Matching defs:middle
1194 int32_t i, pos1, pos2, middle, length;
1205 /* set into the middle */
1206 middle=length/2;
1208 pos1=iter1->move(iter1, middle, UITER_ZERO);
1209 if(pos1!=middle) {
1210 log_err("%s->move(from 0 to middle %d)=%d does not move to the middle\n", n1, middle, pos1);
1214 pos2=iter2->move(iter2, middle, UITER_ZERO);
1215 if(pos2!=middle) {
1216 log_err("%s->move(from 0 to middle %d)=%d does not move to the middle\n", n2, middle, pos2);
1224 log_err("%s->current()=U+%04x != U+%04x=%s->current() at middle=%d\n", n1, c1, c2, n2, middle);
1233 log_err("%s->next()=U+%04x != U+%04x=%s->next() at %d (started in middle)\n", n1, c1, c2, n2, iter1->getIndex(iter1, UITER_CURRENT));
1243 log_err("%s->previous()=U+%04x != U+%04x=%s->previous() at %d (started in middle)\n", n1, c1, c2, n2, iter1->getIndex(iter1, UITER_CURRENT));
1287 /* back to the middle */
1288 pos1=iter1->move(iter1, middle, UITER_ZERO);
1289 if(pos1!=middle) {
1290 log_err("%s->move(from end to middle %d)=%d does not move to the middle\n", n1, middle, pos1);
1294 pos2=iter2->move(iter2, middle, UITER_ZERO);
1295 if(pos2!=middle) {
1296 log_err("%s->move(from end to middle %d)=%d does not move to the middle\n", n2, middle, pos2);
1303 log_err("%s->move(from middle %d to 1)=%d does not move to 1\n", n1, middle, pos1);
1309 log_err("%s->move(from middle %d to 1)=%d does not move to 1\n", n2, middle, pos2);
1360 * It must be 2<=middle<=length-2.
1363 testIteratorState(UCharIterator *iter1, UCharIterator *iter2, const char *n, int32_t middle) {
1371 /* get four UChars from the middle of the string */
1372 iter1->move(iter1, middle-2, UITER_ZERO);
1377 log_err("test error: %s[%d]=%d\n", n, middle-2+i, c);
1383 /* move to the middle and get the state */
1397 log_err("%s->current(at %d)=U+%04x!=U+%04x\n", n, middle, c, u[2]);
1402 log_err("%s->previous(at %d)=U+%04x!=U+%04x\n", n, middle-1, c, u[1]);
1408 log_err("%s->next(at %d)=U+%04x!=U+%04x\n", n, middle+1, c, u[3]);
1414 log_err("%s->previous(at %d)=U+%04x!=U+%04x\n", n, middle-2, c, u[0]);
1417 /* move the second iterator back to the middle */
1421 /* check that both are in the middle */
1424 if(i!=middle) {
1425 log_err("%s->getIndex(current)=%d!=%d as expected\n", n, i, middle);
1546 int32_t middle) {
1560 /* set into the middle */
1561 iter1->move(iter1, middle, UITER_ZERO);
1562 iter2->move(iter2, middle, UITER_ZERO);
1568 log_err("%s->current()=U+%04x != U+%04x=%s->current() at middle=%d\n", n1, c1, c2, n2, middle);
1577 log_err("%s->next()=U+%04x != U+%04x=%s->next() at %d (started in middle)\n", n1, c1, c2, n2, iter1->getIndex(iter1, UITER_CURRENT));
1587 log_err("%s->previous()=U+%04x != U+%04x=%s->previous() at %d (started in middle)\n", n1, c1, c2, n2, iter1->getIndex(iter1, UITER_CURRENT));
1633 /* back to the middle */
1634 iter1->move(iter1, middle, UITER_ZERO);
1635 iter2->move(iter2, middle, UITER_ZERO);
1640 log_err("%s has no known state from middle=%d to the end\n", n2, middle);
1700 testUNormIteratorWithText(const UChar *text, int32_t textLength, int32_t middle,
1743 compareIterNoIndexes(&iter1, name1, iter, name2, middle);
1763 int32_t i, middle, length;
1770 middle=(int32_t)(u_strchr(text, 0x327)-text); /* see comment at text[] */
1771 memcpy(longText, text, middle*U_SIZEOF_UCHAR);
1773 longText[middle+i]=0x30a; /* insert many rings between 'A-ring' and cedilla */
1775 memcpy(longText+middle+i, text+middle, (LENGTHOF(text)-middle)*U_SIZEOF_UCHAR);