commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1352264 - /commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/TestListOrderedMap.java
Date Wed, 20 Jun 2012 18:54:36 GMT
Author: tn
Date: Wed Jun 20 18:54:36 2012
New Revision: 1352264

URL: http://svn.apache.org/viewvc?rev=1352264&view=rev
Log:
Use a TreeMap in ListOrderedMap unit test for deterministic entry order.

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

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/TestListOrderedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/TestListOrderedMap.java?rev=1352264&r1=1352263&r2=1352264&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/TestListOrderedMap.java
(original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/TestListOrderedMap.java
Wed Jun 20 18:54:36 2012
@@ -20,6 +20,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.TreeMap;
 
 import junit.framework.Test;
 
@@ -342,9 +343,9 @@ public class TestListOrderedMap<K, V> ex
             lom.put((K) Integer.valueOf(i), (V) Boolean.valueOf(true));
         }
 
-        HashMap<K, V> map = new HashMap<K, V>();
+        Map<K, V> map = new TreeMap<K, V>();
         for (int i = 0; i < size; i++) {
-            map.put((K) Integer.valueOf(i), (V) Boolean.valueOf(true));
+            map.put((K) Integer.valueOf(i), (V) Boolean.valueOf(false));
         }
 
         lom.putAll(3, map);



Mime
View raw message