mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 22:44:49 +00:00
ICU-2118 more coverage
X-SVN-Rev: 10404
This commit is contained in:
parent
0d158bb3b3
commit
c8515c5cb4
3 changed files with 25 additions and 13 deletions
|
@ -3818,7 +3818,7 @@ void TransliteratorTest::TestAllCodepoints(){
|
|||
if (t->getDynamicClassID() != cls::getStaticClassID()) { \
|
||||
errln("FAIL: " #cls " dynamic and static class ID mismatch"); \
|
||||
} \
|
||||
t = t; /*coverage test for assignment op*/ \
|
||||
/* *t = *t; /*can't do this: coverage test for assignment op*/ \
|
||||
} \
|
||||
delete t; \
|
||||
}
|
||||
|
@ -3833,7 +3833,7 @@ void TransliteratorTest::TestAllCodepoints(){
|
|||
if (t->getDynamicClassID() != cls ::getStaticClassID()) { \
|
||||
errln("FAIL: " #cls " dynamic and static class ID mismatch"); \
|
||||
} \
|
||||
t = t; /*coverage test for assignment op*/ \
|
||||
/* *t = *t; /*can't do this: coverage test for assignment op*/ \
|
||||
} \
|
||||
delete t; \
|
||||
}
|
||||
|
|
|
@ -550,18 +550,24 @@ void UnicodeSetTest::TestAPI() {
|
|||
|
||||
exp.applyPattern("[a-z]", status);
|
||||
if (U_FAILURE(status)) { errln("FAIL"); return; }
|
||||
if (set.containsNone(exp)) { errln("FAIL: containsNone(UnicodeSet)"); return; }
|
||||
if (set.containsNone(exp)) { errln("FAIL: containsNone(UnicodeSet)"); }
|
||||
if (!set.containsSome(exp)) { errln("FAIL: containsSome(UnicodeSet)"); }
|
||||
exp.applyPattern("[aln]", status);
|
||||
if (U_FAILURE(status)) { errln("FAIL"); return; }
|
||||
if (!set.containsNone(exp)) { errln("FAIL: containsNone(UnicodeSet)"); return; }
|
||||
if (!set.containsNone(exp)) { errln("FAIL: containsNone(UnicodeSet)"); }
|
||||
if (set.containsSome(exp)) { errln("FAIL: containsSome(UnicodeSet)"); }
|
||||
|
||||
if (set.containsNone((UChar32)0x61, (UChar32)0x7A)) {
|
||||
errln("FAIL: containsNone(UChar32, UChar32)");
|
||||
return;
|
||||
}
|
||||
if (!set.containsSome((UChar32)0x61, (UChar32)0x7A)) {
|
||||
errln("FAIL: containsSome(UChar32, UChar32)");
|
||||
}
|
||||
if (!set.containsNone((UChar32)0x41, (UChar32)0x5A)) {
|
||||
errln("FAIL: containsNone(UChar32, UChar32)");
|
||||
return;
|
||||
}
|
||||
if (set.containsSome((UChar32)0x41, (UChar32)0x5A)) {
|
||||
errln("FAIL: containsSome(UChar32, UChar32)");
|
||||
}
|
||||
|
||||
set.removeAll("liu");
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/translit/UnicodeSetTest.java,v $
|
||||
* $Date: 2002/11/26 18:31:56 $
|
||||
* $Revision: 1.36 $
|
||||
* $Date: 2002/11/28 00:53:05 $
|
||||
* $Revision: 1.37 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
|
@ -478,17 +478,23 @@ public class UnicodeSetTest extends TestFmwk {
|
|||
if (!set.equals(exp)) { errln("FAIL: complementAll(\"alan\")"); return; }
|
||||
|
||||
exp.applyPattern("[a-z]");
|
||||
if (set.containsNone(exp)) { errln("FAIL: containsNone(UnicodeSet)"); return; }
|
||||
if (set.containsNone(exp)) { errln("FAIL: containsNone(UnicodeSet)"); }
|
||||
if (!set.containsSome(exp)) { errln("FAIL: containsSome(UnicodeSet)"); }
|
||||
exp.applyPattern("[aln]");
|
||||
if (!set.containsNone(exp)) { errln("FAIL: containsNone(UnicodeSet)"); return; }
|
||||
|
||||
if (!set.containsNone(exp)) { errln("FAIL: containsNone(UnicodeSet)"); }
|
||||
if (set.containsSome(exp)) { errln("FAIL: containsSome(UnicodeSet)"); }
|
||||
|
||||
if (set.containsNone((char)0x61, (char)0x7A)) {
|
||||
errln("FAIL: containsNone(char, char)");
|
||||
return;
|
||||
}
|
||||
if (!set.containsSome((char)0x61, (char)0x7A)) {
|
||||
errln("FAIL: containsSome(char, char)");
|
||||
}
|
||||
if (!set.containsNone((char)0x41, (char)0x5A)) {
|
||||
errln("FAIL: containsNone(char, char)");
|
||||
return;
|
||||
}
|
||||
if (set.containsSome((char)0x41, (char)0x5A)) {
|
||||
errln("FAIL: containsSome(char, char)");
|
||||
}
|
||||
|
||||
set.removeAll("liu");
|
||||
|
|
Loading…
Add table
Reference in a new issue