X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/f3c0d7a59d99c2a94c6b8822291f0e42be3773c9..0f5d89e82340278ed3d7d50029f37cab2c41a57e:/icuSources/test/intltest/citrtest.cpp?ds=sidebyside diff --git a/icuSources/test/intltest/citrtest.cpp b/icuSources/test/intltest/citrtest.cpp index 233f82b9..84a2b69e 100644 --- a/icuSources/test/intltest/citrtest.cpp +++ b/icuSources/test/intltest/citrtest.cpp @@ -611,7 +611,7 @@ void CharIterTest::TestIterationUChar32() { errln("setIndex32() isn't working right"); if (c != CharacterIterator::DONE) { c = iter.next32(); - i=UTF16_NEED_MULTIPLE_UCHAR(c) ? i+2 : i+1; + i += U16_LENGTH(c); } } while (c != CharacterIterator::DONE); if(iter.hasNext() == TRUE) @@ -650,7 +650,7 @@ void CharIterTest::TestIterationUChar32() { errln("getIndex() isn't working right"); if (c != CharacterIterator::DONE) { c = iter.previous32(); - i=UTF16_NEED_MULTIPLE_UCHAR(c) ? i-2 : i-1; + i -= U16_LENGTH(c); } } while (c != CharacterIterator::DONE); if(iter.hasPrevious() == TRUE) @@ -684,7 +684,7 @@ void CharIterTest::TestIterationUChar32() { if(c != text.char32At(i)) errln("Character mismatch at position %d, iterator has %X, string has %X", i, c, text.char32At(i)); - i=UTF16_NEED_MULTIPLE_UCHAR(c) ? i+2 : i+1; + i += U16_LENGTH(c); if(iter.getIndex() != i) errln("getIndex() aftr next32PostInc() isn't working right"); if(iter.current32() != text.char32At(i)) @@ -725,7 +725,7 @@ void CharIterTest::TestIterationUChar32() { if (c != CharacterIterator::DONE) { c = iter.next32(); - i=UTF16_NEED_MULTIPLE_UCHAR(c) ? i+2 : i+1; + i += U16_LENGTH(c); } } while (c != CharacterIterator::DONE); c=iter.next32(); @@ -753,7 +753,7 @@ void CharIterTest::TestIterationUChar32() { if (c != CharacterIterator::DONE) { c = iter.previous32(); - i=UTF16_NEED_MULTIPLE_UCHAR(c) ? i-2 : i-1; + i -= U16_LENGTH(c); } } while (c != CharacterIterator::DONE);