commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections/pairs TestDefaultKeyValue.java AbstractTestMapEntry.java
Date Sun, 02 Nov 2003 19:44:37 GMT
scolebourne    2003/11/02 11:44:37

  Modified:    collections/src/java/org/apache/commons/collections/pairs
                        AbstractKeyValue.java
               collections/src/test/org/apache/commons/collections/pairs
                        TestDefaultKeyValue.java AbstractTestMapEntry.java
  Log:
  Remove [ ] from toString
  
  Revision  Changes    Path
  1.2       +3 -4      jakarta-commons/collections/src/java/org/apache/commons/collections/pairs/AbstractKeyValue.java
  
  Index: AbstractKeyValue.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/pairs/AbstractKeyValue.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractKeyValue.java	27 Sep 2003 10:33:34 -0000	1.1
  +++ AbstractKeyValue.java	2 Nov 2003 19:44:37 -0000	1.2
  @@ -112,11 +112,10 @@
        */
       public String toString() {
           return new StringBuffer()
  -            .append('[')
               .append(getKey())
               .append('=')
               .append(getValue())
  -            .append(']').toString();
  +            .toString();
       }
   
   }
  
  
  
  1.2       +4 -4      jakarta-commons/collections/src/test/org/apache/commons/collections/pairs/TestDefaultKeyValue.java
  
  Index: TestDefaultKeyValue.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/pairs/TestDefaultKeyValue.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestDefaultKeyValue.java	1 Oct 2003 22:36:49 -0000	1.1
  +++ TestDefaultKeyValue.java	2 Nov 2003 19:44:37 -0000	1.2
  @@ -217,11 +217,11 @@
   
       public void testToString() {
           DefaultKeyValue kv = makeDefaultKeyValue(key, value);
  -        assertTrue(kv.toString().equals("[" + kv.getKey() + "=" + kv.getValue() + "]"));
  +        assertTrue(kv.toString().equals(kv.getKey() + "=" + kv.getValue()));
   
           // test with nulls
           kv = makeDefaultKeyValue(null, null);
  -        assertTrue(kv.toString().equals("[" + kv.getKey() + "=" + kv.getValue() + "]"));
  +        assertTrue(kv.toString().equals(kv.getKey() + "=" + kv.getValue()));
       }
   
       public void testToMapEntry() {
  
  
  
  1.2       +4 -4      jakarta-commons/collections/src/test/org/apache/commons/collections/pairs/AbstractTestMapEntry.java
  
  Index: AbstractTestMapEntry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/pairs/AbstractTestMapEntry.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractTestMapEntry.java	1 Oct 2003 22:36:49 -0000	1.1
  +++ AbstractTestMapEntry.java	2 Nov 2003 19:44:37 -0000	1.2
  @@ -192,11 +192,11 @@
   
       public void testToString() {
           Map.Entry entry = makeMapEntry(key, value);
  -        assertTrue(entry.toString().equals("[" + entry.getKey() + "=" + entry.getValue()
+ "]"));
  +        assertTrue(entry.toString().equals(entry.getKey() + "=" + entry.getValue()));
   
           // test with nulls
           entry = makeMapEntry();
  -        assertTrue(entry.toString().equals("[" + entry.getKey() + "=" + entry.getValue()
+ "]"));
  +        assertTrue(entry.toString().equals(entry.getKey() + "=" + entry.getValue()));
       }
   
   }
  
  
  

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