Package org.zkoss.zss.engine.xel

Examples of org.zkoss.zss.engine.xel.Token.evaluate()


    assertEquals("18.04", x);

    expr = "=\"1\" & \"2\"^3 + 4% / 0";
    root = parser.parse(expr, null, null);
    try {
      x = root.evaluate(null);
    } catch (SSErrorXelException ex) {
      assertEquals(SSError.DIV0, ex.getSSError());
    }
    expr = "=1234567890^1E+96";
    root = parser.parse(expr, null, null);
View Full Code Here


      assertEquals(SSError.DIV0, ex.getSSError());
    }
    expr = "=1234567890^1E+96";
    root = parser.parse(expr, null, null);
    try {
      x = root.evaluate(null);
    } catch (SSErrorXelException ex) {
      assertEquals(SSError.NUM, ex.getSSError());
    }
  }
View Full Code Here

  public void testEvaluate2() {
    Token root = null;
    String expr = "=SUM(1+2+3, 4, 5)";
    root = parser.parse(expr, null, null);
    Object x = root.evaluate(getXelContext());
    assertEquals(15.0, ((Number)x).doubleValue(), 0);
  }
 
  private XelContext getXelContext() {
    Taglib taglib = new Taglib("", "/web/WEB-INF/tld/zss/function.tld");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.