From b039791377f005005601d0d303150c5a376f1827 Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 7 Nov 2007 14:55:17 +0000 Subject: [PATCH] testcode for 169432 and 209019 --- .../ClassThatAlreadyIncludesRequiredMethods.java | 6 ++++++ ...ceToAClassThatAlreadyIncludeRequiredMethods.java | 11 +++++++++++ tests/bugs154/pr169432/NonMarkerInterface.java | 5 +++++ tests/bugs154/pr209019/case1/A.java | 13 +++++++++++++ .../pr209019/case1/AbstractDurationMethod.java | 11 +++++++++++ tests/bugs154/pr209019/case1/DurationMethod.java | 5 +++++ tests/bugs154/pr209019/case1/Runner.java | 7 +++++++ tests/bugs154/pr209019/case2/A.java | 13 +++++++++++++ .../pr209019/case2/AbstractDurationMethod.java | 11 +++++++++++ tests/bugs154/pr209019/case2/AtDurationMethod.java | 9 +++++++++ tests/bugs154/pr209019/case2/Runner.java | 7 +++++++ tests/bugs154/pr209019/case3/A.java | 13 +++++++++++++ .../pr209019/case3/AbstractDurationMethod.java | 11 +++++++++++ tests/bugs154/pr209019/case3/Runner.java | 7 +++++++ tests/bugs154/pr209019/case3/aop.xml | 11 +++++++++++ 15 files changed, 140 insertions(+) create mode 100644 tests/bugs154/pr169432/ClassThatAlreadyIncludesRequiredMethods.java create mode 100644 tests/bugs154/pr169432/DeclareParentsForNonMarkerInterfaceToAClassThatAlreadyIncludeRequiredMethods.java create mode 100644 tests/bugs154/pr169432/NonMarkerInterface.java create mode 100644 tests/bugs154/pr209019/case1/A.java create mode 100644 tests/bugs154/pr209019/case1/AbstractDurationMethod.java create mode 100644 tests/bugs154/pr209019/case1/DurationMethod.java create mode 100644 tests/bugs154/pr209019/case1/Runner.java create mode 100644 tests/bugs154/pr209019/case2/A.java create mode 100644 tests/bugs154/pr209019/case2/AbstractDurationMethod.java create mode 100644 tests/bugs154/pr209019/case2/AtDurationMethod.java create mode 100644 tests/bugs154/pr209019/case2/Runner.java create mode 100644 tests/bugs154/pr209019/case3/A.java create mode 100644 tests/bugs154/pr209019/case3/AbstractDurationMethod.java create mode 100644 tests/bugs154/pr209019/case3/Runner.java create mode 100644 tests/bugs154/pr209019/case3/aop.xml diff --git a/tests/bugs154/pr169432/ClassThatAlreadyIncludesRequiredMethods.java b/tests/bugs154/pr169432/ClassThatAlreadyIncludesRequiredMethods.java new file mode 100644 index 000000000..1667496c5 --- /dev/null +++ b/tests/bugs154/pr169432/ClassThatAlreadyIncludesRequiredMethods.java @@ -0,0 +1,6 @@ +package test; + +public class ClassThatAlreadyIncludesRequiredMethods { + public void something() { + } +} \ No newline at end of file diff --git a/tests/bugs154/pr169432/DeclareParentsForNonMarkerInterfaceToAClassThatAlreadyIncludeRequiredMethods.java b/tests/bugs154/pr169432/DeclareParentsForNonMarkerInterfaceToAClassThatAlreadyIncludeRequiredMethods.java new file mode 100644 index 000000000..4d63e4871 --- /dev/null +++ b/tests/bugs154/pr169432/DeclareParentsForNonMarkerInterfaceToAClassThatAlreadyIncludeRequiredMethods.java @@ -0,0 +1,11 @@ +package test; + +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.DeclareParents; + +@Aspect +public class +DeclareParentsForNonMarkerInterfaceToAClassThatAlreadyIncludeRequiredMethods { + @DeclareParents("test.ClassThatAlreadyIncludesRequiredMethods") + public NonMarkerInterface nmi; +} \ No newline at end of file diff --git a/tests/bugs154/pr169432/NonMarkerInterface.java b/tests/bugs154/pr169432/NonMarkerInterface.java new file mode 100644 index 000000000..753ad61ee --- /dev/null +++ b/tests/bugs154/pr169432/NonMarkerInterface.java @@ -0,0 +1,5 @@ +package test; + +public interface NonMarkerInterface { + public void something(); +} \ No newline at end of file diff --git a/tests/bugs154/pr209019/case1/A.java b/tests/bugs154/pr209019/case1/A.java new file mode 100644 index 000000000..838d4b5f6 --- /dev/null +++ b/tests/bugs154/pr209019/case1/A.java @@ -0,0 +1,13 @@ +package a.b; + +public class A { + public Object m1() { + return m2(); + } + + public Object m2() { + return m3(); + } + + public Object m3() {return "x";} +} diff --git a/tests/bugs154/pr209019/case1/AbstractDurationMethod.java b/tests/bugs154/pr209019/case1/AbstractDurationMethod.java new file mode 100644 index 000000000..ff397ca5b --- /dev/null +++ b/tests/bugs154/pr209019/case1/AbstractDurationMethod.java @@ -0,0 +1,11 @@ +package c.d; + +public abstract aspect AbstractDurationMethod { + public abstract pointcut methods(); + + Object around(): methods() { + Object o = proceed(); + System.out.println("Proceeded at joinpoint "+thisJoinPoint); + return o; + } +} diff --git a/tests/bugs154/pr209019/case1/DurationMethod.java b/tests/bugs154/pr209019/case1/DurationMethod.java new file mode 100644 index 000000000..6011c4ced --- /dev/null +++ b/tests/bugs154/pr209019/case1/DurationMethod.java @@ -0,0 +1,5 @@ +package c.d;; + +public aspect DurationMethod extends AbstractDurationMethod { + public pointcut methods(): within(a.b.*) && call (public * a..*(..)); +} diff --git a/tests/bugs154/pr209019/case1/Runner.java b/tests/bugs154/pr209019/case1/Runner.java new file mode 100644 index 000000000..b41411662 --- /dev/null +++ b/tests/bugs154/pr209019/case1/Runner.java @@ -0,0 +1,7 @@ +import a.b.*; + +public class Runner { + public static void main(String []argv) { + new A().m1(); + } +} diff --git a/tests/bugs154/pr209019/case2/A.java b/tests/bugs154/pr209019/case2/A.java new file mode 100644 index 000000000..838d4b5f6 --- /dev/null +++ b/tests/bugs154/pr209019/case2/A.java @@ -0,0 +1,13 @@ +package a.b; + +public class A { + public Object m1() { + return m2(); + } + + public Object m2() { + return m3(); + } + + public Object m3() {return "x";} +} diff --git a/tests/bugs154/pr209019/case2/AbstractDurationMethod.java b/tests/bugs154/pr209019/case2/AbstractDurationMethod.java new file mode 100644 index 000000000..ff397ca5b --- /dev/null +++ b/tests/bugs154/pr209019/case2/AbstractDurationMethod.java @@ -0,0 +1,11 @@ +package c.d; + +public abstract aspect AbstractDurationMethod { + public abstract pointcut methods(); + + Object around(): methods() { + Object o = proceed(); + System.out.println("Proceeded at joinpoint "+thisJoinPoint); + return o; + } +} diff --git a/tests/bugs154/pr209019/case2/AtDurationMethod.java b/tests/bugs154/pr209019/case2/AtDurationMethod.java new file mode 100644 index 000000000..2fc5ea32c --- /dev/null +++ b/tests/bugs154/pr209019/case2/AtDurationMethod.java @@ -0,0 +1,9 @@ +package c.d; + +import org.aspectj.lang.annotation.*; + +@Aspect +public class AtDurationMethod extends AbstractDurationMethod { + @Pointcut("within(a.b.*) && call(public * a..*(..))") + public void methods() {} +} diff --git a/tests/bugs154/pr209019/case2/Runner.java b/tests/bugs154/pr209019/case2/Runner.java new file mode 100644 index 000000000..b41411662 --- /dev/null +++ b/tests/bugs154/pr209019/case2/Runner.java @@ -0,0 +1,7 @@ +import a.b.*; + +public class Runner { + public static void main(String []argv) { + new A().m1(); + } +} diff --git a/tests/bugs154/pr209019/case3/A.java b/tests/bugs154/pr209019/case3/A.java new file mode 100644 index 000000000..838d4b5f6 --- /dev/null +++ b/tests/bugs154/pr209019/case3/A.java @@ -0,0 +1,13 @@ +package a.b; + +public class A { + public Object m1() { + return m2(); + } + + public Object m2() { + return m3(); + } + + public Object m3() {return "x";} +} diff --git a/tests/bugs154/pr209019/case3/AbstractDurationMethod.java b/tests/bugs154/pr209019/case3/AbstractDurationMethod.java new file mode 100644 index 000000000..ff397ca5b --- /dev/null +++ b/tests/bugs154/pr209019/case3/AbstractDurationMethod.java @@ -0,0 +1,11 @@ +package c.d; + +public abstract aspect AbstractDurationMethod { + public abstract pointcut methods(); + + Object around(): methods() { + Object o = proceed(); + System.out.println("Proceeded at joinpoint "+thisJoinPoint); + return o; + } +} diff --git a/tests/bugs154/pr209019/case3/Runner.java b/tests/bugs154/pr209019/case3/Runner.java new file mode 100644 index 000000000..b41411662 --- /dev/null +++ b/tests/bugs154/pr209019/case3/Runner.java @@ -0,0 +1,7 @@ +import a.b.*; + +public class Runner { + public static void main(String []argv) { + new A().m1(); + } +} diff --git a/tests/bugs154/pr209019/case3/aop.xml b/tests/bugs154/pr209019/case3/aop.xml new file mode 100644 index 000000000..8b7971038 --- /dev/null +++ b/tests/bugs154/pr209019/case3/aop.xml @@ -0,0 +1,11 @@ + + + + + + + + + -- 2.39.5