]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/utxttest.h
1 /********************************************************************
3 * Copyright (c) 2005-2014, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
6 /************************************************************************
7 * Tests for the UText and UTextIterator text abstraction classses
9 ************************************************************************/
15 #include "unicode/utypes.h"
16 #include "unicode/unistr.h"
17 #include "unicode/utext.h"
23 * @summary Testing the Replaceable class
25 class UTextTest
: public IntlTest
{
30 void runIndexedTest(int32_t index
, UBool exec
, const char* &name
, char* par
=NULL
);
40 struct m
{ // Map between native indices & code points.
45 void TestString(const UnicodeString
&s
);
46 void TestAccess(const UnicodeString
&us
, UText
*ut
, int cpCount
, m
*cpMap
);
47 void TestAccessNoClone(const UnicodeString
&us
, UText
*ut
, int cpCount
, m
*cpMap
);
48 void TestCMR (const UnicodeString
&us
, UText
*ut
, int cpCount
, m
*nativeMap
, m
*utf16Map
);
49 void TestCopyMove(const UnicodeString
&us
, UText
*ut
, UBool move
,
50 int32_t nativeStart
, int32_t nativeLimit
, int32_t nativeDest
,
51 int32_t u16Start
, int32_t u16Limit
, int32_t u16Dest
);
52 void TestReplace(const UnicodeString
&us
, // reference UnicodeString in which to do the replace
53 UText
*ut
, // UnicodeText object under test.
54 int32_t nativeStart
, // Range to be replaced, in UText native units.
56 int32_t u16Start
, // Range to be replaced, in UTF-16 units
57 int32_t u16Limit
, // for use in the reference UnicodeString.
58 const UnicodeString
&repStr
); // The replacement string