commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/jexl/src/test/org/apache/commons/jexl JexlTest.java
Date Sun, 22 Aug 2004 08:32:15 GMT
dion        2004/08/22 01:32:15

  Modified:    jexl/src/test/org/apache/commons/jexl JexlTest.java
  Log:
  Update on flat resolver tests
  
  Revision  Changes    Path
  1.56      +16 -14    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.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- JexlTest.java	20 Aug 2004 12:05:03 -0000	1.55
  +++ JexlTest.java	22 Aug 2004 08:32:14 -0000	1.56
  @@ -459,10 +459,10 @@
         *
         *  test some simple conditions
         */
  -    public void dontDoTestNotConditionsWithDots()
  +    public void testNotConditionsWithDots()
            throws Exception
       {
  -        Expression e = ExpressionFactory.createExpression("x.a == true");
  +        Expression e = ExpressionFactory.createExpression("x.a");
           e.addPostResolver(new FlatResolver());
           JexlContext jc = JexlHelper.createContext();
   
  @@ -473,17 +473,19 @@
           assertTrue("o not instanceof Boolean", o instanceof Boolean);
           assertEquals("o incorrect", Boolean.TRUE, o );
   
  -        e = ExpressionFactory.createExpression("!x.a");
  -        e.addPreResolver(new FlatResolver());
  -        o = e.evaluate(jc);
  -
  -        assertEquals("o incorrect", Boolean.FALSE, o);
  -
  -        e = ExpressionFactory.createExpression("!x.b");
  -        e.addPreResolver(new FlatResolver());
  -        o = e.evaluate(jc);
  -
  -        assertEquals("o incorrect", Boolean.TRUE, o );
  +// unfortunately the FlatResolver doesn't resolve variables, that is the job of the context,
  +// so the following tests would never have worked.
  +//        e = ExpressionFactory.createExpression("!x.a");
  +//        e.addPreResolver(new FlatResolver());
  +//        o = e.evaluate(jc);
  +//
  +//        assertEquals("o incorrect", Boolean.FALSE, o);
  +//
  +//        e = ExpressionFactory.createExpression("!x.b");
  +//        e.addPreResolver(new FlatResolver());
  +//        o = e.evaluate(jc);
  +//
  +//        assertEquals("o incorrect", Boolean.TRUE, o );
       }
   
       /**
  
  
  

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


Mime
View raw message