commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject cvs commit: jakarta-commons/lang/src/test/org/apache/commons/lang StringUtilsTest.java
Date Mon, 15 Dec 2003 01:52:32 GMT
ggregory    2003/12/14 17:52:32

  Modified:    lang/src/test/org/apache/commons/lang StringUtilsTest.java
  Log:
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25454
  StringUtils.replaceChars(String,String,String).
  
  Revision  Changes    Path
  1.57      +17 -6     jakarta-commons/lang/src/test/org/apache/commons/lang/StringUtilsTest.java
  
  Index: StringUtilsTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/StringUtilsTest.java,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- StringUtilsTest.java	23 Nov 2003 20:44:39 -0000	1.56
  +++ StringUtilsTest.java	15 Dec 2003 01:52:32 -0000	1.57
  @@ -74,7 +74,7 @@
    * @author Holger Krauth
    * @author <a href="hps@intermeta.de">Henning P. Schmiedehausen</a>
    * @author Phil Steitz
  - * @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
  + * @author Gary D. Gregory
    * @author Al Chou
    * @version $Id$
    */
  @@ -437,7 +437,7 @@
           assertEquals("", StringUtils.replace("foofoofoo", "foo", ""));
           assertEquals("barbarbar", StringUtils.replace("foofoofoo", "foo", "bar"));
           assertEquals("farfarfar", StringUtils.replace("foofoofoo", "oo", "ar"));
  -    }
  +       }
       
       public void testReplace_StringStringStringInt() {
           assertEquals(null, StringUtils.replace(null, null, null, 2));
  @@ -480,8 +480,6 @@
       }
       
       public void testReplaceChars_StringStringString() {
  -        assertEquals("jelly", StringUtils.replaceChars("hello", "ho", "jy"));
  -
           assertEquals(null, StringUtils.replaceChars(null, null, null));
           assertEquals(null, StringUtils.replaceChars(null, "", null));
           assertEquals(null, StringUtils.replaceChars(null, "a", null));
  @@ -510,7 +508,20 @@
           assertEquals("ayya", StringUtils.replaceChars("abcba", "bc", "y"));
           assertEquals("ayzya", StringUtils.replaceChars("abcba", "bc", "yzx"));
           
  -        assertSame("abcba", StringUtils.replaceChars("abcba", "z", "w"));
  +        assertEquals("abcba", StringUtils.replaceChars("abcba", "z", "w"));
  +        // Comment out for now, delete later when discussion completes [Gary Gregory, Dec
14 2003]
  +        //assertSame("abcba", StringUtils.replaceChars("abcba", "z", "w"));
  +        
  +        // Javadoc examples:
  +        assertEquals("jelly", StringUtils.replaceChars("hello", "ho", "jy"));
  +        assertEquals("ayzya", StringUtils.replaceChars("abcba", "bc", "yz"));
  +        assertEquals("ayya", StringUtils.replaceChars("abcba", "bc", "y"));
  +        assertEquals("ayzya", StringUtils.replaceChars("abcba", "bc", "yzx"));
  +        
  +        // From http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25454
  +        assertEquals("bcc", StringUtils.replaceChars("abc", "ab", "bc"));
  +        assertEquals("q651.506bera", StringUtils.replaceChars("d216.102oren", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789",
  +                "nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM567891234"));
       }
       
       public void testOverlayString_StringStringIntInt() {
  
  
  

---------------------------------------------------------------------
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