You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/01/04 19:38:26 UTC
[royale-compiler] branch develop updated: refactor these tests to
try to enforce test order
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
The following commit(s) were added to refs/heads/develop by this push:
new b4ae3be refactor these tests to try to enforce test order
b4ae3be is described below
commit b4ae3be4f2b8290dd46a2413314353bc06a47480
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Jan 4 11:38:12 2018 -0800
refactor these tests to try to enforce test order
---
...MavenTestSWCs.java => AAAMavenTestExternc.java} | 71 +---------------------
compiler/src/test/java/aa/AAMavenTestSWCs.java | 23 -------
2 files changed, 3 insertions(+), 91 deletions(-)
diff --git a/compiler/src/test/java/aa/AAMavenTestSWCs.java b/compiler/src/test/java/aa/AAAMavenTestExternc.java
similarity index 55%
copy from compiler/src/test/java/aa/AAMavenTestSWCs.java
copy to compiler/src/test/java/aa/AAAMavenTestExternc.java
index 5018e3d..66b1e60 100644
--- a/compiler/src/test/java/aa/AAMavenTestSWCs.java
+++ b/compiler/src/test/java/aa/AAAMavenTestExternc.java
@@ -50,40 +50,14 @@ import org.junit.Test;
* Base class for AS feature tests which compile AS code with MXMLC and run it in the standalone Flash Player.
* Copied and modified from MXMLFeatureTestsBase.java
*/
-public class AAMavenTestSWCs
+public class AAAMavenTestExternc
{
private static boolean generateResultFile = false;
- public AAMavenTestSWCs()
+ public AAAMavenTestExternc()
{
}
- private void compileSWC(File outputFile, File configFile)
- {
- // Write the MXML into a temp file.
- ITestAdapter testAdapter = TestAdapterFactory.getTestAdapter();
-
- String output = outputFile.getAbsolutePath();
-
- String[] args = new String[]
- {
- "-load-config+=" + configFile.getAbsolutePath(),
- "-output=" + output
- };
-
- // Run the COMPC client with the specified command line.
- COMPC compc = new COMPC();
- compc.mainNoExit(args);
-
- // Check that the SWC compiled cleanly.
- List<ICompilerProblem> problems = new ArrayList<ICompilerProblem>();
- for (ICompilerProblem problem : compc.getProblems().getFilteredProblems())
- {
- problems.add(problem);
- }
- assertThat(problems.size(), is(0));
- }
-
@Test
public void AAMavenTestSWCs_AA_JS_EXTERNC()
{
@@ -105,45 +79,6 @@ public class AAMavenTestSWCs
problems.add(problem);
}
assertThat(problems.size(), is(0));
- }
-
- @Test
- public void AAMavenTestSWCs_AB_JS_SWC()
- {
- // Write the MXML into a temp file.
- ITestAdapter testAdapter = TestAdapterFactory.getTestAdapter();
-
- File externcDir = new File(testAdapter.getUnitTestBaseDir(), "../../../compiler-externc");
- File outputFile = new File(externcDir, "target/js.swc");
- try {
- FileUtils.copyFile(new File(externcDir, "src/test/config/compile-as-config.xml"),
- new File(externcDir, "target/compile-as-config.xml"));
- }
- catch (IOException e)
- {
- }
-
- compileSWC(outputFile, new File(externcDir, "target/compile-as-config.xml"));
- assertThat(outputFile.exists(), is(true));
- }
-
- @Test
- public void AC_Custom_SWC()
- {
- // Write the MXML into a temp file.
- ITestAdapter testAdapter = TestAdapterFactory.getTestAdapter();
-
- File baseDir = new File(testAdapter.getUnitTestBaseDir(), "../../../compiler");
- File outputFile = new File(baseDir, "target/custom.swc");
- try {
- FileUtils.copyFile(new File(baseDir, "src/test/config/compile-as-config.xml"),
- new File(baseDir, "target/compile-as-config.xml"));
- }
- catch (IOException e)
- {
- }
- compileSWC(outputFile, new File(baseDir, "target/compile-as-config.xml"));
- assertThat(outputFile.exists(), is(true));
- }
+ }
}
diff --git a/compiler/src/test/java/aa/AAMavenTestSWCs.java b/compiler/src/test/java/aa/AAMavenTestSWCs.java
index 5018e3d..0475b5d 100644
--- a/compiler/src/test/java/aa/AAMavenTestSWCs.java
+++ b/compiler/src/test/java/aa/AAMavenTestSWCs.java
@@ -85,29 +85,6 @@ public class AAMavenTestSWCs
}
@Test
- public void AAMavenTestSWCs_AA_JS_EXTERNC()
- {
- // Write the MXML into a temp file.
- ITestAdapter testAdapter = TestAdapterFactory.getTestAdapter();
-
- File externcDir = new File(testAdapter.getUnitTestBaseDir(), "../../../compiler-externc");
-
- String[] args = new String[1];
- args[0] = "-load-config+=" + new File(externcDir, "src/test/config/externc-config.xml").getAbsolutePath();
- // Run the COMPC client with the specified command line.
- EXTERNC externc = new EXTERNC();
- externc._mainNoExit(args);
-
- // Check that the SWC compiled cleanly.
- List<ICompilerProblem> problems = new ArrayList<ICompilerProblem>();
- for (ICompilerProblem problem : externc.problems.getFilteredProblems())
- {
- problems.add(problem);
- }
- assertThat(problems.size(), is(0));
- }
-
- @Test
public void AAMavenTestSWCs_AB_JS_SWC()
{
// Write the MXML into a temp file.
--
To stop receiving notification emails like this one, please contact
['"commits@royale.apache.org" <co...@royale.apache.org>'].