This is an automated email from the ASF dual-hosted git repository. aharui pushed a commit to branch release/0.9.0 in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit 6339dff3bdf21ce7753e9ef6f6059f3f6c0c694b Author: Alex Harui <[email protected]> AuthorDate: Wed Jan 3 16:10:08 2018 -0800 refactor tests to try to enforce test order --- compiler/pom.xml | 1 + ...MavenTestSWCs.java => AAAMavenTestExternc.java} | 71 +--------------------- compiler/src/test/java/aa/AAMavenTestSWCs.java | 23 ------- 3 files changed, 4 insertions(+), 91 deletions(-) diff --git a/compiler/pom.xml b/compiler/pom.xml index 8feba27..73f28f3 100644 --- a/compiler/pom.xml +++ b/compiler/pom.xml @@ -315,6 +315,7 @@ <configuration> <runOrder>alphabetical</runOrder> <includes> + <include>**/AAAMavenTestExternc.java</include> <include>**/AAMavenTestSWCs.java</include> <include>**/*Tests.java</include> </includes> 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..b9600b3 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 "[email protected]" <[email protected]>.
