summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-01-21 18:44:29 +0000
committerjhugunin <jhugunin>2003-01-21 18:44:29 +0000
commit7e0c6a74f0f2f35be6724650fd3a09995efea978 (patch)
tree21cac5d6d5cf3a7084e6a91cac0ccefc78fb0c48 /tests
parentb5bb16f1f0011e41454f60b2707420769dcd1ebc (diff)
downloadaspectj-7e0c6a74f0f2f35be6724650fd3a09995efea978.tar.gz
aspectj-7e0c6a74f0f2f35be6724650fd3a09995efea978.zip
test for Bug 29693
Use of within with declare soft yeilds VerifyError 1.1b4
Diffstat (limited to 'tests')
-rw-r--r--tests/ajcTests.xml6
-rw-r--r--tests/bugs/SoftWithin.java33
2 files changed, 39 insertions, 0 deletions
diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml
index 6c2c2ad5b..f63bab218 100644
--- a/tests/ajcTests.xml
+++ b/tests/ajcTests.xml
@@ -5533,4 +5533,10 @@
<compile files="PcdLookup.java" />
<run class="PcdLookup"/>
</ajc-test>
+
+ <ajc-test dir="bugs" pr="29691"
+ title="Static inner aspects cannot reference user defined pointcuts">
+ <compile files="SoftWithin.java" />
+ <run class="SoftWithin"/>
+ </ajc-test>
</suite>
diff --git a/tests/bugs/SoftWithin.java b/tests/bugs/SoftWithin.java
new file mode 100644
index 000000000..033922deb
--- /dev/null
+++ b/tests/bugs/SoftWithin.java
@@ -0,0 +1,33 @@
+import org.aspectj.testing.Tester;
+import org.aspectj.lang.*;
+import java.io.*;
+
+
+/** @testcase Bugzilla Bug 29691
+ Static inner aspects cannot reference user defined pointcuts
+
+ */
+public class SoftWithin {
+
+ static void foo() throws IOException {
+ throw new IOException();
+ }
+
+ public static void main(String[] args) throws Exception{
+ try {
+ foo();
+ } catch (SoftException se) {
+ return;
+ }
+ Tester.checkFailed("should have got SoftException");
+ }
+}
+
+
+aspect Soften {
+
+ declare soft : IOException : within(SoftWithin);
+}
+
+
+