| OLD | NEW |
| 1 /******************************************************************** | 1 /******************************************************************** |
| 2 * COPYRIGHT: | 2 * COPYRIGHT: |
| 3 * Copyright (c) 2005-2012, International Business Machines Corporation and | 3 * Copyright (c) 2005-2014, International Business Machines Corporation and |
| 4 * others. All Rights Reserved. | 4 * others. All Rights Reserved. |
| 5 ********************************************************************/ | 5 ********************************************************************/ |
| 6 /************************************************************************ | 6 /************************************************************************ |
| 7 * Tests for the UText and UTextIterator text abstraction classses | 7 * Tests for the UText and UTextIterator text abstraction classses |
| 8 * | 8 * |
| 9 ************************************************************************/ | 9 ************************************************************************/ |
| 10 | 10 |
| 11 | 11 |
| 12 #ifndef UTXTTEST_H | 12 #ifndef UTXTTEST_H |
| 13 #define UTXTTEST_H | 13 #define UTXTTEST_H |
| (...skipping 12 matching lines...) Expand all Loading... |
| 26 public: | 26 public: |
| 27 UTextTest(); | 27 UTextTest(); |
| 28 virtual ~UTextTest(); | 28 virtual ~UTextTest(); |
| 29 | 29 |
| 30 void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=
NULL); | 30 void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=
NULL); |
| 31 void TextTest(); | 31 void TextTest(); |
| 32 void ErrorTest(); | 32 void ErrorTest(); |
| 33 void FreezeTest(); | 33 void FreezeTest(); |
| 34 void Ticket5560(); | 34 void Ticket5560(); |
| 35 void Ticket6847(); | 35 void Ticket6847(); |
| 36 void Ticket10562(); |
| 37 void Ticket10983(); |
| 36 | 38 |
| 37 private: | 39 private: |
| 38 struct m { // Map between native indices & code
points. | 40 struct m { // Map between native indices & code
points. |
| 39 int nativeIdx; | 41 int nativeIdx; |
| 40 UChar32 cp; | 42 UChar32 cp; |
| 41 }; | 43 }; |
| 42 | 44 |
| 43 void TestString(const UnicodeString &s); | 45 void TestString(const UnicodeString &s); |
| 44 void TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *cpMap); | 46 void TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *cpMap); |
| 45 void TestAccessNoClone(const UnicodeString &us, UText *ut, int cpCount, m *c
pMap); | 47 void TestAccessNoClone(const UnicodeString &us, UText *ut, int cpCount, m *c
pMap); |
| 46 void TestCMR (const UnicodeString &us, UText *ut, int cpCount, m *nativeMa
p, m *utf16Map); | 48 void TestCMR (const UnicodeString &us, UText *ut, int cpCount, m *nativeMa
p, m *utf16Map); |
| 47 void TestCopyMove(const UnicodeString &us, UText *ut, UBool move, | 49 void TestCopyMove(const UnicodeString &us, UText *ut, UBool move, |
| 48 int32_t nativeStart, int32_t nativeLimit, int32_t nativeDe
st, | 50 int32_t nativeStart, int32_t nativeLimit, int32_t nativeDe
st, |
| 49 int32_t u16Start, int32_t u16Limit, int32_t u16Dest); | 51 int32_t u16Start, int32_t u16Limit, int32_t u16Dest); |
| 50 void TestReplace(const UnicodeString &us, // reference UnicodeString in whi
ch to do the replace | 52 void TestReplace(const UnicodeString &us, // reference UnicodeString in whi
ch to do the replace |
| 51 UText *ut, // UnicodeText object under test. | 53 UText *ut, // UnicodeText object under test. |
| 52 int32_t nativeStart, // Range to be replaced, in UText
native units. | 54 int32_t nativeStart, // Range to be replaced, in UText
native units. |
| 53 int32_t nativeLimit, | 55 int32_t nativeLimit, |
| 54 int32_t u16Start, // Range to be replaced, in UTF-1
6 units | 56 int32_t u16Start, // Range to be replaced, in UTF-1
6 units |
| 55 int32_t u16Limit, // for use in the reference Un
icodeString. | 57 int32_t u16Limit, // for use in the reference Un
icodeString. |
| 56 const UnicodeString &repStr); // The replacement string | 58 const UnicodeString &repStr); // The replacement string |
| 57 | 59 |
| 58 | 60 |
| 59 }; | 61 }; |
| 60 | 62 |
| 61 | 63 |
| 62 #endif | 64 #endif |
| OLD | NEW |