You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by go...@apache.org on 2012/11/03 00:39:30 UTC
svn commit: r1405215 -
/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/
Author: gordonsmith
Date: Fri Nov 2 23:39:29 2012
New Revision: 1405215
URL: http://svn.apache.org/viewvc?rev=1405215&view=rev
Log:
Falcon: Added parsing tests for a simple databinding expression inside of <Array>, <Boolean>, <Class>, <Function>, <Int>, <Number>, <Object>, <RegExp>, <String>, <Uint>, <Vector>, <XML>, and <XMLList>. Several of these are marked @Ignore because they fail.
Modified:
incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLArrayNodeTests.java
incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLBooleanNodeTests.java
incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLClassNodeTests.java
incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLFunctionNodeTests.java
incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLIntNodeTests.java
incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLNumberNodeTests.java
incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLObjectNodeTests.java
incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLRegExpNodeTests.java
incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLStringNodeTests.java
incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLUintNodeTests.java
incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLVectorNodeTests.java
incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLXMLListNodeTests.java
incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLXMLNodeTests.java
Modified: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLArrayNodeTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLArrayNodeTests.java?rev=1405215&r1=1405214&r2=1405215&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLArrayNodeTests.java (original)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLArrayNodeTests.java Fri Nov 2 23:39:29 2012
@@ -111,4 +111,14 @@ public class MXMLArrayNodeTests extends
assertThat("[1][0]", ((IMXMLIntNode)node.getChild(1).getChild(0)).getValue(), is(3));
assertThat("[1][1]", ((IMXMLIntNode)node.getChild(1).getChild(1)).getValue(), is(4));
}
+
+ @Test
+ public void MXMLArrayNode_with_databinding()
+ {
+ String code = "<fx:Array>{a.b}</fx:Array>";
+ IMXMLArrayNode node = getMXMLArrayNode(code);
+ assertThat("databinding node", node.getChild(0).getNodeID(), is(ASTNodeID.MXMLDataBindingID));
+ assertThat("databinding node child count", node.getChild(0).getChildCount(), is(1));
+ assertThat("identifier node", node.getChild(0).getChild(0).getNodeID(), is(ASTNodeID.MemberAccessExpressionID));
+ }
}
Modified: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLBooleanNodeTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLBooleanNodeTests.java?rev=1405215&r1=1405214&r2=1405215&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLBooleanNodeTests.java (original)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLBooleanNodeTests.java Fri Nov 2 23:39:29 2012
@@ -200,4 +200,15 @@ public class MXMLBooleanNodeTests extend
IMXMLBooleanNode node = getMXMLBooleanNode(code);
assertThat("getValue", node.getValue(), is(true));
}
+
+ @Test
+ public void MXMLBooleanNode_with_databinding()
+ {
+ String code = "<fx:Boolean>{a.b}</fx:Boolean>";
+ IMXMLBooleanNode node = getMXMLBooleanNode(code);
+ assertThat("databinding node", node.getExpressionNode().getNodeID(), is(ASTNodeID.MXMLDataBindingID));
+ testExpressionLocation(node, 12, 17);
+ assertThat("databinding node child count", node.getExpressionNode().getChildCount(), is(1));
+ assertThat("identifier node", node.getExpressionNode().getChild(0).getNodeID(), is(ASTNodeID.MemberAccessExpressionID));
+ }
}
Modified: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLClassNodeTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLClassNodeTests.java?rev=1405215&r1=1405214&r2=1405215&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLClassNodeTests.java (original)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLClassNodeTests.java Fri Nov 2 23:39:29 2012
@@ -26,6 +26,7 @@ import org.apache.flex.compiler.definiti
import org.apache.flex.compiler.tree.ASTNodeID;
import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
import org.apache.flex.compiler.tree.mxml.IMXMLClassNode;
+import org.junit.Ignore;
import org.junit.Test;
/**
@@ -79,4 +80,16 @@ public class MXMLClassNodeTests extends
assertThat("getValue", node.getValue(project).getQualifiedName(), is("flash.display.Sprite"));
//assertThat("getExpressionNode", node.getExpressionNode(), is((IASNode)null));
}
+
+ @Ignore
+ @Test
+ public void MXMLClassNode_with_databinding()
+ {
+ String code = "<fx:Class>{a.b}</fx:Class>";
+ IMXMLClassNode node = getMXMLClassNode(code);
+ assertThat("databinding node", node.getExpressionNode().getNodeID(), is(ASTNodeID.MXMLDataBindingID));
+ testExpressionLocation(node, 10, 15);
+ assertThat("databinding node child count", node.getExpressionNode().getChildCount(), is(1));
+ assertThat("identifier node", node.getExpressionNode().getChild(0).getNodeID(), is(ASTNodeID.MemberAccessExpressionID));
+ }
}
Modified: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLFunctionNodeTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLFunctionNodeTests.java?rev=1405215&r1=1405214&r2=1405215&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLFunctionNodeTests.java (original)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLFunctionNodeTests.java Fri Nov 2 23:39:29 2012
@@ -91,4 +91,16 @@ public class MXMLFunctionNodeTests exten
assertThat("getValue", node.getValue(project).getQualifiedName(), is("flash.utils.getQualifiedClassName"));
testExpressionLocation(node, 13, 41);
}
+
+ @Ignore
+ @Test
+ public void MXMLFunctionNode_with_databinding()
+ {
+ String code = "<fx:Function>{a.b}</fx:Function>";
+ IMXMLFunctionNode node = getMXMLFunctionNode(code);
+ assertThat("databinding node", node.getExpressionNode().getNodeID(), is(ASTNodeID.MXMLDataBindingID));
+ testExpressionLocation(node, 13, 18);
+ assertThat("databinding node child count", node.getExpressionNode().getChildCount(), is(1));
+ assertThat("identifier node", node.getExpressionNode().getChild(0).getNodeID(), is(ASTNodeID.MemberAccessExpressionID));
+ }
}
Modified: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLIntNodeTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLIntNodeTests.java?rev=1405215&r1=1405214&r2=1405215&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLIntNodeTests.java (original)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLIntNodeTests.java Fri Nov 2 23:39:29 2012
@@ -144,4 +144,15 @@ public class MXMLIntNodeTests extends MX
assertThat("getValue", node.getValue(), is(0));
assertThat("getExpressionNode", node.getExpressionNode(), is((IASNode)null));
}
+
+ @Test
+ public void MXMLIntNode_with_databinding()
+ {
+ String code = "<fx:int>{a.b}</fx:int>";
+ IMXMLIntNode node = getMXMLIntNode(code);
+ assertThat("databinding node", node.getExpressionNode().getNodeID(), is(ASTNodeID.MXMLDataBindingID));
+ testExpressionLocation(node, 8, 13);
+ assertThat("databinding node child count", node.getExpressionNode().getChildCount(), is(1));
+ assertThat("identifier node", node.getExpressionNode().getChild(0).getNodeID(), is(ASTNodeID.MemberAccessExpressionID));
+ }
}
Modified: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLNumberNodeTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLNumberNodeTests.java?rev=1405215&r1=1405214&r2=1405215&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLNumberNodeTests.java (original)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLNumberNodeTests.java Fri Nov 2 23:39:29 2012
@@ -69,4 +69,15 @@ public class MXMLNumberNodeTests extends
assertThat("getValue", node.getValue(), is(Double.NaN));
//assertThat("getExpressionNode", node.getExpressionNode(), is((IASNode)null));
}
+
+ @Test
+ public void MXMLNumberNode_with_databinding()
+ {
+ String code = "<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));
+ }
}
Modified: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLObjectNodeTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLObjectNodeTests.java?rev=1405215&r1=1405214&r2=1405215&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLObjectNodeTests.java (original)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLObjectNodeTests.java Fri Nov 2 23:39:29 2012
@@ -27,6 +27,7 @@ import org.apache.flex.compiler.tree.mxm
import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
import org.apache.flex.compiler.tree.mxml.IMXMLPropertySpecifierNode;
import org.apache.flex.compiler.tree.mxml.IMXMLStringNode;
+import org.junit.Ignore;
import org.junit.Test;
/**
@@ -124,4 +125,15 @@ public class MXMLObjectNodeTests extends
assertThat("[1]name", child1.getName(), is("b"));
assertThat("[1]value", ((IMXMLStringNode)child1.getInstanceNode()).getValue(), is("yyy"));
}
+
+ @Ignore
+ @Test
+ public void MXMLObjectNode_with_databinding()
+ {
+ String code = "<fx:Object>{a.b}</fx:Object>";
+ IMXMLObjectNode node = getMXMLObjectNode(code);
+ assertThat("databinding node", node.getChild(0).getNodeID(), is(ASTNodeID.MXMLDataBindingID));
+ assertThat("databinding node child count", node.getChild(0).getChildCount(), is(1));
+ assertThat("identifier node", node.getChild(0).getChild(0).getNodeID(), is(ASTNodeID.MemberAccessExpressionID));
+ }
}
Modified: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLRegExpNodeTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLRegExpNodeTests.java?rev=1405215&r1=1405214&r2=1405215&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLRegExpNodeTests.java (original)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLRegExpNodeTests.java Fri Nov 2 23:39:29 2012
@@ -26,6 +26,7 @@ import org.apache.flex.compiler.tree.AST
import org.apache.flex.compiler.tree.as.IASNode;
import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
import org.apache.flex.compiler.tree.mxml.IMXMLRegExpNode;
+import org.junit.Ignore;
import org.junit.Test;
/**
@@ -67,4 +68,16 @@ public class MXMLRegExpNodeTests extends
IMXMLRegExpNode node = getMXMLRegExpNode(code);
assertThat("getExpressionNode", node.getExpressionNode(), is((IASNode)null));
}
+
+ @Ignore
+ @Test
+ public void MXMLRegExpNode_with_databinding()
+ {
+ String code = "<fx:RegExp>{a.b}</fx:RegExp>";
+ IMXMLRegExpNode node = getMXMLRegExpNode(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));
+ }
}
Modified: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLStringNodeTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLStringNodeTests.java?rev=1405215&r1=1405214&r2=1405215&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLStringNodeTests.java (original)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLStringNodeTests.java Fri Nov 2 23:39:29 2012
@@ -69,4 +69,15 @@ public class MXMLStringNodeTests extends
assertThat("getValue", node.getValue(), is((String)null));
//assertThat("getExpressionNode", node.getExpressionNode(), is((IASNode)null));
}
+
+ @Test
+ public void MXMLStringNode_with_databinding()
+ {
+ String code = "<fx:String>{a.b}</fx:String>";
+ IMXMLStringNode node = getMXMLStringNode(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));
+ }
}
Modified: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLUintNodeTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLUintNodeTests.java?rev=1405215&r1=1405214&r2=1405215&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLUintNodeTests.java (original)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLUintNodeTests.java Fri Nov 2 23:39:29 2012
@@ -69,4 +69,15 @@ public class MXMLUintNodeTests extends M
assertThat("getValue", node.getValue(), is(0L));
//assertThat("getExpressionNode", node.getExpressionNode(), is((IASNode)null));
}
+
+ @Test
+ public void MXMLUintNode_with_databinding()
+ {
+ String code = "<fx:uint>{a.b}</fx:uint>";
+ IMXMLUintNode node = getMXMLUintNode(code);
+ assertThat("databinding node", node.getExpressionNode().getNodeID(), is(ASTNodeID.MXMLDataBindingID));
+ testExpressionLocation(node, 9, 14);
+ assertThat("databinding node child count", node.getExpressionNode().getChildCount(), is(1));
+ assertThat("identifier node", node.getExpressionNode().getChild(0).getNodeID(), is(ASTNodeID.MemberAccessExpressionID));
+ }
}
Modified: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLVectorNodeTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLVectorNodeTests.java?rev=1405215&r1=1405214&r2=1405215&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLVectorNodeTests.java (original)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLVectorNodeTests.java Fri Nov 2 23:39:29 2012
@@ -29,6 +29,7 @@ import org.apache.flex.compiler.tree.mxm
import org.apache.flex.compiler.tree.mxml.IMXMLStringNode;
import org.apache.flex.compiler.tree.mxml.IMXMLVectorNode;
import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
+import org.junit.Ignore;
import org.junit.Test;
/**
@@ -168,4 +169,15 @@ public class MXMLVectorNodeTests extends
assertThat("[1][0]", ((IMXMLIntNode)node.getChild(1).getChild(0)).getValue(), is(3));
assertThat("[1][1]", ((IMXMLIntNode)node.getChild(1).getChild(1)).getValue(), is(4));
}
+
+ @Ignore
+ @Test
+ public void MXMLVectorNode_with_databinding()
+ {
+ String code = "<fx:Vector>{a.b}</fx:Vector>";
+ IMXMLVectorNode node = getMXMLVectorNode(code);
+ assertThat("databinding node", node.getChild(0).getNodeID(), is(ASTNodeID.MXMLDataBindingID));
+ assertThat("databinding node child count", node.getChild(0).getChildCount(), is(1));
+ assertThat("identifier node", node.getChild(0).getChild(0).getNodeID(), is(ASTNodeID.MemberAccessExpressionID));
+ }
}
Modified: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLXMLListNodeTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLXMLListNodeTests.java?rev=1405215&r1=1405214&r2=1405215&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLXMLListNodeTests.java (original)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLXMLListNodeTests.java Fri Nov 2 23:39:29 2012
@@ -25,6 +25,7 @@ import static org.junit.Assert.assertTha
import org.apache.flex.compiler.tree.ASTNodeID;
import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
import org.apache.flex.compiler.tree.mxml.IMXMLXMLListNode;
+import org.junit.Ignore;
import org.junit.Test;
/**
@@ -81,4 +82,15 @@ public class MXMLXMLListNodeTests extend
assertThat("getChildCount", node.getChildCount(), is(0));
assertThat("getXMLString", node.getXMLString(), is("<a/><b/>"));
}
+
+ @Ignore
+ @Test
+ public void MXMLXMListLNode_with_databinding()
+ {
+ String code = "<fx:XMLList>{a.b}</fx:XMLList>";
+ IMXMLXMLListNode node = getMXMLXMLListNode(code);
+ assertThat("databinding node", node.getChild(0).getNodeID(), is(ASTNodeID.MXMLDataBindingID));
+ assertThat("databinding node child count", node.getChild(0).getChildCount(), is(1));
+ assertThat("identifier node", node.getChild(0).getChild(0).getNodeID(), is(ASTNodeID.MemberAccessExpressionID));
+ }
}
Modified: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLXMLNodeTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLXMLNodeTests.java?rev=1405215&r1=1405214&r2=1405215&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLXMLNodeTests.java (original)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLXMLNodeTests.java Fri Nov 2 23:39:29 2012
@@ -25,6 +25,7 @@ import static org.junit.Assert.assertTha
import org.apache.flex.compiler.tree.ASTNodeID;
import org.apache.flex.compiler.tree.mxml.IMXMLXMLNode;
import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
+import org.junit.Ignore;
import org.junit.Test;
/**
@@ -117,4 +118,15 @@ public class MXMLXMLNodeTests extends MX
assertThat("getChildCount", node.getChildCount(), is(0));
assertThat("getXMLString", node.getXMLString(), is("<root><a b=\"xxx\"></root>")); // should single quote come back as double quote?
}
+
+ @Ignore
+ @Test
+ public void MXMLXMLNode_with_databinding()
+ {
+ String code = "<fx:XML>{a.b}</fx:XML>";
+ IMXMLXMLNode node = getMXMLXMLNode(code);
+ assertThat("databinding node", node.getChild(0).getNodeID(), is(ASTNodeID.MXMLDataBindingID));
+ assertThat("databinding node child count", node.getChild(0).getChildCount(), is(1));
+ assertThat("identifier node", node.getChild(0).getChild(0).getNodeID(), is(ASTNodeID.MemberAccessExpressionID));
+ }
}