incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gordonsm...@apache.org
Subject svn commit: r1405277 - /incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/
Date Sat, 03 Nov 2012 05:10:45 GMT
Author: gordonsmith
Date: Sat Nov  3 05:10:44 2012
New Revision: 1405277

URL: http://svn.apache.org/viewvc?rev=1405277&view=rev
Log:
Falcon: Added nontrivial tests for parsing event attributes and event tags. (Forgot to include
some files a few commits ago.)

Added nontrivial tests for parsing <Model> tags.

Added:
    incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLEventSpecifierNodeTests.java
  (with props)
    incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLModelNodeTests.java
  (with props)
    incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLSpecifierNodeBaseTests.java
  (with props)
Modified:
    incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLClassReferenceNodeTests.java
    incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLExpressionNodeBaseTests.java
    incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLInstanceNodeTests.java
    incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLNodeBaseTests.java

Modified: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLClassReferenceNodeTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLClassReferenceNodeTests.java?rev=1405277&r1=1405276&r2=1405277&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLClassReferenceNodeTests.java
(original)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLClassReferenceNodeTests.java
Sat Nov  3 05:10:44 2012
@@ -19,8 +19,6 @@
 
 package org.apache.flex.compiler.internal.tree.mxml;
 
-import org.junit.Test;
-
 /**
  * JUnit tests for {@link MXMLClassReferenceNode}.
  * 
@@ -28,8 +26,4 @@ import org.junit.Test;
  */
 public class MXMLClassReferenceNodeTests extends MXMLNodeBaseTests
 {
-	@Test
-	public void MXMLClassReferenceNode_placeholder()
-	{
-	}
 }

