*/
public static int getCombiningClass(int ch)
{
- if (ch < MIN_VALUE || ch > MAX_VALUE) {
- throw new IllegalArgumentException("Codepoint out of bounds");
- }
return Norm2AllModes.getNFCInstance().decomp.getCombiningClass(ch);
}
try{
UCharacter.getCombiningClass(valid_tests[i]);
} catch(Exception e){
- errln("UCharacter.getCombiningClass(int) was not suppose to have " +
+ errln("UCharacter.getCombiningClass(int) was not supposed to have " +
"an exception. Value passed: " + valid_tests[i]);
}
}
for(int i=0; i< invalid_tests.length; i++){
try{
- UCharacter.getCombiningClass(invalid_tests[i]);
- errln("UCharacter.getCombiningClass(int) was suppose to have " +
- "an exception. Value passed: " + invalid_tests[i]);
+ assertEquals("getCombiningClass(out of range)",
+ 0, UCharacter.getCombiningClass(invalid_tests[i]));
} catch(Exception e){
+ errln("UCharacter.getCombiningClass(int) was not supposed to have " +
+ "an exception. Value passed: " + invalid_tests[i]);
}
}
}