]> git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/ustrtest.h
ICU-6.2.4.tar.gz
[apple/icu.git] / icuSources / test / intltest / ustrtest.h
1 /********************************************************************
2 * COPYRIGHT:
3 * Copyright (c) 1997-2003, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
6
7 #ifndef UNICODESTRINGTEST_H
8 #define UNICODESTRINGTEST_H
9
10 #include "intltest.h"
11
12 /**
13 * Perform API and functionality tests for class UnicodeString
14 **/
15 class UnicodeStringTest: public IntlTest {
16 public:
17 UnicodeStringTest() {}
18 virtual ~UnicodeStringTest();
19
20 void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
21
22 /**
23 * Test some basic methods (insert, remove, replace, ...)
24 **/
25 void TestBasicManipulation(void);
26 /**
27 * Test the methods for comparison
28 **/
29 void TestCompare(void);
30 /**
31 * Test the methods for extracting
32 **/
33 void TestExtract(void);
34 /**
35 * More extensively test methods for removing and replacing
36 **/
37 void TestRemoveReplace(void);
38 /**
39 * Test language specific case conversions
40 **/
41 void TestSearching(void);
42 /**
43 * Test methods for padding, trimmimg and truncating
44 **/
45 void TestSpacePadding(void);
46 /**
47 * Test methods startsWith and endsWith
48 **/
49 void TestPrefixAndSuffix(void);
50 /**
51 * Test method findAndReplace
52 **/
53 void TestFindAndReplace(void);
54 /**
55 * Test method reverse
56 **/
57 void TestReverse(void);
58 /**
59 * Test a few miscellaneous methods (isBogus, hashCode,...)
60 **/
61 void TestMiscellaneous(void);
62 /**
63 * Test the functionality of allocating UnicodeStrings on the stack
64 **/
65 void TestStackAllocation(void);
66 /**
67 * Test the unescape() function.
68 */
69 void TestUnescape(void);
70
71 void _testUnicodeStringHasMoreChar32Than(const UnicodeString &s, int32_t start, int32_t length, int32_t number);
72 void TestCountChar32(void);
73 void TestBogus();
74 void TestStringEnumeration();
75 };
76
77 class StringCaseTest: public IntlTest {
78 public:
79 StringCaseTest() {}
80 virtual ~StringCaseTest();
81
82 void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
83
84 void TestCaseConversion();
85 #if !UCONFIG_NO_BREAK_ITERATION
86 void TestTitleCasing();
87 #endif
88 };
89
90 #endif