LANG-1043 - isAllUpperCase should only check Alpha characters
Document and test additional cases git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1630619 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0d3d31972b
commit
b199af8d82
|
@ -6151,7 +6151,10 @@ public class StringUtils {
|
|||
* StringUtils.isAllLowerCase("") = false
|
||||
* StringUtils.isAllLowerCase(" ") = false
|
||||
* StringUtils.isAllLowerCase("abc") = true
|
||||
* StringUtils.isAllLowerCase("abC") = false
|
||||
* StringUtils.isAllLowerCase("abC") = false
|
||||
* StringUtils.isAllLowerCase("ab c") = false
|
||||
* StringUtils.isAllLowerCase("ab1c") = false
|
||||
* StringUtils.isAllLowerCase("ab/c") = false
|
||||
* </pre>
|
||||
*
|
||||
* @param cs the CharSequence to check, may be null
|
||||
|
@ -6183,7 +6186,10 @@ public class StringUtils {
|
|||
* StringUtils.isAllUpperCase("") = false
|
||||
* StringUtils.isAllUpperCase(" ") = false
|
||||
* StringUtils.isAllUpperCase("ABC") = true
|
||||
* StringUtils.isAllUpperCase("aBC") = false
|
||||
* StringUtils.isAllUpperCase("aBC") = false
|
||||
* StringUtils.isAllUpperCase("A C") = false
|
||||
* StringUtils.isAllUpperCase("A1C") = false
|
||||
* StringUtils.isAllUpperCase("A/C") = false
|
||||
* </pre>
|
||||
*
|
||||
* @param cs the CharSequence to check, may be null
|
||||
|
|
|
@ -2066,9 +2066,14 @@ public class StringUtilsTest {
|
|||
public void testIsAllLowerCase() {
|
||||
assertFalse(StringUtils.isAllLowerCase(null));
|
||||
assertFalse(StringUtils.isAllLowerCase(StringUtils.EMPTY));
|
||||
assertFalse(StringUtils.isAllLowerCase(" "));
|
||||
assertTrue(StringUtils.isAllLowerCase("abc"));
|
||||
assertFalse(StringUtils.isAllLowerCase("abc "));
|
||||
assertFalse(StringUtils.isAllLowerCase("abc\n"));
|
||||
assertFalse(StringUtils.isAllLowerCase("abC"));
|
||||
assertFalse(StringUtils.isAllLowerCase("ab c"));
|
||||
assertFalse(StringUtils.isAllLowerCase("ab1c"));
|
||||
assertFalse(StringUtils.isAllLowerCase("ab/c"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2078,9 +2083,14 @@ public class StringUtilsTest {
|
|||
public void testIsAllUpperCase() {
|
||||
assertFalse(StringUtils.isAllUpperCase(null));
|
||||
assertFalse(StringUtils.isAllUpperCase(StringUtils.EMPTY));
|
||||
assertFalse(StringUtils.isAllUpperCase(" "));
|
||||
assertTrue(StringUtils.isAllUpperCase("ABC"));
|
||||
assertFalse(StringUtils.isAllUpperCase("ABC "));
|
||||
assertFalse(StringUtils.isAllUpperCase("ABC\n"));
|
||||
assertFalse(StringUtils.isAllUpperCase("aBC"));
|
||||
assertFalse(StringUtils.isAllUpperCase("A C"));
|
||||
assertFalse(StringUtils.isAllUpperCase("A1C"));
|
||||
assertFalse(StringUtils.isAllUpperCase("A/C"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue