incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gordonsm...@apache.org
Subject svn commit: r1405181 - /incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLXMLListNodeTests.java
Date Fri, 02 Nov 2012 22:06:32 GMT
Author: gordonsmith
Date: Fri Nov  2 22:06:32 2012
New Revision: 1405181

URL: http://svn.apache.org/viewvc?rev=1405181&view=rev
Log:
Falcon: Added one nontrivial test for parsing <XMLList> tag.

Modified:
    incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLXMLListNodeTests.java

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=1405181&r1=1405180&r2=1405181&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 22:06:32 2012
@@ -23,8 +23,8 @@ import static org.hamcrest.core.Is.is;
 import static org.junit.Assert.assertThat;
 
 import org.apache.flex.compiler.tree.ASTNodeID;
-import org.apache.flex.compiler.tree.mxml.IMXMLXMLListNode;
 import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLXMLListNode;
 import org.junit.Test;
 
 /**
@@ -34,6 +34,8 @@ import org.junit.Test;
  */
 public class MXMLXMLListNodeTests extends MXMLInstanceNodeTests
 {
+	private static String EOL = "\n\t\t";
+	
 	private IMXMLXMLListNode getMXMLXMLListNode(String code)
 	{
 		IMXMLFileNode fileNode = getMXMLFileNode(code);
@@ -66,4 +68,17 @@ public class MXMLXMLListNodeTests extend
 		IMXMLXMLListNode node = getMXMLXMLListNode(code);
 		assertThat("getChildCount", node.getChildCount(), is(0));
 	}
+
+	@Test
+	public void MXMLXMLListNode_two_empty_tags()
+	{
+		String code =
+			"<fx:XMLList>" + EOL +
+		    "    <a/>" + EOL +
+		    "    <b/>" + EOL +
+			"</fx:XMLList>";
+		IMXMLXMLListNode node = getMXMLXMLListNode(code);
+		assertThat("getChildCount", node.getChildCount(), is(0));
+		assertThat("getXMLString", node.getXMLString(), is("<a/><b/>"));
+	}
 }



Mime
View raw message