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 Fri, 20 Aug 2004 07:59:47 GMT
dion        2004/08/20 00:59:47

  Modified:    jexl/src/test/org/apache/commons/jexl JexlTest.java
  Log:
  Use assertExpression more often
  
  Revision  Changes    Path
  1.50      +4 -16     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.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- JexlTest.java	20 Aug 2004 07:56:33 -0000	1.49
  +++ JexlTest.java	20 Aug 2004 07:59:47 -0000	1.50
  @@ -460,24 +460,12 @@
       public void testComparisons()
            throws Exception
       {
  -        Expression e = ExpressionFactory.createExpression("foo.indexOf('quick') > 0");
           JexlContext jc = JexlHelper.createContext();
  -
           jc.getVars().put("foo", "the quick and lazy fox" );
  -        Object o = e.evaluate(jc);
  -
  -        assertTrue("o not instanceof Boolean", o instanceof Boolean);
  -        assertEquals("o incorrect", Boolean.TRUE, o);
  -
  -        e = ExpressionFactory.createExpression("foo.indexOf('bar') >= 0");
  -        o = e.evaluate(jc);
  -
  -        assertEquals("o incorrect", Boolean.FALSE, o );
  -
  -        e = ExpressionFactory.createExpression("foo.indexOf('bar') < 0");
  -        o = e.evaluate(jc);
   
  -        assertEquals("o incorrect", Boolean.TRUE, o );
  +        assertExpression(jc, "foo.indexOf('quick') > 0", Boolean.TRUE);
  +        assertExpression(jc, "foo.indexOf('bar') >= 0", Boolean.FALSE);
  +        assertExpression(jc, "foo.indexOf('bar') < 0", Boolean.TRUE);
       }
   
   
  
  
  

---------------------------------------------------------------------
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