geirm       2003/12/18 08:10:58

  Modified:    jexl/src/test/org/apache/commons/jexl JexlTest.java
  Log:
  more tests for recent changes to +
  
  Revision  Changes    Path
  1.33      +31 -2     
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.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- JexlTest.java     9 Oct 2003 21:28:57 -0000       1.32
  +++ JexlTest.java     18 Dec 2003 16:10:57 -0000      1.33
  @@ -543,6 +543,33 @@
           o = e.evaluate(jc);
           assertEquals("o incorrect", new Double(4.8 % 3), o);
   
  +        /*
  +         * test to ensure new string cat works
  +         */
  +
  +        e = ExpressionFactory.createExpression("stringy + 2");
  +
  +        jc.getVars().put("stringy", "thingy" );
  +
  +        o = e.evaluate(jc);
  +        assertTrue("o not instanceof String", o instanceof String);
  +        assertEquals("o incorrect", "thingy2", o);
  +
  +        /*
  +         * test new null coersion
  +         */
  +
  +        e = ExpressionFactory.createExpression("imanull + 2");
  +
  +        jc.getVars().put("imanull", null );
  +
  +        o = e.evaluate(jc);
  +        assertEquals("o incorrect", new Long(2), o);
  +
  +        e = ExpressionFactory.createExpression("imanull + imanull");
  +        o = e.evaluate(jc);
  +        assertEquals("o incorrect", new Long(0), o);
  +
       }
   
       /**
  @@ -642,9 +669,11 @@
   
   
       /**
  +      *  GMJ : disabled - need to fix
  +      *
         *  test some simple conditions
         */
  -    public void testNotConditionsWithDots()
  +    public void dontDoTestNotConditionsWithDots()
            throws Exception
       {
           Expression e = ExpressionFactory.createExpression("x.a == true");
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to