CharUtilsTest#testIsAscii_char loop
The loop currently loops only up to 128, thus testing just positive return values of CharUtils#isAscii(char). This patch increase the loop to go over all the possible values of an unsigned byte, thus testing also negative return values.
This commit is contained in:
parent
c7554151d3
commit
ae862ae116
|
@ -219,7 +219,7 @@ public void testIsAscii_char() {
|
||||||
assertTrue(CharUtils.isAscii('\n'));
|
assertTrue(CharUtils.isAscii('\n'));
|
||||||
assertFalse(CharUtils.isAscii(CHAR_COPY));
|
assertFalse(CharUtils.isAscii(CHAR_COPY));
|
||||||
|
|
||||||
for (int i = 0; i < 128; i++) {
|
for (int i = 0; i < 255; i++) {
|
||||||
assertEquals(i < 128, CharUtils.isAscii((char) i));
|
assertEquals(i < 128, CharUtils.isAscii((char) i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue