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:
parent
9da40ba6b5
commit
796b898281
|
@ -679,6 +679,7 @@ public class BooleanUtils {
|
||||||
(str.charAt(1) == 'E' || str.charAt(1) == 'e') &&
|
(str.charAt(1) == 'E' || str.charAt(1) == 'e') &&
|
||||||
(str.charAt(2) == 'S' || str.charAt(2) == 's');
|
(str.charAt(2) == 'S' || str.charAt(2) == 's');
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case 4: {
|
case 4: {
|
||||||
char ch = str.charAt(0);
|
char ch = str.charAt(0);
|
||||||
|
|
|
@ -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(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() {
|
public void test_toBoolean_String_String_String() {
|
||||||
|
|
Loading…
Reference in New Issue