You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2013/04/30 21:09:01 UTC

svn commit: r1477781 - /commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/Flat3MapTest.java

Author: sebb
Date: Tue Apr 30 19:09:01 2013
New Revision: 1477781

URL: http://svn.apache.org/r1477781
Log:
Add some tests for toString

Modified:
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/Flat3MapTest.java

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/Flat3MapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/Flat3MapTest.java?rev=1477781&r1=1477780&r2=1477781&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/Flat3MapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/Flat3MapTest.java Tue Apr 30 19:09:01 2013
@@ -425,4 +425,24 @@ public class Flat3MapTest<K, V> extends 
         assertEquals( Integer.valueOf(0), m.remove( Integer.valueOf(0) ) ); 
     }
 
+    public void testToString() {
+        final Flat3Map<Integer, Integer> m = new Flat3Map<Integer, Integer>();
+        final String string0 = m.toString();
+        assertNotNull(string0);
+        m.put( Integer.valueOf(1), Integer.valueOf(1) );
+        final String string1 = m.toString();
+        assertNotNull(string1);
+        assertNotSame(string0, string1);
+        m.put( Integer.valueOf(0), Integer.valueOf(0) );
+        final String string2 = m.toString();
+        assertNotNull(string2);
+        assertNotSame(string0, string2);
+        assertNotSame(string1, string2);
+        m.put( Integer.valueOf(2), Integer.valueOf(2) );
+        final String string3 = m.toString();
+        assertNotNull(string3);
+        assertNotSame(string0, string3);
+        assertNotSame(string1, string3);
+        assertNotSame(string2, string3);
+    }
 }