From c8e951296c5f95e82d4c7c3f8eb9b0a647014e20 Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Mon, 6 Oct 2014 17:35:51 -0700 Subject: Fix 436653: conditional aspect activation plus various polish Modified test expectation system so it is possible to say the test cares about one particular message and the rest do not matter (prefix message string with '*') - crude but quick. Polished many places to exploit generics Upgraded all the tests to work on Java8 - some serious changes regarding ajdoc on Java8. Hopefully it has stayed backwards compatible with earlier JDK versions (e.g. if using AspectJ 1.8.3+ with a JDK less than 8) but no explicit testing done for this. --- .../aspectj/systemtest/ajc150/ltw/LTWTests.java | 6 +- tests/src/org/aspectj/systemtest/ajc170/ajc170.xml | 14 ++-- tests/src/org/aspectj/systemtest/ajc173/ajc173.xml | 2 +- .../org/aspectj/systemtest/ajc183/Ajc183Tests.java | 32 ++++++++ tests/src/org/aspectj/systemtest/ajc183/ajc183.xml | 87 ++++++++++++++++++++++ .../incremental/tools/AjdeInteractionTestbed.java | 2 +- .../tools/MultiProjTestCompilerConfiguration.java | 20 ++--- 7 files changed, 141 insertions(+), 22 deletions(-) (limited to 'tests/src') diff --git a/tests/src/org/aspectj/systemtest/ajc150/ltw/LTWTests.java b/tests/src/org/aspectj/systemtest/ajc150/ltw/LTWTests.java index 443018bb6..ff9e59339 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ltw/LTWTests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/ltw/LTWTests.java @@ -119,9 +119,9 @@ public class LTWTests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("JDK14 LTW with XML"); } - public void testJ14LTWWithASPECTPATH() { - runTest("JDK14 LTW with ASPECTPATH"); - } +// public void testJ14LTWWithASPECTPATH() { +// runTest("JDK14 LTW with ASPECTPATH"); +// } //public void testDiscardingWovenTypes() { diff --git a/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml b/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml index 6e95476ed..37963fc15 100644 --- a/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml +++ b/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml @@ -181,10 +181,10 @@ - + - - + + @@ -199,13 +199,13 @@ - - - + + + - + diff --git a/tests/src/org/aspectj/systemtest/ajc173/ajc173.xml b/tests/src/org/aspectj/systemtest/ajc173/ajc173.xml index f882d71c7..7c2b88a54 100644 --- a/tests/src/org/aspectj/systemtest/ajc173/ajc173.xml +++ b/tests/src/org/aspectj/systemtest/ajc173/ajc173.xml @@ -9,7 +9,7 @@ - + diff --git a/tests/src/org/aspectj/systemtest/ajc183/Ajc183Tests.java b/tests/src/org/aspectj/systemtest/ajc183/Ajc183Tests.java index ed7c74aee..412fc00eb 100644 --- a/tests/src/org/aspectj/systemtest/ajc183/Ajc183Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc183/Ajc183Tests.java @@ -21,6 +21,38 @@ import org.aspectj.testing.XMLBasedAjcTestCase; */ public class Ajc183Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + public void testSuppressTypeNotFound_436653() { + runTest("suppress type not found"); + } + + public void testSuppressTypeNotFound_436653_2() { + runTest("suppress type not found 2"); + } + + public void testSuppressTypeNotFound_436653_3() { + runTest("suppress type not found 3"); + } + + public void testSuppressTypeNotFound_436653_4() { + runTest("suppress type not found 4"); + } + + public void testSuppressTypeNotFound_436653_5() { + runTest("suppress type not found 5"); + } + + public void testSuppressTypeNotFound_436653_6() { + runTest("suppress type not found 6"); + } + + public void testSuppressTypeNotFound_436653_7() { + runTest("suppress type not found 7"); + } + + public void testSuppressTypeNotFound_436653_8() { + runTest("suppress type not found 8"); + } + public void testConstantPool_445395_0() { runTest("constant pool 0"); } diff --git a/tests/src/org/aspectj/systemtest/ajc183/ajc183.xml b/tests/src/org/aspectj/systemtest/ajc183/ajc183.xml index b08be60a9..163ce443e 100644 --- a/tests/src/org/aspectj/systemtest/ajc183/ajc183.xml +++ b/tests/src/org/aspectj/systemtest/ajc183/ajc183.xml @@ -2,6 +2,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java b/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java index 14e880a0a..9b6c11e90 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java @@ -241,7 +241,7 @@ public class AjdeInteractionTestbed extends TestCase { File projectBase = new File(sandboxDir, pname); ICompilerConfiguration icc = compiler.getCompilerConfiguration(); List currentFiles = icc.getProjectSourceFiles(); - List filesForCompilation = new ArrayList(); + List filesForCompilation = new ArrayList(); collectUpFiles(projectBase, projectBase, filesForCompilation); boolean changed = false; for (int i = 0; i < filesForCompilation.size(); i++) { diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjTestCompilerConfiguration.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjTestCompilerConfiguration.java index f355e1557..562291c69 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjTestCompilerConfiguration.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjTestCompilerConfiguration.java @@ -33,7 +33,7 @@ public class MultiProjTestCompilerConfiguration implements ICompilerConfiguratio private Set aspectPath = null; private Map sourcePathResources = null; private IOutputLocationManager outputLocationManager = null; - private List dependants; + private List dependants; private Map javaOptionsMap; private Set inpath; private String encoding = null; @@ -41,9 +41,9 @@ public class MultiProjTestCompilerConfiguration implements ICompilerConfiguratio private String processor; private String processorPath; private String nonstandardoptions; - private List modifiedFiles; - private List modifiedDirs; - private List projectSourceFiles = new ArrayList(); + private List modifiedFiles; + private List modifiedDirs; + private List projectSourceFiles = new ArrayList(); private List xmlConfigFiles = new ArrayList(); private String projectPath; @@ -129,7 +129,7 @@ public class MultiProjTestCompilerConfiguration implements ICompilerConfiguratio return xmlConfigFiles; } - public List getProjectSourceFilesChanged() { + public List getProjectSourceFilesChanged() { log("ICompilerConfiguration.getProjectSourceFilesChanged()"); return modifiedFiles; } @@ -146,7 +146,7 @@ public class MultiProjTestCompilerConfiguration implements ICompilerConfiguratio public void addDependancy(String projectItDependsOn) { if (dependants == null) { - dependants = new ArrayList(); + dependants = new ArrayList(); } dependants.add(projectItDependsOn); } @@ -187,19 +187,19 @@ public class MultiProjTestCompilerConfiguration implements ICompilerConfiguratio this.changed |= ICompilerConfiguration.NONSTANDARDOPTIONS_CHANGED; } - public void setProjectSourceFiles(List projectSourceFiles) { + public void setProjectSourceFiles(List projectSourceFiles) { this.projectSourceFiles = projectSourceFiles; this.changed |= ICompilerConfiguration.PROJECTSOURCEFILES_CHANGED; } - public void setProjectXmlConfigFiles(List xmlConfigFiles) { + public void setProjectXmlConfigFiles(List xmlConfigFiles) { this.xmlConfigFiles = xmlConfigFiles; this.changed |= ICompilerConfiguration.XMLCONFIG_CHANGED; } public void addProjectSourceFileChanged(File f) { if (this.modifiedFiles == null) { - this.modifiedFiles = new ArrayList(); + this.modifiedFiles = new ArrayList(); } if (f != null) { modifiedFiles.add(f); @@ -208,7 +208,7 @@ public class MultiProjTestCompilerConfiguration implements ICompilerConfiguratio public void addClasspathEntryChanged(String f) { if (this.modifiedDirs == null) { - this.modifiedDirs = new ArrayList(); + this.modifiedDirs = new ArrayList(); } if (f != null) { modifiedDirs.add(f); -- cgit v1.2.3