aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2018-02-28 12:07:51 -0800
committerAndy Clement <aclement@pivotal.io>2018-02-28 12:07:51 -0800
commit6b620ba3aa4b0c9d29560dfa42f8c67dcafb1229 (patch)
treef5876caf48ddc2ed3bc1c1a039de8b95977c2291 /tests
parent4d129674586cbf6cef232e5ba1a74e75708103b1 (diff)
downloadaspectj-6b620ba3aa4b0c9d29560dfa42f8c67dcafb1229.tar.gz
aspectj-6b620ba3aa4b0c9d29560dfa42f8c67dcafb1229.zip
Fix for Bug 531819 - Negative parameter annotation matching not behaving
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs190/paramannos/Code.java13
-rw-r--r--tests/src/org/aspectj/systemtest/ajc190/Ajc190Tests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc190/AllTestsAspectJ190.java1
-rw-r--r--tests/src/org/aspectj/systemtest/ajc190/ajc190.xml8
4 files changed, 26 insertions, 0 deletions
diff --git a/tests/bugs190/paramannos/Code.java b/tests/bugs190/paramannos/Code.java
new file mode 100644
index 000000000..1ab184346
--- /dev/null
+++ b/tests/bugs190/paramannos/Code.java
@@ -0,0 +1,13 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Anno {}
+
+public class Code {
+ public Code(@Anno String boo) {}
+ public Code(Object boo) {}
+}
+
+aspect X {
+ before(): execution(new(!@Anno (*))) { }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc190/Ajc190Tests.java b/tests/src/org/aspectj/systemtest/ajc190/Ajc190Tests.java
index 613c1247a..3d3659f77 100644
--- a/tests/src/org/aspectj/systemtest/ajc190/Ajc190Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc190/Ajc190Tests.java
@@ -22,6 +22,10 @@ import junit.framework.Test;
*/
public class Ajc190Tests extends XMLBasedAjcTestCaseForJava9OrLater {
+ public void testParamAnnosNegative() {
+ runTest("param annos negative");
+ }
+
public void testAnnotMethodHasMember_pr156962_1() { // From similar in Ajc153Tests
runTest("Test Annot Method Has Member 1");
}
diff --git a/tests/src/org/aspectj/systemtest/ajc190/AllTestsAspectJ190.java b/tests/src/org/aspectj/systemtest/ajc190/AllTestsAspectJ190.java
index 4f795f960..2ebc12e7c 100644
--- a/tests/src/org/aspectj/systemtest/ajc190/AllTestsAspectJ190.java
+++ b/tests/src/org/aspectj/systemtest/ajc190/AllTestsAspectJ190.java
@@ -20,6 +20,7 @@ public class AllTestsAspectJ190 {
// $JUnit-BEGIN$
suite.addTest(Ajc190Tests.suite());
suite.addTest(SanityTests19.suite());
+// suite.addTest(EfficientTJPTests.suite());
suite.addTest(ModuleTests.suite());
suite.addTest(Annotations.suite());
// $JUnit-END$
diff --git a/tests/src/org/aspectj/systemtest/ajc190/ajc190.xml b/tests/src/org/aspectj/systemtest/ajc190/ajc190.xml
index b69926377..dc311f63f 100644
--- a/tests/src/org/aspectj/systemtest/ajc190/ajc190.xml
+++ b/tests/src/org/aspectj/systemtest/ajc190/ajc190.xml
@@ -2,6 +2,14 @@
<suite>
+
+ <ajc-test dir="bugs190/paramannos" title="param annos negative">
+ <compile files="Code.java" options="-1.9 -showWeaveInfo">
+ <message kind="weave" text="Join point 'constructor-execution(void Code.&lt;init&gt;(java.lang.Object))' in Type 'Code' (Code.java:8) advised by before advice from 'X' (Code.java:12)"/>
+ </compile>
+ </ajc-test>
+
+
<ajc-test dir="bugs190/modules/aaa" title="build a module">
<compile files="module-info.java com/foo1/C1.java" options="-1.9"/>
</ajc-test>