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 2009/09/02 19:26:14 UTC
svn commit: r810623 -
/commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/scripting/JexlScriptEngineTest.java
Author: sebb
Date: Wed Sep 2 17:26:13 2009
New Revision: 810623
URL: http://svn.apache.org/viewvc?rev=810623&view=rev
Log:
Fix tests which failed due to change in promotion rules; small numbers are now Integer, not Long
Modified:
commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/scripting/JexlScriptEngineTest.java
Modified: commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/scripting/JexlScriptEngineTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/scripting/JexlScriptEngineTest.java?rev=810623&r1=810622&r2=810623&view=diff
==============================================================================
--- commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/scripting/JexlScriptEngineTest.java (original)
+++ commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/scripting/JexlScriptEngineTest.java Wed Sep 2 17:26:13 2009
@@ -45,7 +45,7 @@
assertTrue("Must take some time to process this",time1 <= time2.longValue());
engine.put("value", initialValue);
assertEquals(initialValue,engine.get("value"));
- final Long newValue = Long.valueOf(124);
+ final Integer newValue = Integer.valueOf(124);
assertEquals(newValue,engine.eval("old=value;value=value+1"));
assertEquals(initialValue,engine.get("old"));
assertEquals(newValue,engine.get("value"));
@@ -102,10 +102,10 @@
engine.eval("global=global+1");
engine.eval("both=both+1"); // should update engine value only
engine.eval("newvar=42;");
- assertEquals(Long.valueOf(2),manager.get("global"));
- assertEquals(Long.valueOf(11),engine.get("local"));
+ assertEquals(Integer.valueOf(2),manager.get("global"));
+ assertEquals(Integer.valueOf(11),engine.get("local"));
assertEquals(Integer.valueOf(7),manager.get("both"));
- assertEquals(Long.valueOf(8),engine.get("both"));
+ assertEquals(Integer.valueOf(8),engine.get("both"));
assertEquals(Integer.valueOf(42),engine.get("newvar"));
assertNull(manager.get("newvar"));
}