summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-02-13 22:00:34 +0000
committerjhugunin <jhugunin>2003-02-13 22:00:34 +0000
commitd15eb325fc77d9f1eb0ac9ec1f6886562d531105 (patch)
tree5c20d3a4d08a8490784fbb422d64dd69faeabc92 /tests
parent3e2801ad504e8f6b3fa7b50a42bf2706994e1727 (diff)
downloadaspectj-d15eb325fc77d9f1eb0ac9ec1f6886562d531105.tar.gz
aspectj-d15eb325fc77d9f1eb0ac9ec1f6886562d531105.zip
fixed Bug 30168: bad optimization of thisJoinPoint to thisJoinPointStaticPart
Diffstat (limited to 'tests')
-rw-r--r--tests/ajcTests.xml7
-rw-r--r--tests/ajcTestsFailing.xml6
-rw-r--r--tests/bugs/crashes/test/Test3.java38
-rw-r--r--tests/jimTests.xml3
4 files changed, 45 insertions, 9 deletions
diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml
index 1d0501dd6..15864594a 100644
--- a/tests/ajcTests.xml
+++ b/tests/ajcTests.xml
@@ -5566,4 +5566,11 @@
<compile files="SuperToIntro.java"/>
<run class="SuperToIntro"/>
</ajc-test>
+
+ <ajc-test dir="bugs/crashes" pr="30168"
+ title="Error with certain combination of advice">
+ <compile files="test/Test3.java"/>
+ <run class="test.Test3"/>
+ </ajc-test>
+
</suite>
diff --git a/tests/ajcTestsFailing.xml b/tests/ajcTestsFailing.xml
index 4bdd8def6..6543e9b02 100644
--- a/tests/ajcTestsFailing.xml
+++ b/tests/ajcTestsFailing.xml
@@ -51,11 +51,5 @@
<message kind="warning" line="73"/>
</compile>
</ajc-test>
-
- <ajc-test dir="bugs" pr="29959"
- title="super call in intertype method declaration body causes VerifyError">
- <compile files="SuperToIntro.java"/>
- <run class="SuperToIntro"/>
- </ajc-test>
</suite>
diff --git a/tests/bugs/crashes/test/Test3.java b/tests/bugs/crashes/test/Test3.java
new file mode 100644
index 000000000..e2d6aa474
--- /dev/null
+++ b/tests/bugs/crashes/test/Test3.java
@@ -0,0 +1,38 @@
+package test;
+import org.aspectj.lang.*;
+import org.aspectj.lang.reflect.*;
+
+public class Test3 {
+ public static void main(String[] args) throws Exception {
+ Test3 a = new Test3();
+ a.foo(-3);
+ }
+ public void foo(int i) {
+ this.x=i;
+ }
+ int x;
+}
+
+aspect Log {
+ pointcut assign(Object newval, Object targ):
+ set(* test..*) && args(newval) && target(targ);
+
+
+ before(Object newval, Object targ): assign(newval,targ) {
+ Signature sign = thisJoinPoint.getSignature();
+ System.out.println(targ.toString() + "." + sign.getName() + ":=" + newval);
+ }
+ /*
+}
+// Different error message if you divide into two aspects
+aspect Tracing {
+ */
+ pointcut tracedCall():
+ call(* test..*(..))/* && !within(Tracing)*/ && !within(Log);
+
+ after() returning (Object o): tracedCall() {
+ // Works if you comment out either of these two lines
+ thisJoinPoint.getSignature();
+ System.out.println(thisJoinPoint);
+ }
+}
diff --git a/tests/jimTests.xml b/tests/jimTests.xml
index 0a867d719..e7e9b8b97 100644
--- a/tests/jimTests.xml
+++ b/tests/jimTests.xml
@@ -1,9 +1,6 @@
<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd">
<suite>
-
-
-
<!--