]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/intltest/ustrtest.h
ICU-66108.tar.gz
[apple/icu.git] / icuSources / test / intltest / ustrtest.h
CommitLineData
f3c0d7a5
A
1// © 2016 and later: Unicode, Inc. and others.
2// License & terms of use: http://www.unicode.org/copyright.html
b75a7d8f
A
3/********************************************************************
4 * COPYRIGHT:
2ca993e8 5 * Copyright (c) 1997-2015, International Business Machines Corporation and
b75a7d8f
A
6 * others. All Rights Reserved.
7 ********************************************************************/
8
9#ifndef UNICODESTRINGTEST_H
10#define UNICODESTRINGTEST_H
11
f3c0d7a5 12#include "unicode/locid.h"
73c04bcf 13#include "unicode/unistr.h"
b75a7d8f
A
14#include "intltest.h"
15
4388f060
A
16U_NAMESPACE_BEGIN
17
18class Appendable;
19
20U_NAMESPACE_END
21
b75a7d8f
A
22/**
23 * Perform API and functionality tests for class UnicodeString
24 **/
25class UnicodeStringTest: public IntlTest {
26public:
27 UnicodeStringTest() {}
374ca955 28 virtual ~UnicodeStringTest();
b75a7d8f
A
29
30 void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
31
32 /**
33 * Test some basic methods (insert, remove, replace, ...)
34 **/
35 void TestBasicManipulation(void);
36 /**
37 * Test the methods for comparison
38 **/
39 void TestCompare(void);
40 /**
41 * Test the methods for extracting
42 **/
43 void TestExtract(void);
44 /**
45 * More extensively test methods for removing and replacing
46 **/
47 void TestRemoveReplace(void);
48 /**
49 * Test language specific case conversions
50 **/
51 void TestSearching(void);
52 /**
53 * Test methods for padding, trimmimg and truncating
54 **/
55 void TestSpacePadding(void);
56 /**
57 * Test methods startsWith and endsWith
58 **/
59 void TestPrefixAndSuffix(void);
4388f060 60 void TestStartsWithAndEndsWithNulTerminated();
b75a7d8f
A
61 /**
62 * Test method findAndReplace
63 **/
64 void TestFindAndReplace(void);
65 /**
66 * Test method reverse
67 **/
68 void TestReverse(void);
69 /**
70 * Test a few miscellaneous methods (isBogus, hashCode,...)
71 **/
72 void TestMiscellaneous(void);
73 /**
74 * Test the functionality of allocating UnicodeStrings on the stack
75 **/
76 void TestStackAllocation(void);
77 /**
78 * Test the unescape() function.
79 */
80 void TestUnescape(void);
81
82 void _testUnicodeStringHasMoreChar32Than(const UnicodeString &s, int32_t start, int32_t length, int32_t number);
4388f060 83 void TestCountChar32();
b75a7d8f 84 void TestBogus();
374ca955 85 void TestStringEnumeration();
4388f060
A
86 void TestNameSpace();
87 void TestUTF32();
88 void TestUTF8();
89 void TestReadOnlyAlias();
90 void doTestAppendable(UnicodeString &dest, Appendable &app);
91 void TestAppendable();
92 void TestUnicodeStringImplementsAppendable();
93 void TestSizeofUnicodeString();
2ca993e8 94 void TestMoveSwap();
73c04bcf 95
f3c0d7a5
A
96 void TestUInt16Pointers();
97 void TestWCharPointers();
98 void TestNullPointers();
3d1f044b 99 void TestUnicodeStringInsertAppendToSelf();
b75a7d8f
A
100};
101
102#endif