aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-09-01 08:30:41 +0000
committeracolyer <acolyer>2005-09-01 08:30:41 +0000
commita66e0a2aa8a6cb057f4b0d740ad961fb1ede5e85 (patch)
tree597d2b53bf5c38031c2e9e722ff3fe968bd24911 /tests
parent0c0f2d509a0329fbcf2fd1f1ff65b93b31880cf3 (diff)
downloadaspectj-a66e0a2aa8a6cb057f4b0d740ad961fb1ede5e85.tar.gz
aspectj-a66e0a2aa8a6cb057f4b0d740ad961fb1ede5e85.zip
tests and fix for pr59196, args pcd not ignoring synthetic arguments at adviceexecution join points
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs150/pr59196.aj18
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ajc150.xml4
3 files changed, 26 insertions, 0 deletions
diff --git a/tests/bugs150/pr59196.aj b/tests/bugs150/pr59196.aj
new file mode 100644
index 000000000..f54d98097
--- /dev/null
+++ b/tests/bugs150/pr59196.aj
@@ -0,0 +1,18 @@
+aspect some_aspect {
+ pointcut call_m(int a, int b) : call(int *.m(..)) && args(a, b);
+
+ int m(int p, int q) { return 2; }
+
+ void foo() {
+ m(1,4);
+ }
+
+ int around(int x, int y) : call_m(x, y) { return 5; }
+}
+
+aspect other_aspect {
+ before(int x, int y) :
+ adviceexecution() && within(some_aspect) && args(x, y) {
+
+ }
+} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
index de828818f..9d7053306 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
@@ -346,6 +346,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
runTest("visibility in signature matching with overrides - 3");
}
+ public void testArgsGeneratedCorrectlyForAdviceExecution() {
+ runTest("args generated correctly for advice execution join point");
+ }
+
// 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 b1f4a2354..eaa4acef4 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
+++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
@@ -414,6 +414,10 @@
<message kind="warning" line="10" text="should match"/>
</compile>
</ajc-test>
+
+ <ajc-test dir="bugs150" pr="59196" title="args generated correctly for advice execution join point">
+ <compile files="pr59196.aj" options="-XnoInline -1.5"/>
+ </ajc-test>
<!-- ============================================================================ -->
<!-- ============================================================================ -->