ICU-10551 Fix default ignorable test result checking

X-SVN-Rev: 36508
This commit is contained in:
Michael Ow 2014-09-15 19:03:14 +00:00
parent 5ede5c1dc6
commit cd0b3fa10b

View file

@ -5754,7 +5754,7 @@ public class TestCharset extends TestFmwk {
for (int i = 0; i < size; i++) {
encoder.reset();
try {
if(encoder.encode(CharBuffer.wrap(Character.toChars(set_ignorable.charAt(i)))).position() > 0) {
if(encoder.encode(CharBuffer.wrap(Character.toChars(set_ignorable.charAt(i)))).limit() > 0) {
errln("Callback should have ignore default ignorable: 0x" + Integer.toHexString(set_ignorable.charAt(i)));
}
} catch (Exception ex) {
@ -5767,7 +5767,7 @@ public class TestCharset extends TestFmwk {
for (int i = 0; i < size; i++) {
encoder.reset();
try {
if(encoder.encode(CharBuffer.wrap(Character.toChars(set_not_ignorable.charAt(i)))).position() > 0) {
if(encoder.encode(CharBuffer.wrap(Character.toChars(set_not_ignorable.charAt(i)))).limit() == 0) {
errln("Callback should not have ignored: 0x" + Integer.toHexString(set_not_ignorable.charAt(i)));
}
} catch (Exception ex) {