commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jexl/src/test/org/apache/commons/jexl JexlTest.java
Date Sat, 25 May 2002 18:40:44 GMT
geirm       02/05/25 11:40:44

  Modified:    jexl/src/test/org/apache/commons/jexl JexlTest.java
  Log:
  fix the testcase
  
  Revision  Changes    Path
  1.9       +17 -1     jakarta-commons-sandbox/jexl/src/test/org/apache/commons/jexl/JexlTest.java
  
  Index: JexlTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jexl/src/test/org/apache/commons/jexl/JexlTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JexlTest.java	20 May 2002 14:11:25 -0000	1.8
  +++ JexlTest.java	25 May 2002 18:40:44 -0000	1.9
  @@ -71,7 +71,7 @@
    *  Simple testcases
    *
    *  @author <a href="mailto:geirm@apache.org">Geir Magnusson Jr.</a>
  - *  @version $Id: JexlTest.java,v 1.8 2002/05/20 14:11:25 jstrachan Exp $
  + *  @version $Id: JexlTest.java,v 1.9 2002/05/25 18:40:44 geirm Exp $
    */
   public class JexlTest extends TestCase
   {
  @@ -182,6 +182,16 @@
   
           assertTrue("array[0]", o.equals("hello"));
   
  +        jc.getVars().put("zero", new Integer(0));
  +
  +        /*
  +         * to think that this was an intentional syntax...
  +         */
  +        e = ExpressionFactory.createExpression("array.0");
  +        o = e.evaluate(jc);
  +
  +        assertTrue("array[0]", o.equals("hello"));
  +
           /*
            * test map access
            */
  @@ -210,6 +220,12 @@
           o = e.evaluate(jc);
   
           assertTrue("foo['bar']", o.equals(GET_METHOD_STRING));
  +
  +        e = ExpressionFactory.createExpression("foo[\"bar\"] == foo.bar");
  +        o = e.evaluate(jc);
  +
  +        assertTrue("foo['bar'] == foo.bar", o.equals(Boolean.TRUE));
  +
       }
   
       public void testMulti()
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message