Added: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLEventSpecifierNodeTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLEventSpecifierNodeTests.java?rev=1405277&view=auto
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLEventSpecifierNodeTests.java
(added)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLEventSpecifierNodeTests.java
Sat Nov  3 05:10:44 2012
@@ -0,0 +1,166 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.internal.tree.mxml;
+
+import static org.hamcrest.core.Is.is;
+import static org.junit.Assert.assertThat;
+
+import org.apache.flex.compiler.definitions.IEventDefinition;
+import org.apache.flex.compiler.tree.ASTNodeID;
+import org.apache.flex.compiler.tree.as.IASNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLEventSpecifierNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
+import org.junit.Test;
+
+/**
+ * JUnit tests for {@link MXMLEventSpecifierNode}.
+ * 
+ * @author Gordon Smith
+ */
+public class MXMLEventSpecifierNodeTests extends MXMLSpecifierNodeBaseTests
+{
+	private IMXMLEventSpecifierNode getMXMLEventSpecifierNode(String code)
+	{
+		IMXMLFileNode fileNode = getMXMLFileNode(code);
+		IMXMLEventSpecifierNode node = (IMXMLEventSpecifierNode)findFirstDescendantOfType(fileNode,
IMXMLEventSpecifierNode.class);
+		assertThat("getNodeID", node.getNodeID(), is(ASTNodeID.MXMLEventSpecifierID));
+		assertThat("children", node.getChildCount() == node.getASNodes().length, is(true));
+		for (int i = 0; i < node.getChildCount(); i++)
+		{
+			assertThat("children", node.getChild(i) == node.getASNodes()[i], is(true));
+		}
+		return node;
+	}
+	
+	@Test
+	public void MXMLEventSpecifierNode_emptyEventAttribute1()
+	{
+		String code = "<d:Sprite xmlns:fx='http://ns.adobe.com/mxml/2009' xmlns:d='flash.display.*'
click=''/>";
+		IMXMLEventSpecifierNode node = getMXMLEventSpecifierNode(code);
+		assertThat("getName", node.getName(), is("click"));
+		assertThat("getSuffix", node.getSuffix(), is(""));
+		assertThat("getDefinition", ((IEventDefinition)node.getDefinition()).getBaseName(), is("click"));
+		IASNode[] asNodes = node.getASNodes();
+		assertThat("getASNodes", asNodes.length, is(0));
+	}
+	
+	@Test
+	public void MXMLEventSpecifierNode_emptyEventAttribute2()
+	{
+		String code = "<d:Sprite xmlns:fx='http://ns.adobe.com/mxml/2009' xmlns:d='flash.display.*'
click=' '/>";
+		IMXMLEventSpecifierNode node = getMXMLEventSpecifierNode(code);
+		assertThat("getName", node.getName(), is("click"));
+		assertThat("getSuffix", node.getSuffix(), is(""));
+		assertThat("getDefinition", ((IEventDefinition)node.getDefinition()).getBaseName(), is("click"));
+		IASNode[] asNodes = node.getASNodes();
+		assertThat("getASNodes", asNodes.length, is(0));
+	}
+	
+	@Test
+	public void MXMLEventSpecifierNode_emptyEventAttribute3()
+	{
+		String code = "<d:Sprite xmlns:fx='http://ns.adobe.com/mxml/2009' xmlns:d='flash.display.*'
click=' \t\r\n'/>";
+		IMXMLEventSpecifierNode node = getMXMLEventSpecifierNode(code);
+		assertThat("getName", node.getName(), is("click"));
+		assertThat("getSuffix", node.getSuffix(), is(""));
+		assertThat("getDefinition", ((IEventDefinition)node.getDefinition()).getBaseName(), is("click"));
+		IASNode[] asNodes = node.getASNodes();
+		assertThat("getASNodes", asNodes.length, is(0));
+	}
+	
+	@Test
+	public void MXMLEventSpecifierNode_eventAttribute_twoFunctionCalls()
+	{
+		String code = "<d:Sprite xmlns:fx='http://ns.adobe.com/mxml/2009' xmlns:d='flash.display.*'
click='trace(1); trace(2)'/>";
+		IMXMLEventSpecifierNode node = getMXMLEventSpecifierNode(code);
+		assertThat("getName", node.getName(), is("click"));
+		assertThat("getSuffix", node.getSuffix(), is(""));
+		assertThat("getDefinition", ((IEventDefinition)node.getDefinition()).getBaseName(), is("click"));
+		IASNode[] asNodes = node.getASNodes();
+		assertThat("getASNodes", asNodes.length, is(2));
+		assertThat("child 0", asNodes[0].getNodeID(), is(ASTNodeID.FunctionCallID));
+		assertThat("child 0", asNodes[1].getNodeID(), is(ASTNodeID.FunctionCallID));
+	}
+	
+	@Test
+	public void MXMLEventSpecifierNode_emptyEventTag1()
+	{
+		String code =
+			"<d:Sprite xmlns:fx='http://ns.adobe.com/mxml/2009' xmlns:d='flash.display.*'>\n"
+
+		    "    <d:click/>\n" +
+			"</d:Sprite>";
+		IMXMLEventSpecifierNode node = getMXMLEventSpecifierNode(code);
+		assertThat("getName", node.getName(), is("click"));
+		assertThat("getSuffix", node.getSuffix(), is(""));
+		assertThat("getDefinition", ((IEventDefinition)node.getDefinition()).getBaseName(), is("click"));
+		IASNode[] asNodes = node.getASNodes();
+		assertThat("getASNodes", asNodes.length, is(0));
+	}
+	
+	@Test
+	public void MXMLEventSpecifierNode_emptyEventTag2()
+	{
+		String code =
+			"<d:Sprite xmlns:fx='http://ns.adobe.com/mxml/2009' xmlns:d='flash.display.*'>\n"
+
+		    "    <d:click></d:click>\n" +
+			"</d:Sprite>";
+		IMXMLEventSpecifierNode node = getMXMLEventSpecifierNode(code);
+		assertThat("getName", node.getName(), is("click"));
+		assertThat("getSuffix", node.getSuffix(), is(""));
+		assertThat("getDefinition", ((IEventDefinition)node.getDefinition()).getBaseName(), is("click"));
+		IASNode[] asNodes = node.getASNodes();
+		assertThat("getASNodes", asNodes.length, is(0));
+	}
+	
+	@Test
+	public void MXMLEventSpecifierNode_emptyEventTag3()
+	{
+		String code =
+			"<d:Sprite xmlns:fx='http://ns.adobe.com/mxml/2009' xmlns:d='flash.display.*'>\n"
+
+		    "    <d:click> \t\r\n</d:click>\n" +
+			"</d:Sprite>";
+		IMXMLEventSpecifierNode node = getMXMLEventSpecifierNode(code);
+		assertThat("getName", node.getName(), is("click"));
+		assertThat("getSuffix", node.getSuffix(), is(""));
+		assertThat("getDefinition", ((IEventDefinition)node.getDefinition()).getBaseName(), is("click"));
+		IASNode[] asNodes = node.getASNodes();
+		assertThat("getASNodes", asNodes.length, is(0));
+	}
+	
+	@Test
+	public void MXMLEventSpecifierNode_eventTag_twoFunctionCalls()
+	{
+		String code =
+				"<d:Sprite xmlns:fx='http://ns.adobe.com/mxml/2009' xmlns:d='flash.display.*'>\n"
+
+			    "    <d:click>\n" +
+				"        trace(1);\n" +
+			    "        trace(2);\n" +
+			    "    </d:click>\n" +
+				"</d:Sprite/>";
+		IMXMLEventSpecifierNode node = getMXMLEventSpecifierNode(code);
+		assertThat("getName", node.getName(), is("click"));
+		assertThat("getSuffix", node.getSuffix(), is(""));
+		assertThat("getDefinition", ((IEventDefinition)node.getDefinition()).getBaseName(), is("click"));
+		IASNode[] asNodes = node.getASNodes();
+		assertThat("getASNodes", asNodes.length, is(2));
+		assertThat("child 0", asNodes[0].getNodeID(), is(ASTNodeID.FunctionCallID));
+		assertThat("child 0", asNodes[1].getNodeID(), is(ASTNodeID.FunctionCallID));
+	}
+}

