]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/ustrtest.h
1 /********************************************************************
3 * Copyright (c) 1997-2007, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
7 #ifndef UNICODESTRINGTEST_H
8 #define UNICODESTRINGTEST_H
10 #include "unicode/unistr.h"
14 * Perform API and functionality tests for class UnicodeString
16 class UnicodeStringTest
: public IntlTest
{
18 UnicodeStringTest() {}
19 virtual ~UnicodeStringTest();
21 void runIndexedTest( int32_t index
, UBool exec
, const char* &name
, char* par
= NULL
);
24 * Test some basic methods (insert, remove, replace, ...)
26 void TestBasicManipulation(void);
28 * Test the methods for comparison
30 void TestCompare(void);
32 * Test the methods for extracting
34 void TestExtract(void);
36 * More extensively test methods for removing and replacing
38 void TestRemoveReplace(void);
40 * Test language specific case conversions
42 void TestSearching(void);
44 * Test methods for padding, trimmimg and truncating
46 void TestSpacePadding(void);
48 * Test methods startsWith and endsWith
50 void TestPrefixAndSuffix(void);
52 * Test method findAndReplace
54 void TestFindAndReplace(void);
58 void TestReverse(void);
60 * Test a few miscellaneous methods (isBogus, hashCode,...)
62 void TestMiscellaneous(void);
64 * Test the functionality of allocating UnicodeStrings on the stack
66 void TestStackAllocation(void);
68 * Test the unescape() function.
70 void TestUnescape(void);
72 void _testUnicodeStringHasMoreChar32Than(const UnicodeString
&s
, int32_t start
, int32_t length
, int32_t number
);
73 void TestCountChar32(void);
75 void TestStringEnumeration();
76 void TestCharString(void);
77 void TestNameSpace(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 void *iter
, const char *localeID
, uint32_t options
);