]> source.dussan.org Git - aspectj.git/commitdiff
test for Bug 29691
authorjhugunin <jhugunin>
Tue, 21 Jan 2003 18:35:03 +0000 (18:35 +0000)
committerjhugunin <jhugunin>
Tue, 21 Jan 2003 18:35:03 +0000 (18:35 +0000)
   Static inner aspects cannot reference user defined pointcuts

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

index da82705e5f3c7247a2bba76bdd49d8cfbd38e045..6c2c2ad5b7fe838ba3408c4338461e7d7f8d86f4 100644 (file)
             <message kind="error" line="6"/>        
         </compile>
     </ajc-test>
+    
+    <ajc-test dir="bugs" pr="29691"
+               title="Static inner aspects cannot reference user defined pointcuts">
+        <compile files="PcdLookup.java" />
+        <run class="PcdLookup"/>
+    </ajc-test>
 </suite>
diff --git a/tests/bugs/PcdLookup.java b/tests/bugs/PcdLookup.java
new file mode 100644 (file)
index 0000000..eb8f8d0
--- /dev/null
@@ -0,0 +1,19 @@
+import org.aspectj.testing.Tester;
+
+/** @testcase Bugzilla Bug 29691  
+   Static inner aspects cannot reference user defined pointcuts 
+ */
+public class PcdLookup {
+
+    public static void main(String[] args) {
+    }
+    
+    public static aspect Referencer {
+        pointcut mainCall() : call(void main(..));
+        pointcut myMainCall() : mainCall() && outer(); 
+    }   
+    
+    pointcut outer(): within(PcdLookup);
+}
+
index 823bf25b992532f94c1355c4e54b70e4ddc22ad9..23f82d378324d94093a7b29fab3806251fdd8cfb 100644 (file)
@@ -1,7 +1,18 @@
 <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd">
 <suite>
-
+    <ajc-test dir="bugs" pr="29691"
+               title="Static inner aspects cannot reference user defined pointcuts">
+        <compile files="PcdLookup.java" />
+        <run class="PcdLookup"/>
+    </ajc-test>
 
     <!--
+    
+    <ajc-test dir="new"
+      title="work nicely with inner class method look-up rules and call-site advice"
+      keywords="from-resolved_10x">
+        <compile files="InnerMethods.java"/>
+        <run class="InnerMethods"/>
+    </ajc-test>
        -->
 </suite>
\ No newline at end of file