Propchange: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLEventSpecifierNodeTests.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLExpressionNodeBaseTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLExpressionNodeBaseTests.java?rev=1405277&r1=1405276&r2=1405277&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLExpressionNodeBaseTests.java
(original)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLExpressionNodeBaseTests.java
Sat Nov  3 05:10:44 2012
@@ -24,7 +24,6 @@ import static org.junit.Assert.assertTha
 
 import org.apache.flex.compiler.tree.as.IASNode;
 import org.apache.flex.compiler.tree.mxml.IMXMLExpressionNode;
-import org.junit.Test;
 
 /**
  * JUnit tests for {@link MXMLExpressionNodeBase}.
@@ -36,12 +35,8 @@ public class MXMLExpressionNodeBaseTests
 	protected void testExpressionLocation(IMXMLExpressionNode node, int expectedStart, int expectedEnd)
 	{
 		IASNode expressionNode = node.getExpressionNode();
-		assertThat(expressionNode.getStart(), is(PREFIX.length() + expectedStart));
-		assertThat(expressionNode.getEnd(), is(PREFIX.length() + expectedEnd));
-	}
-	
-	@Test
-	public void MXMLExpressionNodeBase_placeholder()
-	{
+		int prefixLength = getPrefix().length();
+		assertThat(expressionNode.getStart(), is(prefixLength + expectedStart));
+		assertThat(expressionNode.getEnd(), is(prefixLength + expectedEnd));
 	}
 }

Modified: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLInstanceNodeTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLInstanceNodeTests.java?rev=1405277&r1=1405276&r2=1405277&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLInstanceNodeTests.java
(original)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLInstanceNodeTests.java
Sat Nov  3 05:10:44 2012
@@ -20,7 +20,6 @@
 package org.apache.flex.compiler.internal.tree.mxml;
 
 import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
-import org.junit.Test;
 
 /**
  * JUnit tests for {@link MXMLInstanceNode}.
@@ -29,24 +28,23 @@ import org.junit.Test;
  */
 public class MXMLInstanceNodeTests extends MXMLClassReferenceNodeTests
 {
-	protected static String PREFIX =
-		"<d:Sprite xmlns:fx='http://ns.adobe.com/mxml/2009' xmlns:d='flash.display.*'>\n"
+
-	    "    <fx:Declarations>\n" +
-		"        ";
+	protected String getPrefix()
+	{
+		return "<d:Sprite xmlns:fx='http://ns.adobe.com/mxml/2009' xmlns:d='flash.display.*'>\n"
+
+	           "    <fx:Declarations>\n" +
+		       "        ";
+	}
 			
-    protected static String POSTFIX =
-		"\n" +
-		"    </fx:Declarations>\n" +
-		"</d:Sprite>";
+    protected String getPostfix()
+    {
+    	return "\n" +
+		       "    </fx:Declarations>\n" +
+		       "</d:Sprite>";
+    }
     
     @Override
     protected IMXMLFileNode getMXMLFileNode(String code)
     {
-    	return super.getMXMLFileNode(PREFIX + code + POSTFIX);
+    	return super.getMXMLFileNode(getPrefix() + code + getPostfix());
     }
-    
-	@Test
-	public void MXMLInstanceNodeBase_placeholder()
-	{
-	}
 }

