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:
parent
7076b7408f
commit
c7554151d3
|
@ -220,11 +220,7 @@ public class CharUtilsTest {
|
|||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue