You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2016/04/12 09:35:28 UTC
git commit: [flex-falcon] [refs/heads/develop] - - Continued making
the Unit-Tests use the TestAdapters
Repository: flex-falcon
Updated Branches:
refs/heads/develop b113ff96c -> 17a315a36
- Continued making the Unit-Tests use the TestAdapters
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/17a315a3
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/17a315a3
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/17a315a3
Branch: refs/heads/develop
Commit: 17a315a3674e3cfde1b51a82897b6d7213466556
Parents: b113ff9
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Tue Apr 12 09:35:07 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Tue Apr 12 09:35:07 2016 +0200
----------------------------------------------------------------------
.../compiler/internal/test/MXMLTestBase.java | 31 +++++++++-----------
1 file changed, 14 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/17a315a3/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/MXMLTestBase.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/MXMLTestBase.java b/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/MXMLTestBase.java
index 5a62d03..eee073c 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/MXMLTestBase.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/test/MXMLTestBase.java
@@ -27,18 +27,23 @@ import org.apache.flex.compiler.internal.mxml.MXMLNamespaceMapping;
import org.apache.flex.compiler.mxml.IMXMLNamespaceMapping;
import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
import org.apache.flex.compiler.tree.mxml.IMXMLNode;
-import org.apache.flex.utils.FilenameNormalization;
+import org.apache.flex.utils.ITestAdapter;
+import org.apache.flex.utils.TestAdapterFactory;
import org.junit.Ignore;
@Ignore
public class MXMLTestBase extends TestBase
{
+ protected ITestAdapter testAdapter;
+
@Override
public void setUp()
{
super.setUp();
+ testAdapter = TestAdapterFactory.getTestAdapter();
+
asEmitter = backend.createEmitter(writer);
mxmlEmitter = backend.createMXMLEmitter(writer);
@@ -50,14 +55,7 @@ public class MXMLTestBase extends TestBase
@Override
protected void addLibraries(List<File> libraries)
{
- libraries.add(new File(FilenameNormalization.normalize(env.FPSDK
- + "/" + env.FPVER + "/playerglobal.swc")));
- libraries.add(new File(FilenameNormalization.normalize(env.SDK
- + "/frameworks/libs/framework.swc")));
- libraries.add(new File(FilenameNormalization.normalize(env.SDK
- + "/frameworks/libs/mx.swc")));
- libraries.add(new File(FilenameNormalization.normalize(env.SDK
- + "/frameworks/libs/spark.swc")));
+ libraries.addAll(testAdapter.getLibraries(true));
super.addLibraries(libraries);
}
@@ -66,16 +64,15 @@ public class MXMLTestBase extends TestBase
protected void addNamespaceMappings(
List<IMXMLNamespaceMapping> namespaceMappings)
{
- namespaceMappings
- .add(new MXMLNamespaceMapping("http://ns.adobe.com/mxml/2009",
- new File(env.SDK, "frameworks/mxml-2009-manifest.xml")
- .getAbsolutePath()));
namespaceMappings.add(new MXMLNamespaceMapping(
- "library://ns.adobe.com/flex/mx", new File(env.SDK,
- "frameworks/mx-manifest.xml").getAbsolutePath()));
+ "http://ns.adobe.com/mxml/2009",
+ testAdapter.getFlexManifestPath("mxml-2009")));
+ namespaceMappings.add(new MXMLNamespaceMapping(
+ "library://ns.adobe.com/flex/mx",
+ testAdapter.getFlexManifestPath("mx")));
namespaceMappings.add(new MXMLNamespaceMapping(
- "library://ns.adobe.com/flex/spark", new File(env.SDK,
- "frameworks/spark-manifest.xml").getAbsolutePath()));
+ "library://ns.adobe.com/flex/spark",
+ testAdapter.getFlexManifestPath("spark")));
super.addNamespaceMappings(namespaceMappings);
}