Added: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLModelNodeTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLModelNodeTests.java?rev=1405277&view=auto
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLModelNodeTests.java
(added)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLModelNodeTests.java
Sat Nov  3 05:10:44 2012
@@ -0,0 +1,128 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.internal.tree.mxml;
+
+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.IMXMLFileNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLModelNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLModelPropertyContainerNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLModelRootNode;
+import org.junit.Test;
+
+/**
+ * JUnit tests for {@link MXMLModelNode}.
+ * 
+ * @author Gordon Smith
+ */
+public class MXMLModelNodeTests extends MXMLExpressionNodeBaseTests
+{
+	private static String EOL = "\n\t\t";
+	
+	private IMXMLModelNode getMXMLModelNode(String code)
+	{
+		IMXMLFileNode fileNode = getMXMLFileNode(code);
+		IMXMLModelNode node = (IMXMLModelNode)findFirstDescendantOfType(fileNode, IMXMLModelNode.class);
+		assertThat("getNodeID", node.getNodeID(), is(ASTNodeID.MXMLModelID));
+		assertThat("getName", node.getName(), is("Model"));
+		return node;
+	}
+	
+	@Test
+	public void MXMLModelNode_empty1()
+	{
+		String code = "<fx:Model/>";
+		IMXMLModelNode node = getMXMLModelNode(code);
+		assertThat("getChildCount", node.getChildCount(), is(0));
+		assertThat("getRootNode", node.getRootNode(), is((IMXMLModelRootNode)null));
+	}
+	
+	@Test
+	public void MXMLModelNode_empty2()
+	{
+		String code = "<fx:Model></fx:Model>";
+		IMXMLModelNode node = getMXMLModelNode(code);
+		assertThat("getChildCount", node.getChildCount(), is(0));
+		assertThat("getRootNode", node.getRootNode(), is((IMXMLModelRootNode)null));
+	}
+
+	@Test
+	public void MXMLModelNode_empty3()
+	{
+		String code = "<fx:Model> \t\r\n</fx:Model>";
+		IMXMLModelNode node = getMXMLModelNode(code);
+		assertThat("getChildCount", node.getChildCount(), is(0));
+		assertThat("getRootNode", node.getRootNode(), is((IMXMLModelRootNode)null));
+	}
+	
+	@Test
+	public void MXMLModelNode_emptyRoot()
+	{
+		String code =
+			"<fx:Model>" + EOL +
+		    "    <root/>" + EOL +
+			"</fx:Model>";
+		IMXMLModelNode node = getMXMLModelNode(code);
+		assertThat("getChildCount", node.getChildCount(), is(1));
+		IMXMLModelRootNode rootNode = node.getRootNode();
+		assertThat("index", rootNode.getIndex(), is(IMXMLModelPropertyContainerNode.NO_INDEX));
+		assertThat("property nodes", rootNode.getPropertyNodes().length, is(0));
+	}
+	
+	@Test
+	public void MXMLModelNode_oneTag()
+	{
+		String code =
+			"<fx:Model>" + EOL +
+		    "    <root>" + EOL +
+		    "        <a/>" + EOL +
+		    "    </root>" + EOL +
+			"</fx:Model>";
+		IMXMLModelNode node = getMXMLModelNode(code);
+		assertThat("getChildCount", node.getChildCount(), is(1));
+		IMXMLModelRootNode rootNode = node.getRootNode();
+		assertThat("index", rootNode.getIndex(), is(IMXMLModelPropertyContainerNode.NO_INDEX));
+		assertThat("property nodes", rootNode.getPropertyNodes().length, is(1));
+		assertThat("a count", rootNode.getPropertyNodes("a").length, is(1));
+	}
+	
+	@Test
+	public void MXMLModelNode_fourTags()
+	{
+		String code =
+			"<fx:Model>" + EOL +
+		    "    <root>" + EOL +
+		    "        <a/>" + EOL +
+		    "        <b/>" + EOL +
+		    "        <a/>" + EOL +
+		    "        <b/>" + EOL +
+		    "    </root>" + EOL +
+			"</fx:Model>";
+		IMXMLModelNode node = getMXMLModelNode(code);
+		assertThat("getChildCount", node.getChildCount(), is(1));
+		IMXMLModelRootNode rootNode = node.getRootNode();
+		assertThat("index", rootNode.getIndex(), is(IMXMLModelPropertyContainerNode.NO_INDEX));
+		assertThat("property nodes", rootNode.getPropertyNodes().length, is(4));
+		assertThat("a count", rootNode.getPropertyNodes("a").length, is(2));
+		assertThat("b count", rootNode.getPropertyNodes("a").length, is(2));
+	}
+}

