Add tests for new Javadoc examples

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1493144 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2013-06-14 16:19:27 +00:00
parent 0dafe1193c
commit a3242c0171
1 changed files with 5 additions and 0 deletions

View File

@ -857,6 +857,11 @@ public class StringUtilsEqualsIndexOfTest {
assertEquals(7, StringUtils.lastIndexOf("12345678", "8", 7)); // 7 is last index
assertEquals(-1, StringUtils.lastIndexOf("12345678", "8", 6));
assertEquals(-1, StringUtils.lastIndexOf("aabaabaa", "b", 1));
assertEquals(2, StringUtils.lastIndexOf("aabaabaa", "b", 2));
assertEquals(2, StringUtils.lastIndexOf("aabaabaa", "ba", 2));
assertEquals(2, StringUtils.lastIndexOf("aabaabaa", "ba", 3));
assertEquals(2, StringUtils.lastIndexOf(new StringBuilder("aabaabaa"), "b", 3));
}