]> source.dussan.org Git - aspectj.git/commitdiff
247683: test and fix: annotations on array delegates
authoraclement <aclement>
Mon, 29 Sep 2008 19:16:22 +0000 (19:16 +0000)
committeraclement <aclement>
Mon, 29 Sep 2008 19:16:22 +0000 (19:16 +0000)
tests/bugs162/pr247683/A.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java
tests/src/org/aspectj/systemtest/ajc162/ajc162.xml

diff --git a/tests/bugs162/pr247683/A.java b/tests/bugs162/pr247683/A.java
new file mode 100644 (file)
index 0000000..e930893
--- /dev/null
@@ -0,0 +1,12 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface I {}
+
+aspect X {
+  declare warning: execution(* *(@(@I *) *)): "";
+}
+
+public class A {
+  public void foo(@I boolean[] bs) {}
+}
index 268e2224f318f2fa9d0154fd0f8b893c00db9656..5ac0d8a106e26e5cba7ebab9b7a8bda06fc8f2d9 100644 (file)
 package org.aspectj.systemtest.ajc162;
 
 import java.io.File;
-import java.io.PrintWriter;
 
 import junit.framework.Test;
 
-import org.aspectj.asm.AsmManager;
 import org.aspectj.testing.XMLBasedAjcTestCase;
 
 public class Ajc162Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
@@ -43,19 +41,19 @@ public class Ajc162Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
        // what I want for the hid is:
 
        // <somethingIndicatingBinary>"[Asp.class}Asp&before"
-/*
-       public void testBinaryAspectModeling() throws Exception {
-               runTest("binary aspects model");
-               AsmManager.dumptree(AsmManager.getDefault().getHierarchy().getRoot(), 0);
-               PrintWriter pw = new PrintWriter(System.out);
-               AsmManager.getDefault().dumprels(pw);
-               pw.flush();
-       }
-*/
+       /*
+        * public void testBinaryAspectModeling() throws Exception { runTest("binary aspects model");
+        * AsmManager.dumptree(AsmManager.getDefault().getHierarchy().getRoot(), 0); PrintWriter pw = new PrintWriter(System.out);
+        * AsmManager.getDefault().dumprels(pw); pw.flush(); }
+        */
        public void testPerClause() {
                runTest("ltw perclause");
        }
 
+       public void testNullDelegateForArray_pr247683() {
+               runTest("null delegate for array");
+       }
+
        public void testPerClause2() {
                runTest("ltw perclause - 2");
        }
@@ -167,7 +165,18 @@ public class Ajc162Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
        }
 
        // public void testParamAnnosPipelining_pr241847() { runTest("param annos pipelining");}
-       // public void testParamAnnoInner_pr241861() { runTest("param annotation inner class"); }
+       // public void testParamAnnoInner_pr241861() {
+       // runTest("param annotation inner class");
+       // }
+       //
+       // public void testParamAnnoInner_pr241861_2() {
+       // runTest("param annotation inner class - 2");
+       // }
+       //
+       // public void testParamAnnoInner_pr241861_3() {
+       // runTest("param annotation inner class - 3");
+       // }
+
        public void testAnnotationDecp_pr239441() {
                runTest("annotation decp");
        }
index c1054ee34380e72eaef5747312520e32df2eb5c7..bc1b177ed2cedf8754660faa258b7f0fab47011f 100644 (file)
@@ -3,6 +3,11 @@
 <!-- AspectJ v1.6.2 Tests -->
 <suite>
        
+       
+   <ajc-test dir="bugs162/pr247683" title="null delegate for array">
+     <compile options="-1.5" files="A.java"/>
+   </ajc-test>
+       
    <ajc-test dir="bugs162/IntoBinary" title="binary aspects model">
      <compile options="-1.5 -emacssym" files="Clazz.java" aspectpath="binaryaspect.jar"/>
    </ajc-test>
         </compile>
     </ajc-test>    
     
+    <ajc-test dir="bugs162/pr241861" title="param annotation inner class - 2">
+        <compile files="X.java" options="-1.5 -showWeaveInfo">
+          <message kind="weave" text="fubar"/>
+        </compile>
+    </ajc-test>    
+    
+    <ajc-test dir="bugs162/pr241861" title="param annotation inner class - 3">
+        <compile files="Y.java" options="-1.5 -showWeaveInfo">
+          <message kind="weave" text="fubar"/>
+        </compile>
+    </ajc-test>    
+    
     <ajc-test dir="bugs162/pr240693" title="privileged generics">
         <compile files="PayloadClass.java SomeInterface.java GenericClassInAdvice.java" options="-1.5">
         </compile>