You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by pr...@apache.org on 2003/09/04 03:06:29 UTC

cvs commit: jakarta-commons/jexl/src/test/org/apache/commons/jexl JexlTest.java

proyal      2003/09/03 18:06:29

  Modified:    jexl/src/test/org/apache/commons/jexl JexlTest.java
  Log:
  * Remove unused variables
  * Add test for empty(dotted.param) that Ryan Hoegg reported
  
  Revision  Changes    Path
  1.30      +10 -5     jakarta-commons/jexl/src/test/org/apache/commons/jexl/JexlTest.java
  
  Index: JexlTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jexl/src/test/org/apache/commons/jexl/JexlTest.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- JexlTest.java	22 Jun 2003 19:43:01 -0000	1.29
  +++ JexlTest.java	4 Sep 2003 01:06:29 -0000	1.30
  @@ -652,7 +652,6 @@
           e.addPostResolver(new FlatResolver());
           JexlContext jc = JexlHelper.createContext();
   
  -        Foo foo = new Foo();
           jc.getVars().put("x.a", Boolean.TRUE );
           jc.getVars().put("x.b", Boolean.FALSE );
           Object o = e.evaluate(jc);
  @@ -682,7 +681,6 @@
           Expression e = ExpressionFactory.createExpression("foo.indexOf('quick') > 0");
           JexlContext jc = JexlHelper.createContext();
   
  -        Foo foo = new Foo();
           jc.getVars().put("foo", "the quick and lazy fox" );
           Object o = e.evaluate(jc);
   
  @@ -927,8 +925,6 @@
       {
           JexlContext jc = JexlHelper.createContext();
   
  -        Foo foo = new Foo();
  -
           jc.getVars().put("foo", "abcdef");
   
           assertExpression(jc, "foo.substring(2,4)", "cd");
  @@ -944,6 +940,15 @@
           catch (Exception e) {
               throw e;
           }
  +    }
  +
  +    public void testEmptyDottedVariableName() throws Exception
  +    {
  +        JexlContext jc = JexlHelper.createContext();
  +
  +        jc.getVars().put( "this.is.a.test", "");
  +
  +        assertExpression(jc, "empty(this.is.a.test)", Boolean.TRUE);
       }
   
       public void testCoercionWithComparisionOperators()