]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/ustrtest.h
1 /********************************************************************
3 * Copyright (c) 1997-2005, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
7 #ifndef UNICODESTRINGTEST_H
8 #define UNICODESTRINGTEST_H
10 #include "unicode/unistr.h"
11 #include "unicode/ubrk.h"
15 * Perform API and functionality tests for class UnicodeString
17 class UnicodeStringTest
: public IntlTest
{
19 UnicodeStringTest() {}
20 virtual ~UnicodeStringTest();
22 void runIndexedTest( int32_t index
, UBool exec
, const char* &name
, char* par
= NULL
);
25 * Test some basic methods (insert, remove, replace, ...)
27 void TestBasicManipulation(void);
29 * Test the methods for comparison
31 void TestCompare(void);
33 * Test the methods for extracting
35 void TestExtract(void);
37 * More extensively test methods for removing and replacing
39 void TestRemoveReplace(void);
41 * Test language specific case conversions
43 void TestSearching(void);
45 * Test methods for padding, trimmimg and truncating
47 void TestSpacePadding(void);
49 * Test methods startsWith and endsWith
51 void TestPrefixAndSuffix(void);
53 * Test method findAndReplace
55 void TestFindAndReplace(void);
59 void TestReverse(void);
61 * Test a few miscellaneous methods (isBogus, hashCode,...)
63 void TestMiscellaneous(void);
65 * Test the functionality of allocating UnicodeStrings on the stack
67 void TestStackAllocation(void);
69 * Test the unescape() function.
71 void TestUnescape(void);
73 void _testUnicodeStringHasMoreChar32Than(const UnicodeString
&s
, int32_t start
, int32_t length
, int32_t number
);
74 void TestCountChar32(void);
76 void TestStringEnumeration();
77 void TestCharString(void);
80 class StringCaseTest
: public IntlTest
{
83 virtual ~StringCaseTest();
85 void runIndexedTest(int32_t index
, UBool exec
, const char *&name
, char *par
=0);
87 void TestCaseConversion();
89 void TestCasingImpl(const UnicodeString
&input
,
90 const UnicodeString
&output
,
92 const char *localeID
, uint32_t options
);
93 #if !UCONFIG_NO_BREAK_ITERATION
94 void TestTitleCasing(const UnicodeString
&input
,
95 const UnicodeString
&output
,
97 UBreakIterator
*iter
);