commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r799905 - /commons/proper/jexl/branches/2.0/src/test/org/apache/commons/jexl/scripting/JexlScriptEngineTest.java
Date Sat, 01 Aug 2009 18:48:54 GMT
Author: sebb
Date: Sat Aug  1 18:48:54 2009
New Revision: 799905

URL: http://svn.apache.org/viewvc?rev=799905&view=rev
Log:
Change assertions so they don't depend on order of Map iteration.

Modified:
    commons/proper/jexl/branches/2.0/src/test/org/apache/commons/jexl/scripting/JexlScriptEngineTest.java

Modified: commons/proper/jexl/branches/2.0/src/test/org/apache/commons/jexl/scripting/JexlScriptEngineTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/test/org/apache/commons/jexl/scripting/JexlScriptEngineTest.java?rev=799905&r1=799904&r2=799905&view=diff
==============================================================================
--- commons/proper/jexl/branches/2.0/src/test/org/apache/commons/jexl/scripting/JexlScriptEngineTest.java
(original)
+++ commons/proper/jexl/branches/2.0/src/test/org/apache/commons/jexl/scripting/JexlScriptEngineTest.java
Sat Aug  1 18:48:54 2009
@@ -18,6 +18,8 @@
 
 package org.apache.commons.jexl.scripting;
 
+import java.util.Map;
+
 import javax.script.ScriptEngine;
 import javax.script.ScriptEngineManager;
 
@@ -93,6 +95,7 @@
         assertNull(engine.get("this.is.a.test"));
         assertEquals(Boolean.TRUE, engine.eval("empty(this.is.a.test)"));
         final Object mymap = engine.eval("testmap=[ 'key1' => 'value1', 'key2' => 'value2'
]");
-        assertEquals("{key1=value1, key2=value2}",mymap.toString());
+        assertTrue(mymap instanceof Map);
+        assertEquals(2,((Map)mymap).size());
     }
 }



Mime
View raw message