From 13c8e44e6a57f7abd0699ebc9ee4245b37abd918 Mon Sep 17 00:00:00 2001 From: Thomas Neidhart Date: Wed, 20 Jun 2012 18:54:36 +0000 Subject: [PATCH] Use a TreeMap in ListOrderedMap unit test for deterministic entry order. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1352264 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/commons/collections/map/TestListOrderedMap.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/apache/commons/collections/map/TestListOrderedMap.java b/src/test/java/org/apache/commons/collections/map/TestListOrderedMap.java index fb4a73b21..88552f548 100644 --- a/src/test/java/org/apache/commons/collections/map/TestListOrderedMap.java +++ b/src/test/java/org/apache/commons/collections/map/TestListOrderedMap.java @@ -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 extends AbstractTestOrderedMap { lom.put((K) Integer.valueOf(i), (V) Boolean.valueOf(true)); } - HashMap map = new HashMap(); + Map map = new TreeMap(); 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);