Propchange: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLModelNodeTests.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLNodeBaseTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLNodeBaseTests.java?rev=1405277&r1=1405276&r2=1405277&view=diff
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLNodeBaseTests.java
(original)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLNodeBaseTests.java
Sat Nov  3 05:10:44 2012
@@ -28,6 +28,7 @@ import java.util.Collection;
 import java.util.List;
 
 import org.apache.flex.compiler.internal.projects.FlexProject;
+import org.apache.flex.compiler.internal.projects.FlexProjectConfigurator;
 import org.apache.flex.compiler.internal.units.SourceCompilationUnitFactory;
 import org.apache.flex.compiler.internal.workspaces.Workspace;
 import org.apache.flex.compiler.mxml.IMXMLNamespaceMapping;
@@ -71,6 +72,7 @@ public class MXMLNodeBaseTests
 	protected IMXMLFileNode getMXMLFileNode(String code)
 	{
 		project = new FlexProject(workspace);
+		FlexProjectConfigurator.configure(project);
 		
 		String tempDir = FilenameNormalization.normalize("temp"); // ensure this exists
 				
@@ -96,6 +98,7 @@ public class MXMLNodeBaseTests
 		// Compile the code against playerglobal.swc.
 		List<File> libraries = new ArrayList<File>();
 		libraries.add(new File(SDK + "\\frameworks\\libs\\player\\11.1\\playerglobal.swc"));
+		libraries.add(new File(SDK + "\\frameworks\\libs\\framework.swc"));
 		project.setLibraries(libraries);
 		
 		// Use the MXML 2009 manifest.

Added: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLSpecifierNodeBaseTests.java
URL: http://svn.apache.org/viewvc/incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLSpecifierNodeBaseTests.java?rev=1405277&view=auto
==============================================================================
--- incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLSpecifierNodeBaseTests.java
(added)
+++ incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLSpecifierNodeBaseTests.java
Sat Nov  3 05:10:44 2012
@@ -0,0 +1,30 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.internal.tree.mxml;
+
+/**
+ * JUnit tests for {@link MXMLSpecifierNodeBase}.
+ * 
+ * @author Gordon Smith
+ */
+public class MXMLSpecifierNodeBaseTests extends MXMLNodeBaseTests
+{
+
+}

Propchange: incubator/flex/falcon/trunk/compiler.tests/unit-tests/org/apache/flex/compiler/internal/tree/mxml/MXMLSpecifierNodeBaseTests.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message