commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1135691 - /commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java
Date Tue, 14 Jun 2011 16:43:19 GMT
Author: sebb
Date: Tue Jun 14 16:43:19 2011
New Revision: 1135691

URL: http://svn.apache.org/viewvc?rev=1135691&view=rev
Log:
Add float tests

Modified:
    commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java

Modified: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java?rev=1135691&r1=1135690&r2=1135691&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java (original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java Tue Jun
14 16:43:19 2011
@@ -36,20 +36,23 @@ public class IssuesTest extends JexlTest
         // ensure jul logging is only error to avoid warning in silent mode
         java.util.logging.Logger.getLogger(JexlEngine.class.getName()).setLevel(java.util.logging.Level.SEVERE);
     }
-    
+
     // JEXL-24: long integers (and doubles)
     public void test24() throws Exception {
         Map<String, Object> vars = new HashMap<String, Object>();
         JexlContext ctxt = new MapContext(vars);
-        String stmt = "{a = 10L; b = 10l; c = 42.0D; d = 42.0d;}";
+        String stmt = "{a = 10L; b = 10l; c = 42.0D; d = 42.0d; e=56.3F; f=56.3f; g=63.5}";
         Script expr = JEXL.createScript(stmt);
         /* Object value = */ expr.execute(ctxt);
         assertEquals(10L, vars.get("a"));
         assertEquals(10l, vars.get("b"));
         assertEquals(42.0D, vars.get("c"));
         assertEquals(42.0d, vars.get("d"));
-        
+        assertEquals(56.3f, vars.get("e"));
+        assertEquals(56.3f, vars.get("f"));
+        assertEquals(63.5f, vars.get("g"));
     }
+
     // JEXL-24: big integers and big decimals
     public void test24B() throws Exception {
         Map<String, Object> vars = new HashMap<String, Object>();



Mime
View raw message