Package com.google.template.soy.exprtree.OperatorNodes

Examples of com.google.template.soy.exprtree.OperatorNodes.MinusOpNode.addChild()



  public void testInterfaceImplementation() throws SoySyntaxException {

    MinusOpNode expr = new MinusOpNode();
    expr.addChild(new IntegerNode(17));

    DataRefNode dataRef = new DataRefNode(false, false, "boo");
    expr.addChild(dataRef);

    IncompleteEvalVisitor iev = new IncompleteEvalVisitor(ImmutableMap.of("boo", 13.0));
View Full Code Here


    MinusOpNode expr = new MinusOpNode();
    expr.addChild(new IntegerNode(17));

    DataRefNode dataRef = new DataRefNode(false, false, "boo");
    expr.addChild(dataRef);

    IncompleteEvalVisitor iev = new IncompleteEvalVisitor(ImmutableMap.of("boo", 13.0));
    assertEquals(4.0, iev.exec(expr));

    expr.replaceChild(0, new IntegerNode(34));
View Full Code Here


  public void testNotImplemented() throws SoySyntaxException {

    MinusOpNode expr = new MinusOpNode();
    expr.addChild(new FloatNode(17.0));

    DataRefNode dataRef = new DataRefNode(false, false, "boo");
    expr.addChild(dataRef);

    IncompleteEvalVisitor iev = new IncompleteEvalVisitor(ImmutableMap.of("boo", 13.0));
View Full Code Here

    MinusOpNode expr = new MinusOpNode();
    expr.addChild(new FloatNode(17.0));

    DataRefNode dataRef = new DataRefNode(false, false, "boo");
    expr.addChild(dataRef);

    IncompleteEvalVisitor iev = new IncompleteEvalVisitor(ImmutableMap.of("boo", 13.0));

    try {
      iev.exec(expr);
View Full Code Here

    n1.addChild(n3);
    // Child of n3.
    n3.addChild(x);
    // Children of n2.
    NegativeOpNode n4 = new NegativeOpNode();
    n2.addChild(n4);
    n2.addChild(x);
    // Child of n4.
    MinusOpNode n5 = new MinusOpNode();
    n4.addChild(n5);
    // Children of n5.
View Full Code Here

    // Child of n3.
    n3.addChild(x);
    // Children of n2.
    NegativeOpNode n4 = new NegativeOpNode();
    n2.addChild(n4);
    n2.addChild(x);
    // Child of n4.
    MinusOpNode n5 = new MinusOpNode();
    n4.addChild(n5);
    // Children of n5.
    n5.addChild(x);
View Full Code Here

    n2.addChild(x);
    // Child of n4.
    MinusOpNode n5 = new MinusOpNode();
    n4.addChild(n5);
    // Children of n5.
    n5.addChild(x);
    n5.addChild(x);

    assertEquals("$x - -$x - (-($x - $x) - $x)", n0.toSourceString());
  }
View Full Code Here

    // Child of n4.
    MinusOpNode n5 = new MinusOpNode();
    n4.addChild(n5);
    // Children of n5.
    n5.addChild(x);
    n5.addChild(x);

    assertEquals("$x - -$x - (-($x - $x) - $x)", n0.toSourceString());
  }

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.