ICU-2481 update with comments

X-SVN-Rev: 12453
This commit is contained in:
Ram Viswanadha 2003-06-11 17:51:25 +00:00
parent 266539b3e0
commit f055789f46
2 changed files with 30 additions and 10 deletions

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/normalizer/BasicTest.java,v $
* $Date: 2003/06/09 23:56:32 $
* $Revision: 1.32 $
* $Date: 2003/06/11 17:51:25 $
* $Revision: 1.33 $
*
*****************************************************************************************
*/
@ -426,6 +426,14 @@ public class BasicTest extends TestFmwk {
Integer.toHexString(CPNFKC[count]));
return;
}
// for improving coverage
if (Normalizer.quickCheck(String.valueOf(CPNFKC[count]),
Normalizer.NFKC) !=Normalizer.NO)
{
errln("ERROR in NFKC quick check at U+"+
Integer.toHexString(CPNFKC[count]));
return;
}
}
}
@ -475,6 +483,14 @@ public class BasicTest extends TestFmwk {
Integer.toHexString(cp));
return;
}
// improve the coverage
if (Normalizer.quickCheck(String.valueOf(cp), Normalizer.NFKC)
!= Normalizer.YES)
{
errln("ERROR in NFKC quick check at U+"+
Integer.toHexString(cp));
return;
}
cp++;
}
@ -508,6 +524,14 @@ public class BasicTest extends TestFmwk {
Integer.toHexString(CPNFKC[count]));
return;
}
// improve the coverage
if (Normalizer.quickCheck(String.valueOf(CPNFKC[count]),
Normalizer.NFKC)!=Normalizer.YES)
{
errln("ERROR in NFKC quick check at U+"+
Integer.toHexString(CPNFKC[count]));
return;
}
}
}
public void TestBengali() throws Exception{
@ -2056,11 +2080,6 @@ public class BasicTest extends TestFmwk {
++count;
errln("U+"+hex(c)+": case-folding may un-FCD a string (folding options 0x"+hex(foldingOptions)+")");
}
// for improving coverage
if(isNFD && Normalizer.YES!=Normalizer.quickCheck(s, Normalizer.NFD)) {
++count;
errln("U+"+hex(c)+": case-folding may un-FCD a string (folding options 0x"+hex(foldingOptions)+")");
}
}
logln("There are "+hex(count)+" code points for which case-folding may un-FCD a string (folding options"+foldingOptions+"x)" );

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/Normalizer.java,v $
* $Date: 2003/06/03 18:49:34 $
* $Revision: 1.33 $
* $Date: 2003/06/11 17:51:25 $
* $Revision: 1.34 $
*
*******************************************************************************
*/
@ -2666,7 +2666,8 @@ public final class Normalizer implements Cloneable{
int result;
if( s1==null || s1Start<0 || s1Limit<0 ||
s2==null || s2Start<0 || s2Limit<0
s2==null || s2Start<0 || s2Limit<0 ||
s1Limit<s1Start || s2Limit<s2Start
) {
throw new IllegalArgumentException();