From d532892d89865511ea39286e4ebd34fc20b96a5d Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 6 Oct 2006 16:29:03 +0000 Subject: tests and fixes for jdtlikehandleprovider, bug 159896 --- .../jdtlikehandleprovider/AdviceAndInjar.aj | 17 +++++++++++++++++ .../jdtlikehandleprovider/AspectOnAspectPath.aj | 17 +++++++++++++++++ .../jdtlikehandleprovider/ClassForAspectpath.java | 10 ++++++++++ .../jdtlikehandleprovider/DeclareAndInjar.aj | 9 +++++++++ tests/features153/jdtlikehandleprovider/README.txt | 7 +++++++ tests/features153/jdtlikehandleprovider/advice.jar | Bin 0 -> 1580 bytes tests/features153/jdtlikehandleprovider/declare.jar | Bin 0 -> 1341 bytes .../jdtlikehandleprovider/jarForAspectPath.jar | Bin 0 -> 1507 bytes 8 files changed, 60 insertions(+) create mode 100644 tests/features153/jdtlikehandleprovider/AdviceAndInjar.aj create mode 100644 tests/features153/jdtlikehandleprovider/AspectOnAspectPath.aj create mode 100644 tests/features153/jdtlikehandleprovider/ClassForAspectpath.java create mode 100644 tests/features153/jdtlikehandleprovider/DeclareAndInjar.aj create mode 100644 tests/features153/jdtlikehandleprovider/README.txt create mode 100644 tests/features153/jdtlikehandleprovider/advice.jar create mode 100644 tests/features153/jdtlikehandleprovider/declare.jar create mode 100644 tests/features153/jdtlikehandleprovider/jarForAspectPath.jar (limited to 'tests/features153/jdtlikehandleprovider') diff --git a/tests/features153/jdtlikehandleprovider/AdviceAndInjar.aj b/tests/features153/jdtlikehandleprovider/AdviceAndInjar.aj new file mode 100644 index 000000000..68a6ad56a --- /dev/null +++ b/tests/features153/jdtlikehandleprovider/AdviceAndInjar.aj @@ -0,0 +1,17 @@ +public aspect AdviceAndInjar { + + pointcut p() : call(* *.*(..)) && !within(AdviceAndInjar); + + before() : p() { + } + + after() : p() { + } + + pointcut p1() : execution(* *.*(..)) && !within(AdviceAndInjar); + + Object around() : p1() { + return proceed(); + } + +} diff --git a/tests/features153/jdtlikehandleprovider/AspectOnAspectPath.aj b/tests/features153/jdtlikehandleprovider/AspectOnAspectPath.aj new file mode 100644 index 000000000..d111fda02 --- /dev/null +++ b/tests/features153/jdtlikehandleprovider/AspectOnAspectPath.aj @@ -0,0 +1,17 @@ +package pkg; + +public aspect AspectOnAspectPath { + + pointcut p() : call(* *.*(..)) && !within(AspectOnAspectPath); + declare warning: p() : "blah"; + + before() : p() { + } + + pointcut exec() : execution(* *.*(..)) && !within(AspectOnAspectPath); + declare warning : exec() : "blah2"; + before() : exec() { + + } + +} diff --git a/tests/features153/jdtlikehandleprovider/ClassForAspectpath.java b/tests/features153/jdtlikehandleprovider/ClassForAspectpath.java new file mode 100644 index 000000000..c30da9b97 --- /dev/null +++ b/tests/features153/jdtlikehandleprovider/ClassForAspectpath.java @@ -0,0 +1,10 @@ +public class ClassForAspectpath { + + public void foo() { + bar(); + } + + public void bar() { + + } +} diff --git a/tests/features153/jdtlikehandleprovider/DeclareAndInjar.aj b/tests/features153/jdtlikehandleprovider/DeclareAndInjar.aj new file mode 100644 index 000000000..d1b94b9c7 --- /dev/null +++ b/tests/features153/jdtlikehandleprovider/DeclareAndInjar.aj @@ -0,0 +1,9 @@ +public aspect DeclareAndInjar { + + pointcut p() : call(* *.*(..)) && !within(DeclareAndInjar); + declare warning: p() : "warning"; + + pointcut exec() : execution(* *.*(..)) && !within(DeclareAndInjar); + declare error : exec() : "error"; + +} diff --git a/tests/features153/jdtlikehandleprovider/README.txt b/tests/features153/jdtlikehandleprovider/README.txt new file mode 100644 index 000000000..cca1b5254 --- /dev/null +++ b/tests/features153/jdtlikehandleprovider/README.txt @@ -0,0 +1,7 @@ +To regenerate the jars in this directory: + +1. ajc AspectOnAspectPath.aj -outjar jarForAspectPath.jar + +2. ajc DeclareAndInjar.aj -outjar declare.jar + +3. ajc AdviceAndInjar.aj -outjar advice.jar diff --git a/tests/features153/jdtlikehandleprovider/advice.jar b/tests/features153/jdtlikehandleprovider/advice.jar new file mode 100644 index 000000000..7e99367ef Binary files /dev/null and b/tests/features153/jdtlikehandleprovider/advice.jar differ diff --git a/tests/features153/jdtlikehandleprovider/declare.jar b/tests/features153/jdtlikehandleprovider/declare.jar new file mode 100644 index 000000000..1278b4f11 Binary files /dev/null and b/tests/features153/jdtlikehandleprovider/declare.jar differ diff --git a/tests/features153/jdtlikehandleprovider/jarForAspectPath.jar b/tests/features153/jdtlikehandleprovider/jarForAspectPath.jar new file mode 100644 index 000000000..bc12b8b31 Binary files /dev/null and b/tests/features153/jdtlikehandleprovider/jarForAspectPath.jar differ -- cgit v1.2.3