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