]> source.dussan.org Git - aspectj.git/commitdiff
test for Bug 29693
authorjhugunin <jhugunin>
Tue, 21 Jan 2003 18:44:29 +0000 (18:44 +0000)
committerjhugunin <jhugunin>
Tue, 21 Jan 2003 18:44:29 +0000 (18:44 +0000)
   Use of within with declare soft yeilds VerifyError 1.1b4

tests/ajcTests.xml
tests/bugs/SoftWithin.java [new file with mode: 0644]

index 6c2c2ad5b7fe838ba3408c4338461e7d7f8d86f4..f63bab2180de2dc2dfa0c1870a8a9506858a8d8e 100644 (file)
         <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 (file)
index 0000000..033922d
--- /dev/null
@@ -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);
+}
+
+
+