/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * Copyright (c) 1997-2012, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
#ifndef UNICODESTRINGTEST_H
#define UNICODESTRINGTEST_H
+#include "unicode/unistr.h"
#include "intltest.h"
+U_NAMESPACE_BEGIN
+
+class Appendable;
+
+U_NAMESPACE_END
+
/**
* Perform API and functionality tests for class UnicodeString
**/
* Test methods startsWith and endsWith
**/
void TestPrefixAndSuffix(void);
+ void TestStartsWithAndEndsWithNulTerminated();
/**
* Test method findAndReplace
**/
void TestUnescape(void);
void _testUnicodeStringHasMoreChar32Than(const UnicodeString &s, int32_t start, int32_t length, int32_t number);
- void TestCountChar32(void);
+ void TestCountChar32();
void TestBogus();
void TestStringEnumeration();
+ void TestNameSpace();
+ void TestUTF32();
+ void TestUTF8();
+ void TestReadOnlyAlias();
+ void doTestAppendable(UnicodeString &dest, Appendable &app);
+ void TestAppendable();
+ void TestUnicodeStringImplementsAppendable();
+ void TestSizeofUnicodeString();
};
class StringCaseTest: public IntlTest {
public:
StringCaseTest() {}
virtual ~StringCaseTest();
-
+
void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
void TestCaseConversion();
-#if !UCONFIG_NO_BREAK_ITERATION
- void TestTitleCasing();
-#endif
+
+ void TestCasingImpl(const UnicodeString &input,
+ const UnicodeString &output,
+ int32_t whichCase,
+ void *iter, const char *localeID, uint32_t options);
+ void TestCasing();
+ void TestFullCaseFoldingIterator();
};
#endif