From 4e7583aac32c77523a357f9606be6fd29ec62a6f Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 4 Dec 2007 09:39:38 +0000 Subject: [PATCH] 166647 testcode: commented out in ajc154 - poor solution --- tests/bugs154/pr166647/Aspect.java | 10 ++++++++++ tests/bugs154/pr166647/ClassToAdvise.java | 11 +++++++++++ tests/bugs154/pr166647/ClassWithMain.java | 8 ++++++++ tests/bugs154/pr166647/aop1.xml | 11 +++++++++++ .../org/aspectj/systemtest/ajc154/Ajc154Tests.java | 5 ++++- tests/src/org/aspectj/systemtest/ajc154/ajc154.xml | 13 +++++++++++++ 6 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 tests/bugs154/pr166647/Aspect.java create mode 100644 tests/bugs154/pr166647/ClassToAdvise.java create mode 100644 tests/bugs154/pr166647/ClassWithMain.java create mode 100644 tests/bugs154/pr166647/aop1.xml diff --git a/tests/bugs154/pr166647/Aspect.java b/tests/bugs154/pr166647/Aspect.java new file mode 100644 index 000000000..1226637eb --- /dev/null +++ b/tests/bugs154/pr166647/Aspect.java @@ -0,0 +1,10 @@ +package x; + +abstract aspect Aspect { + + abstract pointcut scope(); + + before(): call(* foo(..)) && cflow(execution(* toplevel(..))) && scope() { + System.out.println("advice fired"); + } +} \ No newline at end of file diff --git a/tests/bugs154/pr166647/ClassToAdvise.java b/tests/bugs154/pr166647/ClassToAdvise.java new file mode 100644 index 000000000..863025c7d --- /dev/null +++ b/tests/bugs154/pr166647/ClassToAdvise.java @@ -0,0 +1,11 @@ +package a; + +public class ClassToAdvise { + + public void toplevel() { + foo(); + } + + public void foo() {} + +} \ No newline at end of file diff --git a/tests/bugs154/pr166647/ClassWithMain.java b/tests/bugs154/pr166647/ClassWithMain.java new file mode 100644 index 000000000..e2d30d25c --- /dev/null +++ b/tests/bugs154/pr166647/ClassWithMain.java @@ -0,0 +1,8 @@ +package a; + +public class ClassWithMain { + public static void main(String []argv) { + new ClassToAdvise().toplevel(); + new ClassToAdvise().foo(); + } +} \ No newline at end of file diff --git a/tests/bugs154/pr166647/aop1.xml b/tests/bugs154/pr166647/aop1.xml new file mode 100644 index 000000000..d4b88e7ef --- /dev/null +++ b/tests/bugs154/pr166647/aop1.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java b/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java index 667b6e7da..f381cda80 100644 --- a/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java @@ -44,7 +44,10 @@ public class Ajc154Tests extends org.aspectj.testing.XMLBasedAjcTestCase { //public void testAfterThrowingAnnotationStyle_pr211674_1() { runTest("after throwing annotation style problem - 1");} //public void testAfterThrowingAnnotationStyle_pr211674_2() { runTest("after throwing annotation style problem - 2");} - // Testing some issues with declare at type + // crappy solution - see the bug +// public void testCflowLtwProblem_pr166647_1() { runTest("ltw and cflow problem"); } + + // Testing some issues with declare at type public void testDeclareAtTypeProblems_pr211052_1() { runTest("declare atType problems - 1"); } public void testDeclareAtTypeProblems_pr211052_2() { runTest("declare atType problems - 2"); } public void testDeclareAtTypeProblems_pr211052_3() { runTest("declare atType problems - 3"); } diff --git a/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml b/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml index 691f5ce8d..c15c78567 100644 --- a/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml +++ b/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml @@ -2,6 +2,19 @@ + + + + + + + + + + + + + -- 2.39.5