Clean up if in CharUtilsTest#testIsAscii_char

The if statement calls assertTrue on the if branch and assertFalse on
the else branch on the same expression. This can easily be simplified
to assertEquals with a boolean expression to make the code clean and
easier to read.
This commit is contained in:
Allon Mureinik 2017-09-30 15:25:34 +03:00 committed by pascalschumacher
parent 7076b7408f
commit c7554151d3
1 changed files with 1 additions and 5 deletions

View File

@ -220,11 +220,7 @@ public void testIsAscii_char() {
assertFalse(CharUtils.isAscii(CHAR_COPY));
for (int i = 0; i < 128; i++) {
if (i < 128) {
assertTrue(CharUtils.isAscii((char) i));
} else {
assertFalse(CharUtils.isAscii((char) i));
}
assertEquals(i < 128, CharUtils.isAscii((char) i));
}
}