Lines Matching full:utext
7 * Tests for the UText and UTextIterator text abstraction classses
16 #include <unicode/utext.h>
26 UText *openFragmentedUnicodeString(UText *ut, UnicodeString *s, UErrorCode *status);
79 // Top Level function for UText testing.
155 // TestString() Run a suite of UText tests on a string.
164 UText *ut = NULL;
288 // ut UText containing the same test text.
290 // nativeMap Mapping from code points to native indexes for the UText.
293 // This function runs a whole series of opertions on each incoming UText.
294 // The UText is deep-cloned prior to each operation, so that the original UText remains unchanged.
296 void UTextTest::TestCMR(const UnicodeString &us, UText *ut, int cpCount, m *nativeMap, m *u16Map) {
403 void UTextTest::TestCopyMove(const UnicodeString &us, UText *ut, UBool move,
408 UText *targetUT = NULL;
413 // clone the UText. The test will be run in the cloned copy
432 // Do the same operation in the UText under test
441 int64_t uti = 0; // UText position, native index.
444 UChar32 utc; // code point from UText
478 UText *ut, // UnicodeText object under test.
479 int32_t nativeStart, // Range to be replaced, in UText native units.
486 UText *targetUT = NULL;
491 // clone the target UText. The test will be run in the cloned copy
505 // Do the replace on the UText under test
517 int64_t uti = 0; // UText position, native index.
520 UChar32 utc; // code point from UText
546 // TestAccess Test the read only access functions on a UText, including cloning.
550 void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *cpMap) {
551 // Run the standard tests on the caller-supplied UText.
557 UText *shallowClone = utext_clone(NULL, ut, FALSE /*deep*/, FALSE /*readOnly*/, &status);
568 UText *deepClone = utext_clone(NULL, shallowClone, TRUE, FALSE, &status);
579 // TestAccessNoClone() Test the read only access functions on a UText.
583 void UTextTest::TestAccessNoClone(const UnicodeString &us, UText *ut, int cpCount, m *cpMap) {
588 // Check the length from the UText
845 // Close of an unitialized UText. Shouldn't blow up.
847 UText ut;
848 memset(&ut, 0, sizeof(UText));
853 // Double-close of a UText. Shouldn't blow up. UText should still be usable.
856 UText ut = UTEXT_INITIALIZER;
858 UText *ut2 = utext_openUnicodeString(&ut, &s, &status);
862 UText *ut3 = utext_close(&ut);
865 UText *ut4 = utext_close(&ut);
873 // Re-use of a UText, chaining through each of the types of UText
877 UText ut = UTEXT_INITIALIZER;
878 UText *utp;
911 UText ut = UTEXT_INITIALIZER;
935 UText *ut = NULL;
974 UText *uta = utext_openUnicodeString(NULL, &sa, &status);
980 UText *utb = utext_openUChars(NULL, sb, -1, &status);
1008 UText *ut = utext_openUTF8(NULL, u8str, -1, &status);
1081 UText *ut = utext_openUnicodeString(NULL, &u16str, &status);
1136 { // Similar test, with UText over Replaceable
1149 UText *ut = utext_openReplaceable(NULL, &u16str, &status);
1215 UText *ut = NULL;
1216 UText *ut2 = NULL;
1266 // Deep Clone of a frozen UText should re-enable writing in the copy.
1277 // Deep clone of a frozen UText, where the base type is intrinsically non-writable,
1295 // Fragmented UText
1296 // A UText type that works with a chunk size of 1.
1305 fragTextAccess(UText *ut, int64_t index, UBool forward) {
1348 UText *
1349 cloneFragmentedUnicodeString(UText *dest, const UText *src, UBool deep, UErrorCode *status) {
1365 UText *
1366 openFragmentedUnicodeString(UText *ut, UnicodeString *s, UErrorCode *status) {
1372 // Copy of the function table from the stock UnicodeString UText,
1386 // This is only an issue for UText types that work in a local buffer,
1390 // 1. Create an inital UText
1401 UText ut1 = UTEXT_INITIALIZER;
1402 UText ut2 = UTEXT_INITIALIZER;
1435 UText *ut = utext_openUChars(NULL, s, -1, &status);