From 6b620ba3aa4b0c9d29560dfa42f8c67dcafb1229 Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Wed, 28 Feb 2018 12:07:51 -0800 Subject: Fix for Bug 531819 - Negative parameter annotation matching not behaving --- tests/bugs190/paramannos/Code.java | 13 +++++++++++++ tests/src/org/aspectj/systemtest/ajc190/Ajc190Tests.java | 4 ++++ .../org/aspectj/systemtest/ajc190/AllTestsAspectJ190.java | 1 + tests/src/org/aspectj/systemtest/ajc190/ajc190.xml | 8 ++++++++ 4 files changed, 26 insertions(+) create mode 100644 tests/bugs190/paramannos/Code.java (limited to 'tests') 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 @@ + + + + + + + + -- cgit v1.2.3