From e56a69a32149724c51daf0b52958607e5cc46eb4 Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 25 Sep 2006 13:51:40 +0000 Subject: test and fix for 158412: annotation style reference pointcuts don't work --- tests/bugs153/pr158412/dao/Foo.java | 4 ++++ tests/bugs153/pr158412/layering/Layering.aj | 8 ++++++++ tests/bugs153/pr158412/layering/SystemArchitektur.java | 14 ++++++++++++++ tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java | 2 ++ tests/src/org/aspectj/systemtest/ajc153/ajc153.xml | 10 ++++++++++ 5 files changed, 38 insertions(+) create mode 100644 tests/bugs153/pr158412/dao/Foo.java create mode 100644 tests/bugs153/pr158412/layering/Layering.aj create mode 100644 tests/bugs153/pr158412/layering/SystemArchitektur.java (limited to 'tests') diff --git a/tests/bugs153/pr158412/dao/Foo.java b/tests/bugs153/pr158412/dao/Foo.java new file mode 100644 index 000000000..376414c31 --- /dev/null +++ b/tests/bugs153/pr158412/dao/Foo.java @@ -0,0 +1,4 @@ +package dao; + +public class Foo { +} diff --git a/tests/bugs153/pr158412/layering/Layering.aj b/tests/bugs153/pr158412/layering/Layering.aj new file mode 100644 index 000000000..c78561ee0 --- /dev/null +++ b/tests/bugs153/pr158412/layering/Layering.aj @@ -0,0 +1,8 @@ +package layering; + +//import architektur.SystemArchitektur; + +public aspect Layering { + declare warning : (layering.SystemArchitektur.inDAOLayer() ) : "Whatever"; + +} diff --git a/tests/bugs153/pr158412/layering/SystemArchitektur.java b/tests/bugs153/pr158412/layering/SystemArchitektur.java new file mode 100644 index 000000000..735b0ced9 --- /dev/null +++ b/tests/bugs153/pr158412/layering/SystemArchitektur.java @@ -0,0 +1,14 @@ +package layering; + +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; + + +@Aspect +public class SystemArchitektur { + @Pointcut("within(dao.*)") + public void inDAOLayer() {} + +} + + diff --git a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java index 0c4e59e8d..3fdae3771 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java @@ -28,6 +28,8 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // public void testCFlowXMLAspectLTW_pr149096() { runTest("cflow xml concrete aspect"); } // public void testAmbiguousBinding_pr121805() { runTest("ambiguous binding");} // public void testNoIllegalStateExceptionWithGenericInnerAspect_pr156058() { runTest("no IllegalStateException with generic inner aspect"); } + public void testAnnotationStylePointcutNPE_pr158412() { runTest("annotation style pointcut npe"); } + public void testAnnotationStylePointcutNPE_pr158412_2() { runTest("annotation style pointcut npe - 2"); } public void testAnnotationsCallConstructors_pr158126() { runTest("annotations, call and constructors problem");} public void testIllegalStateExceptionGenerics_pr153845() { runTest("IllegalStateException at GenericSignatureParser.java"); } public void testNoIllegalStateExceptionFromAsmDelegate_pr153490_1() { runTest("no illegal state exception from AsmDelegate - 1");} diff --git a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml index 451bf3a80..455f181b1 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml +++ b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml @@ -8,6 +8,16 @@ + + + + + + + + + + -- cgit v1.2.3