mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-16 10:17:23 +00:00
ICU-1421 add test for copy constructor
X-SVN-Rev: 6797
This commit is contained in:
parent
a6c794e643
commit
d1fc5965f4
2 changed files with 14 additions and 1 deletions
|
@ -42,7 +42,8 @@ UnicodeSetTest::runIndexedTest(int32_t index, UBool exec,
|
|||
CASE(5,TestAPI);
|
||||
CASE(6,TestScriptSet);
|
||||
CASE(7,TestPropertySet);
|
||||
CASE(8,TestExhaustive);
|
||||
CASE(8,TestClone);
|
||||
CASE(9,TestExhaustive);
|
||||
default: name = ""; break;
|
||||
}
|
||||
}
|
||||
|
@ -441,6 +442,16 @@ void UnicodeSetTest::TestPropertySet() {
|
|||
expectContainment(set, "abc", "ABC");
|
||||
}
|
||||
|
||||
/**
|
||||
* Test cloning of UnicodeSet. For C++, we test the copy constructor.
|
||||
*/
|
||||
void UnicodeSetTest::TestClone() {
|
||||
UErrorCode ec = U_ZERO_ERROR;
|
||||
UnicodeSet s("[abcxyz]", ec);
|
||||
UnicodeSet t(s);
|
||||
expectContainment(t, "abc", "def");
|
||||
}
|
||||
|
||||
void UnicodeSetTest::TestExhaustive() {
|
||||
// exhaustive tests. Simulate UnicodeSets with integers.
|
||||
// That gives us very solid tests (except for large memory tests).
|
||||
|
|
|
@ -46,6 +46,8 @@ private:
|
|||
*/
|
||||
void TestPropertySet(void);
|
||||
|
||||
void TestClone(void);
|
||||
|
||||
void TestExhaustive(void);
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Reference in a new issue