Fixing the javadoc for endsWithIgnoreCase as per LANG-418, and adding some javadoc to test the novel javadoc examples

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@640727 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2008-03-25 07:37:12 +00:00
parent 7066ec40d6
commit bb8b6f4b0c
2 changed files with 10 additions and 4 deletions

View File

@ -5922,10 +5922,11 @@ public static boolean endsWith(String str, String suffix) {
*
* <pre>
* StringUtils.endsWithIgnoreCase(null, null) = true
* StringUtils.endsWithIgnoreCase(null, "abcdef") = false
* StringUtils.endsWithIgnoreCase("def", null) = false
* StringUtils.endsWithIgnoreCase("def", "abcdef") = true
* StringUtils.endsWithIgnoreCase("def", "ABCDEF") = false
* StringUtils.endsWithIgnoreCase("abcdef", null) = false
* StringUtils.endsWithIgnoreCase(null, "def") = false
* StringUtils.endsWithIgnoreCase("abcdef", "def") = true
* StringUtils.endsWithIgnoreCase("ABCDEF", "def") = true
* StringUtils.endsWithIgnoreCase("ABCDEF", "cde") = false
* </pre>
*
* @see java.lang.String#endsWith(String)

View File

@ -149,6 +149,11 @@ public void testEndsWithIgnoreCase() {
assertTrue("endsWithIgnoreCase(FOOBAR, BAR)", StringUtils.endsWithIgnoreCase(FOOBAR, BAR));
assertTrue("endsWithIgnoreCase(foobar, BAR)", StringUtils.endsWithIgnoreCase(foobar, BAR));
assertTrue("endsWithIgnoreCase(FOOBAR, bar)", StringUtils.endsWithIgnoreCase(FOOBAR, bar));
// javadoc
assertTrue(StringUtils.endsWithIgnoreCase("abcdef", "def"));
assertTrue(StringUtils.endsWithIgnoreCase("ABCDEF", "def"));
assertFalse(StringUtils.endsWithIgnoreCase("ABCDEF", "cde"));
}
}