Package org.yaac.server.egql.evaluator

Examples of org.yaac.server.egql.evaluator.DivideEvaluator


  @Test
  public void testMult() throws Exception {
    Assert.assertEquals(new MultiplyEvaluator(new DecimalEvaluator("1"), new DecimalEvaluator("2")),
        parser("1*2").mult().e);
   
    Assert.assertEquals(new DivideEvaluator(new DecimalEvaluator("1"), new DecimalEvaluator("2")),
        parser("1/2").mult().e);
   
    Assert.assertEquals(new DivideEvaluator(new NegationEvaluator(new DecimalEvaluator("1")), new DecimalEvaluator("2")),
        parser("-1 / 2").mult().e);
   
    Assert.assertEquals(new MultiplyEvaluator(new MultiplyEvaluator(
        new DecimalEvaluator("1"), new DecimalEvaluator("2")), new DecimalEvaluator("3")),
        parser("1*2*3").mult().e);
   
    Assert.assertEquals(new DivideEvaluator(
        new NegationEvaluator(new DecimalEvaluator("1")),
        new NegationEvaluator(new DecimalEvaluator("2"))),
        parser("---1/+-+2").mult().e);
  }
View Full Code Here

TOP

Related Classes of org.yaac.server.egql.evaluator.DivideEvaluator

Copyright © 2018 www.massapicom. 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.