commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r227156 - /jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/StrBuilderTest.java
Date Wed, 03 Aug 2005 04:23:19 GMT
Author: ggregory
Date: Tue Aug  2 21:23:16 2005
New Revision: 227156

URL: http://svn.apache.org/viewcvs?rev=227156&view=rev
Log:
Coverage of StrBuilder#delete(String)

Modified:
    jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/StrBuilderTest.java

Modified: jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/StrBuilderTest.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/StrBuilderTest.java?rev=227156&r1=227155&r2=227156&view=diff
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/StrBuilderTest.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/StrBuilderTest.java
Tue Aug  2 21:23:16 2005
@@ -122,6 +122,10 @@
         assertEquals("abc",sb.toString()); 
         sb.delete('a');
         assertEquals("bc",sb.toString()); 
+        sb.delete('c');
+        assertEquals("b",sb.toString()); 
+        sb.delete('b');
+        assertEquals("",sb.toString()); 
     }
     
     public void testDeleteIntInt() {
@@ -138,10 +142,18 @@
     
     public void testDeleteString() {
         StrBuilder sb = new StrBuilder("abc");
+        sb.delete(null);
+        assertEquals("abc",sb.toString()); 
+        sb.delete("");
+        assertEquals("abc",sb.toString()); 
         sb.delete("X");
         assertEquals("abc",sb.toString()); 
         sb.delete("a");
         assertEquals("bc",sb.toString()); 
+        sb.delete("c");
+        assertEquals("b",sb.toString()); 
+        sb.delete("b");
+        assertEquals("",sb.toString()); 
     }
     
     public void testDeleteCharAt() {



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message