• Home
  • Raw
  • Download

Lines Matching refs:ut

29 UText *openFragmentedUnicodeString(UText *ut, UnicodeString *s, UErrorCode *status);
173 UText *ut = NULL; in TestString() local
199 ut = utext_openUChars(NULL, buf, -1, &status); in TestString()
201 TestAccess(sa, ut, cpCount, cpMap); in TestString()
202 utext_close(ut); in TestString()
210 ut = utext_openUChars(NULL, buf, saLen, &status); in TestString()
212 TestAccess(sa, ut, cpCount, cpMap); in TestString()
213 utext_close(ut); in TestString()
219 ut = utext_openUnicodeString(NULL, &sa, &status); in TestString()
221 TestAccess(sa, ut, cpCount, cpMap); in TestString()
222 TestCMR(sa, ut, cpCount, cpMap, cpMap); in TestString()
223 utext_close(ut); in TestString()
228 ut = utext_openConstUnicodeString(NULL, &sa, &status); in TestString()
230 TestAccess(sa, ut, cpCount, cpMap); in TestString()
231 utext_close(ut); in TestString()
236 ut = utext_openReplaceable(NULL, &sa, &status); in TestString()
238 TestAccess(sa, ut, cpCount, cpMap); in TestString()
239 TestCMR(sa, ut, cpCount, cpMap, cpMap); in TestString()
240 utext_close(ut); in TestString()
247 ut = utext_openCharacterIterator(NULL, ci, &status); in TestString()
249 TestAccess(sa, ut, cpCount, cpMap); in TestString()
250 utext_close(ut); in TestString()
257 ut = openFragmentedUnicodeString(NULL, &sa, &status); in TestString()
259 TestAccess(sa, ut, cpCount, cpMap); in TestString()
260 utext_close(ut); in TestString()
283 ut = utext_openUTF8(NULL, u8String, -1, &status); in TestString()
285 TestAccess(sa, ut, cpCount, u8Map); in TestString()
286 utext_close(ut); in TestString()
305 void UTextTest::TestCMR(const UnicodeString &us, UText *ut, int cpCount, m *nativeMap, m *u16Map) { in TestCMR() argument
306 TEST_ASSERT(utext_isWritable(ut) == TRUE); in TestCMR()
375 TestCopyMove(us, ut, FALSE, in TestCMR()
379 TestCopyMove(us, ut, TRUE, in TestCMR()
394 TestReplace(us, ut, in TestCMR()
412 void UTextTest::TestCopyMove(const UnicodeString &us, UText *ut, UBool move, in TestCopyMove() argument
425 targetUT = utext_clone(NULL, ut, TRUE, FALSE, &status); in TestCopyMove()
469 int64_t expectedNativeLength = utext_nativeLength(ut); in TestCopyMove()
487 UText *ut, // UnicodeText object under test. in TestReplace() argument
503 targetUT = utext_clone(NULL, ut, TRUE, FALSE, &status); in TestReplace()
546 expectedNativeLength = utext_nativeLength(ut) + expectedDelta; in TestReplace()
559 void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *cpMap) { in TestAccess() argument
561 TestAccessNoClone(us, ut, cpCount, cpMap); in TestAccess()
564 utext_setNativeIndex(ut, 0); in TestAccess()
566 UText *shallowClone = utext_clone(NULL, ut, FALSE /*deep*/, FALSE /*readOnly*/, &status); in TestAccess()
592 void UTextTest::TestAccessNoClone(const UnicodeString &us, UText *ut, int cpCount, m *cpMap) { in TestAccessNoClone() argument
600 int64_t utlen = utext_nativeLength(ut); in TestAccessNoClone()
617 foundIndex = utext_getNativeIndex(ut); in TestAccessNoClone()
620 foundC = utext_next32(ut); in TestAccessNoClone()
622 foundIndex = utext_getPreviousNativeIndex(ut); in TestAccessNoClone()
628 foundC = utext_next32(ut); in TestAccessNoClone()
632 utext_setNativeIndex(ut, 0); in TestAccessNoClone()
635 foundIndex = UTEXT_GETNATIVEINDEX(ut); in TestAccessNoClone()
638 foundC = UTEXT_NEXT32(ut); in TestAccessNoClone()
644 foundC = UTEXT_NEXT32(ut); in TestAccessNoClone()
651 len = utext_nativeLength(ut); in TestAccessNoClone()
652 foundIndex = utext_getNativeIndex(ut); in TestAccessNoClone()
658 len = utext_getNativeIndex(ut); in TestAccessNoClone()
659 utext_setNativeIndex(ut, len); in TestAccessNoClone()
663 int64_t prevIndex = utext_getPreviousNativeIndex(ut); in TestAccessNoClone()
664 foundC = utext_previous32(ut); in TestAccessNoClone()
665 foundIndex = utext_getNativeIndex(ut); in TestAccessNoClone()
678 foundIndex = utext_getNativeIndex(ut); in TestAccessNoClone()
680 foundIndex = utext_getPreviousNativeIndex(ut); in TestAccessNoClone()
684 foundC = utext_previous32(ut); in TestAccessNoClone()
686 foundIndex = utext_getNativeIndex(ut); in TestAccessNoClone()
688 foundIndex = utext_getPreviousNativeIndex(ut); in TestAccessNoClone()
693 utext_setNativeIndex(ut, len); in TestAccessNoClone()
697 foundC = UTEXT_PREVIOUS32(ut); in TestAccessNoClone()
698 foundIndex = UTEXT_GETNATIVEINDEX(ut); in TestAccessNoClone()
710 foundIndex = UTEXT_GETNATIVEINDEX(ut); in TestAccessNoClone()
713 foundC = UTEXT_PREVIOUS32(ut); in TestAccessNoClone()
715 foundIndex = UTEXT_GETNATIVEINDEX(ut); in TestAccessNoClone()
729 foundC = utext_next32From(ut, index); in TestAccessNoClone()
741 foundC = utext_previous32From(ut, index); in TestAccessNoClone()
754 utext_setNativeIndex(ut, 0); in TestAccessNoClone()
756 utext_moveIndex32(ut, 1); in TestAccessNoClone()
757 index = utext_getNativeIndex(ut); in TestAccessNoClone()
760 index = UTEXT_GETNATIVEINDEX(ut); in TestAccessNoClone()
765 utext_setNativeIndex(ut, 0); in TestAccessNoClone()
767 utext_moveIndex32(ut, 2); in TestAccessNoClone()
768 index = utext_getNativeIndex(ut); in TestAccessNoClone()
771 index = UTEXT_GETNATIVEINDEX(ut); in TestAccessNoClone()
777 utext_setNativeIndex(ut, i); in TestAccessNoClone()
780 index = utext_getNativeIndex(ut); in TestAccessNoClone()
782 index = UTEXT_GETNATIVEINDEX(ut); in TestAccessNoClone()
784 utext_moveIndex32(ut, -1); in TestAccessNoClone()
790 utext_setNativeIndex(ut, i); in TestAccessNoClone()
793 index = utext_getNativeIndex(ut); in TestAccessNoClone()
795 index = UTEXT_GETNATIVEINDEX(ut); in TestAccessNoClone()
797 utext_moveIndex32(ut, -3); in TestAccessNoClone()
808 len = utext_extract(ut, 0, utlen, buf, bufSize, &status); in TestAccessNoClone()
815 len = utext_extract(ut, 0, utlen, NULL, 0, &status); in TestAccessNoClone()
825 len = utext_extract(ut, 0, utlen, buf, 1, &status); in TestAccessNoClone()
854 UText ut; in ErrorTest() local
855 memset(&ut, 0, sizeof(UText)); in ErrorTest()
856 utext_close(&ut); in ErrorTest()
863 UText ut = UTEXT_INITIALIZER; in ErrorTest() local
865 UText *ut2 = utext_openUnicodeString(&ut, &s, &status); in ErrorTest()
867 TEST_ASSERT(ut2 == &ut); in ErrorTest()
869 UText *ut3 = utext_close(&ut); in ErrorTest()
870 TEST_ASSERT(ut3 == &ut); in ErrorTest()
872 UText *ut4 = utext_close(&ut); in ErrorTest()
873 TEST_ASSERT(ut4 == &ut); in ErrorTest()
875 utext_openUnicodeString(&ut, &s, &status); in ErrorTest()
877 utext_close(&ut); in ErrorTest()
884 UText ut = UTEXT_INITIALIZER; in ErrorTest() local
890 utp = utext_openUnicodeString(&ut, &s1, &status); in ErrorTest()
892 TEST_ASSERT(utp == &ut); in ErrorTest()
894 utp = utext_openConstUnicodeString(&ut, &s1, &status); in ErrorTest()
896 TEST_ASSERT(utp == &ut); in ErrorTest()
898 utp = utext_openUTF8(&ut, s3, -1, &status); in ErrorTest()
900 TEST_ASSERT(utp == &ut); in ErrorTest()
902 utp = utext_openUChars(&ut, s2, -1, &status); in ErrorTest()
904 TEST_ASSERT(utp == &ut); in ErrorTest()
906 utp = utext_close(&ut); in ErrorTest()
907 TEST_ASSERT(utp == &ut); in ErrorTest()
909 utp = utext_openUnicodeString(&ut, &s1, &status); in ErrorTest()
911 TEST_ASSERT(utp == &ut); in ErrorTest()
918 UText ut = UTEXT_INITIALIZER; in ErrorTest() local
920 utext_openUChars(&ut, NULL, 5, &status); in ErrorTest()
924 utext_openUChars(&ut, NULL, -1, &status); in ErrorTest()
928 utext_openUTF8(&ut, NULL, 4, &status); in ErrorTest()
932 utext_openUTF8(&ut, NULL, -1, &status); in ErrorTest()
942 UText *ut = NULL; in ErrorTest() local
946 ut = utext_openUTF8(NULL, badUTF8, -1, &status); in ErrorTest()
948 c = utext_char32At(ut, 1); in ErrorTest()
950 c = utext_char32At(ut, 3); in ErrorTest()
952 c = utext_char32At(ut, 5); in ErrorTest()
954 c = utext_char32At(ut, 6); in ErrorTest()
958 int n = utext_extract(ut, 0, 9, buf, 10, &status); in ErrorTest()
964 utext_close(ut); in ErrorTest()
1015 UText *ut = utext_openUTF8(NULL, u8str, -1, &status); in ErrorTest() local
1022 utext_setNativeIndex(ut, i); in ErrorTest()
1023 int64_t cpIndex = utext_getNativeIndex(ut); in ErrorTest()
1025 cpIndex = UTEXT_GETNATIVEINDEX(ut); in ErrorTest()
1031 UChar32 c32 = utext_char32At(ut, i); in ErrorTest()
1033 int64_t cpIndex = utext_getNativeIndex(ut); in ErrorTest()
1039 UChar32 c32 = utext_next32From(ut, i); in ErrorTest()
1041 int64_t cpIndex = utext_getNativeIndex(ut); in ErrorTest()
1048 UChar32 c32 = utext_previous32From(ut, i); in ErrorTest()
1050 int64_t cpIndex = utext_getNativeIndex(ut); in ErrorTest()
1060 int32_t extractedLen = utext_extract(ut, i, i+1, buf, 3, &status); in ErrorTest()
1071 utext_close(ut); in ErrorTest()
1088 UText *ut = utext_openUnicodeString(NULL, &u16str, &status); in ErrorTest() local
1094 utext_setNativeIndex(ut, i); in ErrorTest()
1095 int64_t cpIndex = utext_getNativeIndex(ut); in ErrorTest()
1101 UChar32 c32 = utext_char32At(ut, i); in ErrorTest()
1103 int64_t cpIndex = utext_getNativeIndex(ut); in ErrorTest()
1109 UChar32 c32 = utext_next32From(ut, i); in ErrorTest()
1111 int64_t cpIndex = utext_getNativeIndex(ut); in ErrorTest()
1117 UChar32 c32 = utext_previous32From(ut, i); in ErrorTest()
1119 int64_t cpIndex = utext_getNativeIndex(ut); in ErrorTest()
1129 int32_t extractedLen = utext_extract(ut, i, i+1, buf, 3, &status); in ErrorTest()
1140 utext_close(ut); in ErrorTest()
1156 UText *ut = utext_openReplaceable(NULL, &u16str, &status); in ErrorTest() local
1162 utext_setNativeIndex(ut, i); in ErrorTest()
1163 int64_t cpIndex = utext_getNativeIndex(ut); in ErrorTest()
1169 UChar32 c32 = utext_char32At(ut, i); in ErrorTest()
1171 int64_t cpIndex = utext_getNativeIndex(ut); in ErrorTest()
1177 UChar32 c32 = utext_next32From(ut, i); in ErrorTest()
1179 int64_t cpIndex = utext_getNativeIndex(ut); in ErrorTest()
1185 UChar32 c32 = utext_previous32From(ut, i); in ErrorTest()
1187 int64_t cpIndex = utext_getNativeIndex(ut); in ErrorTest()
1197 int32_t extractedLen = utext_extract(ut, i, i+1, buf, 3, &status); in ErrorTest()
1208 utext_close(ut); in ErrorTest()
1222 UText *ut = NULL; in FreezeTest() local
1225 ut = utext_openUTF8(ut, u8str, -1, &status); in FreezeTest()
1227 UBool writable = utext_isWritable(ut); in FreezeTest()
1229 utext_copy(ut, 1, 2, 0, TRUE, &status); in FreezeTest()
1233 ut = utext_openUChars(ut, u16str, -1, &status); in FreezeTest()
1235 writable = utext_isWritable(ut); in FreezeTest()
1237 utext_copy(ut, 1, 2, 0, TRUE, &status); in FreezeTest()
1241 ut = utext_openUnicodeString(ut, &ustr, &status); in FreezeTest()
1243 writable = utext_isWritable(ut); in FreezeTest()
1245 utext_freeze(ut); in FreezeTest()
1246 writable = utext_isWritable(ut); in FreezeTest()
1248 utext_copy(ut, 1, 2, 0, TRUE, &status); in FreezeTest()
1252 ut = utext_openUnicodeString(ut, &ustr, &status); in FreezeTest()
1254 ut2 = utext_clone(ut2, ut, FALSE, FALSE, &status); // clone with readonly = false in FreezeTest()
1258 ut2 = utext_clone(ut2, ut, FALSE, TRUE, &status); // clone with readonly = true in FreezeTest()
1266 ut = utext_openConstUnicodeString(ut, (const UnicodeString *)&ustr, &status); in FreezeTest()
1268 writable = utext_isWritable(ut); in FreezeTest()
1270 utext_copy(ut, 1, 2, 0, TRUE, &status); in FreezeTest()
1275 ut = utext_openUnicodeString(ut, &ustr, &status); in FreezeTest()
1277 utext_freeze(ut); in FreezeTest()
1278 ut2 = utext_clone(ut2, ut, TRUE, FALSE, &status); // deep clone in FreezeTest()
1287 ut = utext_openUChars(ut, u16str, -1, &status); in FreezeTest()
1289 utext_freeze(ut); in FreezeTest()
1290 ut2 = utext_clone(ut2, ut, TRUE, FALSE, &status); // deep clone in FreezeTest()
1296 utext_close(ut); in FreezeTest()
1312 fragTextAccess(UText *ut, int64_t index, UBool forward) { in fragTextAccess() argument
1313 const UnicodeString *us = (const UnicodeString *)ut->context; in fragTextAccess()
1318 ut->b = c | c<<16; in fragTextAccess()
1319 ut->chunkOffset = 0; in fragTextAccess()
1320 ut->chunkLength = 1; in fragTextAccess()
1321 ut->chunkNativeStart = index; in fragTextAccess()
1322 ut->chunkNativeLimit = index+1; in fragTextAccess()
1327 ut->b = c | c<<16; in fragTextAccess()
1328 ut->chunkOffset = 1; in fragTextAccess()
1329 ut->chunkLength = 1; in fragTextAccess()
1330 ut->chunkNativeStart = index-1; in fragTextAccess()
1331 ut->chunkNativeLimit = index; in fragTextAccess()
1334 ut->b = 0; in fragTextAccess()
1335 ut->chunkOffset = 0; in fragTextAccess()
1336 ut->chunkLength = 0; in fragTextAccess()
1338 ut->chunkNativeStart = 0; in fragTextAccess()
1339 ut->chunkNativeLimit = 0; in fragTextAccess()
1341 ut->chunkNativeStart = length; in fragTextAccess()
1342 ut->chunkNativeLimit = length; in fragTextAccess()
1373 openFragmentedUnicodeString(UText *ut, UnicodeString *s, UErrorCode *status) { in openFragmentedUnicodeString() argument
1374 ut = utext_openUnicodeString(ut, s, status); in openFragmentedUnicodeString()
1376 return ut; in openFragmentedUnicodeString()
1381 memcpy(&fragmentFuncs, ut->pFuncs, sizeof(fragmentFuncs)); in openFragmentedUnicodeString()
1384 ut->pFuncs = &fragmentFuncs; in openFragmentedUnicodeString()
1386 ut->chunkContents = (UChar *)&ut->b; in openFragmentedUnicodeString()
1387 ut->pFuncs->access(ut, 0, TRUE); in openFragmentedUnicodeString()
1388 return ut; in openFragmentedUnicodeString()
1442 UText *ut = utext_openUChars(NULL, s, -1, &status); in Ticket6847() local
1444 utext_setNativeIndex(ut, 0); in Ticket6847()
1447 int64_t nativeIndex = UTEXT_GETNATIVEINDEX(ut); in Ticket6847()
1449 while ((c = utext_next32(ut)) != U_SENTINEL) { in Ticket6847()
1456 nativeIndex = UTEXT_GETNATIVEINDEX(ut); in Ticket6847()
1460 nativeIndex = UTEXT_GETNATIVEINDEX(ut); in Ticket6847()
1462 utext_close(ut); in Ticket6847()
1500 UText *ut = utext_openConstUnicodeString(NULL, &s, &status); in Ticket10983() local
1504 UText *cloned = utext_clone(NULL, ut, TRUE, TRUE, &status); in Ticket10983()
1508 utext_close(ut); in Ticket10983()
1531 UText ut = UTEXT_INITIALIZER; in Ticket12130() local
1532 utext_openUChars(&ut, ustr, -1, &status); in Ticket12130()
1539 utext_extract(&ut, startIdx, endIdx, extractBuffer, UPRV_LENGTHOF(extractBuffer), &status); in Ticket12130()
1544 int64_t ni = utext_getNativeIndex(&ut); in Ticket12130()
1557 utext_close(&ut); in Ticket12130()
1562 utext_openUChars(&ut, ustr, str.length(), &status); in Ticket12130()
1566 utext_extract(&ut, startIdx, endIdx, extractBuffer, UPRV_LENGTHOF(extractBuffer), &status); in Ticket12130()
1571 int64_t ni = utext_getNativeIndex(&ut); in Ticket12130()
1584 utext_close(&ut); in Ticket12130()