Lines Matching defs:iter1
45 compareIterators(UCharIterator *iter1, const char *n1,
51 length=iter1->getIndex(iter1, UITER_LENGTH);
61 pos1=iter1->move(iter1, middle, UITER_ZERO);
74 c1=iter1->current(iter1);
83 c1=iter1->next(iter1);
86 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));
93 c1=iter1->previous(iter1);
96 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));
102 pos1=iter1->move(iter1, 0, UITER_START);
107 if(!iter1->hasNext(iter1)) {
123 c1=iter1->next(iter1);
126 log_err("%s->next()=U+%04x != U+%04x=%s->next() at %d\n", n1, c1, c2, n2, iter1->getIndex(iter1, UITER_CURRENT));
131 if(iter1->hasNext(iter1)) {
141 pos1=iter1->move(iter1, middle, UITER_ZERO);
154 pos1=iter1->move(iter1, 1, UITER_ZERO);
167 pos1=iter1->move(iter1, 0, UITER_LIMIT);
172 if(!iter1->hasPrevious(iter1)) {
188 c1=iter1->previous(iter1);
191 log_err("%s->previous()=U+%04x != U+%04x=%s->previous() at %d\n", n1, c1, c2, n2, iter1->getIndex(iter1, UITER_CURRENT));
196 if(iter1->hasPrevious(iter1)) {
208 * iter1 and iter2 must be set up for the same iterator type and the same string
216 testIteratorState(UCharIterator *iter1, UCharIterator *iter2, const char *n, int32_t middle) {
225 iter1->move(iter1, middle-2, UITER_ZERO);
227 c=iter1->next(iter1);
237 iter1->move(iter1, -2, UITER_CURRENT);
238 state=uiter_getState(iter1);
275 i=iter1->getIndex(iter1, UITER_CURRENT);
285 i=iter1->getIndex(iter1, UITER_LENGTH);
307 UCharIterator iter1, iter2;
314 uiter_setString(&iter1, text, -1);
316 compareIterators(&iter1, "UTF16Iterator", &iter2, "Lenient8Iterator");
320 compareIterators(&iter1, "UTF16Iterator", &iter2, "Lenient8Iterator_1");
324 uiter_setLenient8(&iter1, (const char*)bytes, -1);
325 testIteratorState(&iter1, &iter2, "Lenient8IteratorState", length/2);
326 testIteratorState(&iter1, &iter2, "Lenient8IteratorStatePlus1", length/2+1);
333 uiter_setString(&iter1, text, -1);
334 iter1.move(&iter1, 0, UITER_START);
337 c1=iter1.next(&iter1);