aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-05-02 20:36:06 +0000
committerjhugunin <jhugunin>2003-05-02 20:36:06 +0000
commitbcdbd68f76629692a5e780702086bff96cdc4c7c (patch)
treef34261e11877f35a765cc5c10e570eab1af9b6d3 /tests
parentfafdaa404c28c821c3349e7d950afb6a4c8dd790 (diff)
downloadaspectj-bcdbd68f76629692a5e780702086bff96cdc4c7c.tar.gz
aspectj-bcdbd68f76629692a5e780702086bff96cdc4c7c.zip
fix and better tests for
Bugzilla Bug 37152 java.lang.VerifyError:
Diffstat (limited to 'tests')
-rw-r--r--tests/ajcTests.xml11
-rw-r--r--tests/bugs/inlineAround/aspect1/Base.java30
-rw-r--r--tests/bugs/inlineAround/aspect2/Concrete.java7
-rw-r--r--tests/bugs/inlineAround/p1/Main.java26
-rw-r--r--tests/jimTests.xml14
5 files changed, 73 insertions, 15 deletions
diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml
index 6a164462d..732f9b4bb 100644
--- a/tests/ajcTests.xml
+++ b/tests/ajcTests.xml
@@ -13,7 +13,6 @@
so there may only be one copy marked "messages-vary" here.
new-messages-vary like messages-vary, except need to make ajcTest10 variant
- incremental-test incremental test. All tests using inc-compile.
fail-{...} test fails in some configuration
fail-unimplmented eajc throwing "unimplemented" exception
fail-commandLine fails in ajc on command line (move to ajcTestsBroken.xml)
@@ -5745,7 +5744,7 @@
</ajc-test>
<ajc-test dir="incremental/stringliteral"
- keywords="knownLimitation,incremental-test"
+ keywords="knownLimitation"
title="incrementally change string size and wire in injar classes">
<compile staging="true" options="-incremental"
files="oneInjar.jar,twoInjar.jar"
@@ -6154,4 +6153,12 @@
<run class="Main"/>
</ajc-test>
+
+ <ajc-test dir="bugs/inlineAround" pr="37152"
+ title="perthis and inline arounds">
+ <compile files="aspect1/Base.java,aspect2/Concrete.java,p1/Main.java">
+ </compile>
+ <run class="p1.Main"/>
+ </ajc-test>
+
</suite>
diff --git a/tests/bugs/inlineAround/aspect1/Base.java b/tests/bugs/inlineAround/aspect1/Base.java
new file mode 100644
index 000000000..e61f34648
--- /dev/null
+++ b/tests/bugs/inlineAround/aspect1/Base.java
@@ -0,0 +1,30 @@
+package aspect1;
+
+public abstract aspect Base {
+ private Helper h = new Helper();
+ {
+ h.h1 = new Helper();
+ h.h1.h1 = new Helper();
+ }
+
+ private class Inner {
+ String data = "inner";
+ }
+
+ protected abstract pointcut where();
+
+ Object around(double d, int i): where() && args(i, d) {
+ String s = h.data + h.h1.data + h.h1.h1.data + d + i;
+ System.err.println(s);
+ return proceed(d, i);
+ }
+}
+
+
+class Helper {
+ String data = "helper";
+ Helper h1;
+ String getData() {
+ return data;
+ }
+} \ No newline at end of file
diff --git a/tests/bugs/inlineAround/aspect2/Concrete.java b/tests/bugs/inlineAround/aspect2/Concrete.java
new file mode 100644
index 000000000..f065fa9f1
--- /dev/null
+++ b/tests/bugs/inlineAround/aspect2/Concrete.java
@@ -0,0 +1,7 @@
+package aspect2;
+
+import aspect1.Base;
+
+aspect Concrete extends Base perthis(where()) {
+ protected pointcut where(): call(* *..C.*(..));
+} \ No newline at end of file
diff --git a/tests/bugs/inlineAround/p1/Main.java b/tests/bugs/inlineAround/p1/Main.java
new file mode 100644
index 000000000..bf44127c7
--- /dev/null
+++ b/tests/bugs/inlineAround/p1/Main.java
@@ -0,0 +1,26 @@
+package p1;
+
+public class Main {
+ public static void main(String[] args) {
+ new Main().doit();
+ }
+
+ private void doit() {
+ long l = 2l + testit(3.2, new C().doit(23, 3.14), 5l);
+ System.err.println(l);
+ }
+
+ private long testit(double d, long l1, long l2) {
+ return (long)(d + l1 + l2);
+ }
+}
+
+class C {
+ long doit(int i, double d) {
+ return (long)(d + i + f1(d, i, i));
+ }
+
+ int f1(double d1, long l1, int i1) {
+ return (int)(d1 + l1 + i1);
+ }
+} \ No newline at end of file
diff --git a/tests/jimTests.xml b/tests/jimTests.xml
index c071015d0..80a883ac8 100644
--- a/tests/jimTests.xml
+++ b/tests/jimTests.xml
@@ -1,16 +1,4 @@
<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd">
<suite>
- <ajc-test dir="options"
- title="options -warn:deprecation">
- <compile files="WarnDeprecated.java"
- options="!eclipse,-warn:deprecation">
- <message kind="warning" line="10"/>
- </compile>
- </ajc-test>
- <ajc-test dir="options"
- title="options -warn:deprecation turned off">
- <compile files="WarnDeprecated.java"
- options="!eclipse">
- </compile>
- </ajc-test>
+
</suite> \ No newline at end of file