Applying Sebb's test and fix for LANG-365

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@589050 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2007-10-27 05:07:45 +00:00
parent 9da40ba6b5
commit 796b898281
2 changed files with 3 additions and 0 deletions

View File

@ -679,6 +679,7 @@ public class BooleanUtils {
(str.charAt(1) == 'E' || str.charAt(1) == 'e') &&
(str.charAt(2) == 'S' || str.charAt(2) == 's');
}
return false;
}
case 4: {
char ch = str.charAt(0);

View File

@ -330,6 +330,8 @@ public class BooleanUtilsTest extends TestCase {
assertEquals(true, BooleanUtils.toBoolean("YeS"));
assertEquals(true, BooleanUtils.toBoolean("YEs"));
assertEquals(true, BooleanUtils.toBoolean("YES"));
assertEquals(false, BooleanUtils.toBoolean("yes?"));
assertEquals(false, BooleanUtils.toBoolean("tru"));
}
public void test_toBoolean_String_String_String() {