From f6968e6f134df55243c451e45c303600560e6d04 Mon Sep 17 00:00:00 2001 From: acolyer Date: Tue, 8 Nov 2005 18:16:25 +0000 Subject: [PATCH] tests for pr104220 - poor toString implementations for adviceexecution join points. --- tests/bugs150/Pr104220.aj | 29 +++++++++++++++++++ .../systemtest/ajc150/Ajc150Tests.java | 4 +++ .../org/aspectj/systemtest/ajc150/ajc150.xml | 12 ++++++++ 3 files changed, 45 insertions(+) create mode 100644 tests/bugs150/Pr104220.aj diff --git a/tests/bugs150/Pr104220.aj b/tests/bugs150/Pr104220.aj new file mode 100644 index 000000000..a48861387 --- /dev/null +++ b/tests/bugs150/Pr104220.aj @@ -0,0 +1,29 @@ +// pr104220 - adviceexecution joinpoint toString forms + +public aspect Pr104220 { + + before() : adviceexecution() && !within(Pr104220) { + System.out.println(thisJoinPoint.getKind()); + System.out.println(thisJoinPoint.toString()); + System.out.println(thisJoinPoint.toShortString()); + System.out.println(thisJoinPoint.toLongString()); + } + + public static void main(String[] args) { + new C().foo(); + } + +} + +class C { + + public void foo() {} + +} + +aspect SomeAspect { + + before() : execution(* foo(..)) {} + +} + diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java index 3f7d593b2..ce90c37a2 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -674,6 +674,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("Anonymous types and nome matching"); } + public void testAdviceExecutionJPToStringForms() { + runTest("adviceexecution join point toString forms"); + } + // helper methods..... public SyntheticRepository createRepos(File cpentry) { diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index ea7922081..02ad64b6b 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -37,6 +37,18 @@ + + + + + + + + + + + + -- 2.39.5