commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1493144 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java
Date Fri, 14 Jun 2013 16:19:28 GMT
Author: sebb
Date: Fri Jun 14 16:19:27 2013
New Revision: 1493144

URL: http://svn.apache.org/r1493144
Log:
Add tests for new Javadoc examples

Modified:
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java?rev=1493144&r1=1493143&r2=1493144&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java
Fri Jun 14 16:19:27 2013
@@ -857,6 +857,11 @@ public class StringUtilsEqualsIndexOfTes
         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));
     }
 



Mime
View raw message