From e7a6acd6d481f219ba4f87ec1a2cfa29e5aa9fd5 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 3 Jun 2008 04:38:40 +0000 Subject: [PATCH] 235204: test --- tests/bugs161/pr235204/RecursiveCatcher.java | 21 +++++++++++++++++ .../systemtest/ajc161/Ajc161Tests.java | 23 ++++++++++++++++++- .../org/aspectj/systemtest/ajc161/ajc161.xml | 5 ++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 tests/bugs161/pr235204/RecursiveCatcher.java diff --git a/tests/bugs161/pr235204/RecursiveCatcher.java b/tests/bugs161/pr235204/RecursiveCatcher.java new file mode 100644 index 000000000..4a3bebd31 --- /dev/null +++ b/tests/bugs161/pr235204/RecursiveCatcher.java @@ -0,0 +1,21 @@ + +package recursivepackage; + +public aspect RecursiveCatcher { + + pointcut recur() : + call(public void + *.recursiveCall(int)); + + + before(): recur() { + // empty + } + + + public void recursiveCall(int i) { // marker is here + recursiveCall(i); // marker should be here + } + +} + diff --git a/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java b/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java index e36773624..d03eebb5b 100644 --- a/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java @@ -11,15 +11,36 @@ package org.aspectj.systemtest.ajc161; import java.io.File; +import java.util.Iterator; +import java.util.Set; import junit.framework.Test; +import org.aspectj.asm.AsmManager; +import org.aspectj.asm.IRelationshipMap; import org.aspectj.testing.XMLBasedAjcTestCase; public class Ajc161Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // AspectJ1.6.1 - public void testITDPrecedence_pr233838_1() { runTest("itd precedence - 1"); } + public void testIncorrectRelationship_pr235204() { + runTest("incorrect call relationship"); + IRelationshipMap irm = AsmManager.getDefault().getRelationshipMap(); + Set entries = irm.getEntries(); + String gotit = ""; + for (Iterator iterator = entries.iterator(); iterator.hasNext();) { + Object object = (Object) iterator.next(); + gotit = (String) object; + break; + } + if (gotit.indexOf("method-call") == -1) { + String expected = " + + + + + -- 2.39.5