code coverage test

X-SVN-Rev: 10669
This commit is contained in:
Syn Wee Quek 2002-12-13 23:14:50 +00:00
parent a719cd702e
commit 8a8f54d900
3 changed files with 24 additions and 4 deletions

View file

@ -170,6 +170,24 @@ public class CollationFrenchTest extends TestFmwk{
}
}
}
public void TestContinuationReordering()
{
String rule = "&0x2f00 << 0x2f01";
try {
RuleBasedCollator collator = new RuleBasedCollator(rule);
collator.setFrenchCollation(true);
CollationKey key1
= collator.getCollationKey("a\u0325\u2f00\u2f01b\u0325");
CollationKey key2
= collator.getCollationKey("a\u0325\u2f01\u2f01b\u0325");
if (key1.compareTo(key2) >= 0) {
errln("Error comparing continuation strings");
}
} catch (Exception e) {
errln(e.toString());
}
}
// main test routine, test rules specific to the french locale
private void doTest(char[] source, char[] target, int result) {

View file

@ -94,7 +94,9 @@ public class CollationIteratorTest extends TestFmwk {
* Test for getMaxExpansion()
*/
public void TestMaxExpansion(/* char* par */) {
String rule = "&a < ab < c/aba < d < z < ch";
// added jamo characters
String rule = "&a < ab < c/aba < d < z < ch < \u1100/aba "
+ "< \u1175/aba < \u11A8/aba";
RuleBasedCollator coll = null;
try {
coll = new RuleBasedCollator(rule);

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/CollationParsedRuleBuilder.java,v $
* $Date: 2002/12/11 07:13:26 $
* $Revision: 1.12 $
* $Date: 2002/12/13 23:14:50 $
* $Revision: 1.13 $
*
*******************************************************************************
*/
@ -700,7 +700,7 @@ final class CollationParsedRuleBuilder
m_endExpansionCE_ = new Vector();
m_isV_ = new Vector();
m_endExpansionCE_.add(new Integer(0));
m_isV_.add(new Integer(0));
m_isV_.add(new Boolean(false));
m_maxLSize_ = 1;
m_maxVSize_ = 1;
m_maxTSize_ = 1;