Package org.apache.flex.compiler.tree.mxml

Examples of org.apache.flex.compiler.tree.mxml.IMXMLNumberNode


  {
    String[] code = new String[]
    {
        "<fx:Number> NaN </fx:Number>"
    };
    IMXMLNumberNode node = getMXMLNumberNode(code);
    assertThat("getValue", node.getValue(), is(Double.NaN));
    //assertThat("getExpressionNode", node.getExpressionNode(), is((IASNode)null));
  }


  {
    String[] code = new String[]
    {
        "<fx:Number> Infinity </fx:Number>"
    };
    IMXMLNumberNode node = getMXMLNumberNode(code);
    assertThat("getValue", node.getValue(), is(Double.POSITIVE_INFINITY));
    //assertThat("getExpressionNode", node.getExpressionNode(), is((IASNode)null));
  }

  {
    String[] code = new String[]
    {
        "<fx:Number> -Infinity </fx:Number>"
    };
    IMXMLNumberNode node = getMXMLNumberNode(code);
    assertThat("getValue", node.getValue(), is(Double.NEGATIVE_INFINITY));
    //assertThat("getExpressionNode", node.getExpressionNode(), is((IASNode)null));
  }

  {
    String[] code = new String[]
    {
        "<fx:Number>{a.b}</fx:Number>"
    };
    IMXMLNumberNode node = getMXMLNumberNode(code);
    assertThat("databinding node", node.getExpressionNode().getNodeID(), is(ASTNodeID.MXMLDataBindingID));
    testExpressionLocation(node, 11, 16);
    assertThat("databinding node child count", node.getExpressionNode().getChildCount(), is(1));
    assertThat("identifier node", node.getExpressionNode().getChild(0).getNodeID(), is(ASTNodeID.MemberAccessExpressionID));
  }

TOP

Related Classes of org.apache.flex.compiler.tree.mxml.IMXMLNumberNode

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.