]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/ustrtest.h
1 /********************************************************************
3 * Copyright (c) 1997-2012, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
7 #ifndef UNICODESTRINGTEST_H
8 #define UNICODESTRINGTEST_H
10 #include "unicode/unistr.h"
20 * Perform API and functionality tests for class UnicodeString
22 class UnicodeStringTest
: public IntlTest
{
24 UnicodeStringTest() {}
25 virtual ~UnicodeStringTest();
27 void runIndexedTest( int32_t index
, UBool exec
, const char* &name
, char* par
= NULL
);
30 * Test some basic methods (insert, remove, replace, ...)
32 void TestBasicManipulation(void);
34 * Test the methods for comparison
36 void TestCompare(void);
38 * Test the methods for extracting
40 void TestExtract(void);
42 * More extensively test methods for removing and replacing
44 void TestRemoveReplace(void);
46 * Test language specific case conversions
48 void TestSearching(void);
50 * Test methods for padding, trimmimg and truncating
52 void TestSpacePadding(void);
54 * Test methods startsWith and endsWith
56 void TestPrefixAndSuffix(void);
57 void TestStartsWithAndEndsWithNulTerminated();
59 * Test method findAndReplace
61 void TestFindAndReplace(void);
65 void TestReverse(void);
67 * Test a few miscellaneous methods (isBogus, hashCode,...)
69 void TestMiscellaneous(void);
71 * Test the functionality of allocating UnicodeStrings on the stack
73 void TestStackAllocation(void);
75 * Test the unescape() function.
77 void TestUnescape(void);
79 void _testUnicodeStringHasMoreChar32Than(const UnicodeString
&s
, int32_t start
, int32_t length
, int32_t number
);
80 void TestCountChar32();
82 void TestStringEnumeration();
86 void TestReadOnlyAlias();
87 void doTestAppendable(UnicodeString
&dest
, Appendable
&app
);
88 void TestAppendable();
89 void TestUnicodeStringImplementsAppendable();
90 void TestSizeofUnicodeString();
93 class StringCaseTest
: public IntlTest
{
96 virtual ~StringCaseTest();
98 void runIndexedTest(int32_t index
, UBool exec
, const char *&name
, char *par
=0);
100 void TestCaseConversion();
102 void TestCasingImpl(const UnicodeString
&input
,
103 const UnicodeString
&output
,
105 void *iter
, const char *localeID
, uint32_t options
);
107 void TestFullCaseFoldingIterator();