summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/DisjunctVarBinding.java2
-rw-r--r--tests/bugs/DisjunctVarBinding_3.java2
-rw-r--r--tests/src/org/aspectj/systemtest/ajc120/ajc120-tests.xml3
-rw-r--r--tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml19
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/VarargsTests.java4
5 files changed, 13 insertions, 17 deletions
diff --git a/tests/bugs/DisjunctVarBinding.java b/tests/bugs/DisjunctVarBinding.java
index 6d59f354f..7c40cd070 100644
--- a/tests/bugs/DisjunctVarBinding.java
+++ b/tests/bugs/DisjunctVarBinding.java
@@ -14,7 +14,7 @@ class B extends A {
aspect IfPointcut {
after(A a, B b) returning:
- call(* foo(*,*)) &&
+ execution(* foo(*,*)) &&
(args(b,a) || args(a,b)) {
System.out.println("Woven");
}
diff --git a/tests/bugs/DisjunctVarBinding_3.java b/tests/bugs/DisjunctVarBinding_3.java
index 3876b3521..95713d361 100644
--- a/tests/bugs/DisjunctVarBinding_3.java
+++ b/tests/bugs/DisjunctVarBinding_3.java
@@ -1,7 +1,7 @@
aspect IfPointcut {
after(A a, B b) returning:
- call(* foo(*,*)) &&
+ execution(* foo(*,*)) &&
(args(b,a) || args(a,b)) {
System.out.println("Woven");
}
diff --git a/tests/src/org/aspectj/systemtest/ajc120/ajc120-tests.xml b/tests/src/org/aspectj/systemtest/ajc120/ajc120-tests.xml
index 4ab8eb355..8381d4e01 100644
--- a/tests/src/org/aspectj/systemtest/ajc120/ajc120-tests.xml
+++ b/tests/src/org/aspectj/systemtest/ajc120/ajc120-tests.xml
@@ -454,8 +454,7 @@
<ajc-test dir="bugs"
pr="61568" title="wrong variable binding in || pointcuts">
<compile files="DisjunctVarBinding.java">
- <message kind="error" line="34" text="Ambiguous binding of type B"/>
- <message kind="error" line="34" text="Ambiguous binding of type A"/>
+ <message kind="error" line="17" text="ambiguous binding of parameter(s) a, b across '||' in pointcut"/>
</compile>
</ajc-test>
diff --git a/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml b/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml
index 77d52f3dc..9089289e9 100644
--- a/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml
+++ b/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml
@@ -4,12 +4,10 @@
<ajc-test dir="bugs"
pr="62073" title="false ambiguous binding error (introduced in 1.2rc2)">
<compile files="DisjunctVarBinding_2.java,DisjunctVarBinding_3.java">
- <message kind="error" line="25" file="DisjunctVarBinding_2.java" text="Ambiguous binding of type B"/>
- <message kind="error" line="25" file="DisjunctVarBinding_2.java" text="Ambiguous binding of type A"/>
+ <message kind="error" line="4" file="DisjunctVarBinding_3.java" text="ambiguous binding of parameter(s) a, b across '||' in pointcut"/>
</compile>
<compile files="DisjunctVarBinding_3.java,DisjunctVarBinding_2.java">
- <message kind="error" line="25" file="DisjunctVarBinding_2.java" text="Ambiguous binding of type B"/>
- <message kind="error" line="25" file="DisjunctVarBinding_2.java" text="Ambiguous binding of type A"/>
+ <message kind="error" line="4" file="DisjunctVarBinding_3.java" text="ambiguous binding of parameter(s) a, b across '||' in pointcut"/>
</compile>
</ajc-test>
@@ -213,14 +211,11 @@
<ajc-test dir="bugs/oxford" pr="65319"
title="ajc crashes when compiling the following program (binding this() and target())">
<compile files="PR65319.java">
- <message kind="error" line="7" text="Cannot use target() to match at this"/>
- <message kind="error" line="7" text="Cannot use this() to match at this"/>
- <message kind="error" line="11" text="Cannot use target() to match at this"/>
- <message kind="error" line="11" text="Cannot use this() to match at this"/>
- <message kind="error" line="11" text="Ambiguous binding of type Test"/>
- <message kind="error" line="15" text="Cannot use target() to match at this"/>
- <message kind="error" line="15" text="Cannot use this() to match at this"/>
- <message kind="error" line="15" text="Ambiguous binding of type Test"/>
+ <!-- target comes before this comes before args, and we only report one error -->
+ <message kind="error" line="23" text="ambiguous binding of parameter(s) x across '||' in pointcut"/>
+ <message kind="error" line="25" text="ambiguous binding of parameter(s) x across '||' in pointcut"/>
+ <message kind="error" line="27" text="ambiguous binding of parameter(s) x across '||' in pointcut"/>
+ <message kind="error" line="29" text="ambiguous binding of parameter(s) x across '||' in pointcut"/>
</compile>
</ajc-test>
diff --git a/tests/src/org/aspectj/systemtest/ajc150/VarargsTests.java b/tests/src/org/aspectj/systemtest/ajc150/VarargsTests.java
index 7845f6bd1..178e82b18 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/VarargsTests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/VarargsTests.java
@@ -59,10 +59,12 @@ public class VarargsTests extends TestUtils {
// In this test, it can be tricky to understand the results!! The reason being that the shadow
// isn't included in the error message (it really should be, but thats a bit hard to do cleanly)
public void test003_cantMatchVarargsWithObjectArray_withincodePCD() {
- CompilationResult cR = binaryWeave("testcode.jar","VarargsAspect04.aj",0,7,true);
+ CompilationResult cR = binaryWeave("testcode.jar","VarargsAspect04.aj",0,6,true);
// There are 7. Each piece of the pointcut is matched against all the shadows, so both
// the 'withincode' PCD and the 'call' PCD are matched against every join point.
+ // AMC - there are now SIX. We detect early that a call(* *(..)) pcd cannot match
+ // constructor call shadows and never do the match.
assertTrue("Did not get expected message about a varargs mismatch, instead got: "+cR.getWarningMessages(),
((IMessage)cR.getWarningMessages().get(0)).toString().indexOf("varargs declared method")!=-1);