2000-01-15 02:00:06 +00:00
|
|
|
/********************************************************************
|
|
|
|
* COPYRIGHT:
|
2002-03-13 19:21:27 +00:00
|
|
|
* Copyright (c) 1997-2002, International Business Machines Corporation and
|
2000-01-15 02:00:06 +00:00
|
|
|
* others. All Rights Reserved.
|
|
|
|
********************************************************************/
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2001-08-31 18:02:09 +00:00
|
|
|
#ifndef UNICODESTRINGTEST_H
|
|
|
|
#define UNICODESTRINGTEST_H
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
#include "intltest.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Perform API and functionality tests for class UnicodeString
|
|
|
|
**/
|
|
|
|
class UnicodeStringTest: public IntlTest {
|
|
|
|
public:
|
2002-03-13 19:21:27 +00:00
|
|
|
UnicodeStringTest() {}
|
|
|
|
virtual ~UnicodeStringTest() {}
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2000-08-14 21:42:36 +00:00
|
|
|
void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Test some basic methods (insert, remove, replace, ...)
|
|
|
|
**/
|
|
|
|
void TestBasicManipulation(void);
|
|
|
|
/**
|
|
|
|
* Test the methods for comparison
|
|
|
|
**/
|
|
|
|
void TestCompare(void);
|
|
|
|
/**
|
|
|
|
* Test the methods for extracting
|
|
|
|
**/
|
|
|
|
void TestExtract(void);
|
|
|
|
/**
|
|
|
|
* More extensively test methods for removing and replacing
|
|
|
|
**/
|
|
|
|
void TestRemoveReplace(void);
|
|
|
|
/**
|
|
|
|
* Test language specific case conversions
|
|
|
|
**/
|
|
|
|
void TestSearching(void);
|
|
|
|
/**
|
|
|
|
* Test methods for padding, trimmimg and truncating
|
|
|
|
**/
|
|
|
|
void TestSpacePadding(void);
|
|
|
|
/**
|
|
|
|
* Test methods startsWith and endsWith
|
|
|
|
**/
|
|
|
|
void TestPrefixAndSuffix(void);
|
|
|
|
/**
|
|
|
|
* Test method findAndReplace
|
|
|
|
**/
|
|
|
|
void TestFindAndReplace(void);
|
|
|
|
/**
|
|
|
|
* Test method numDisplayCells
|
|
|
|
**/
|
|
|
|
void TestCellWidth(void);
|
|
|
|
/**
|
|
|
|
* Test method reverse
|
|
|
|
**/
|
|
|
|
void TestReverse(void);
|
|
|
|
/**
|
|
|
|
* Test a few miscellaneous methods (isBogus, hashCode,...)
|
|
|
|
**/
|
|
|
|
void TestMiscellaneous(void);
|
|
|
|
/**
|
|
|
|
* Test the functionality of allocating UnicodeStrings on the stack
|
|
|
|
**/
|
|
|
|
void TestStackAllocation(void);
|
2000-08-16 20:25:29 +00:00
|
|
|
/**
|
|
|
|
* Test the unescape() function.
|
|
|
|
*/
|
|
|
|
void TestUnescape(void);
|
1999-08-16 21:50:52 +00:00
|
|
|
};
|
|
|
|
|
2002-03-13 19:21:27 +00:00
|
|
|
class StringCaseTest: public IntlTest {
|
|
|
|
public:
|
|
|
|
StringCaseTest() {}
|
|
|
|
virtual ~StringCaseTest() {}
|
|
|
|
|
|
|
|
void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
|
|
|
|
|
|
|
|
void TestCaseConversion();
|
|
|
|
void TestTitleCasing();
|
|
|
|
};
|
|
|
|
|
2001-08-31 18:02:09 +00:00
|
|
|
#endif
|