]> source.dussan.org Git - aspectj.git/commitdiff
Tests for pr99089 - commented out in Ajc150Tests.java
authoraclement <aclement>
Thu, 9 Jun 2005 13:59:15 +0000 (13:59 +0000)
committeraclement <aclement>
Thu, 9 Jun 2005 13:59:15 +0000 (13:59 +0000)
tests/bugs150/pr99089/DataClass.java [new file with mode: 0644]
tests/bugs150/pr99089/TracingAspect.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
tests/src/org/aspectj/systemtest/ajc150/ajc150.xml

diff --git a/tests/bugs150/pr99089/DataClass.java b/tests/bugs150/pr99089/DataClass.java
new file mode 100644 (file)
index 0000000..cbfb790
--- /dev/null
@@ -0,0 +1,6 @@
+import java.util.Vector;
+
+public class DataClass {
+       private Vector<Object> v = new Vector<Object>();
+       private Vector<Object> getV() { return v; }
+}
diff --git a/tests/bugs150/pr99089/TracingAspect.java b/tests/bugs150/pr99089/TracingAspect.java
new file mode 100644 (file)
index 0000000..ba3ef7e
--- /dev/null
@@ -0,0 +1,7 @@
+import java.util.Vector;
+
+privileged aspect TracingAspect {
+       before(DataClass dc): execution(* DataClass.doit()) && this(dc) {
+               Vector<Object> myV = dc.getV();
+       }
+}
index 5e27fc0a3f9aaa6fba8df50a52784a630729605f..95ff941cc74d5cc700eff33cecee08f55009f6bb 100644 (file)
@@ -182,6 +182,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
          runTest("static import failures");
   } 
   
+//  public void testGenerics_pr99089() {
+//      runTest("ArrayIndexOutOfBoundsException - Generics in privileged aspects");
+//  }
+  
   // helper methods.....
   
   public SyntheticRepository createRepos(File cpentry) {
index 1412d4dfc4a1d27a591e974fe994608833ee1fca..eab14b2b3973b0749cc5338c92f651ea2674b0e7 100644 (file)
         <run class="PR78021"/>
     </ajc-test>
     
+    <ajc-test dir="bugs150/pr99089" vm="1.5" pr="99089" title="ArrayIndexOutOfBoundsException - Generics in privileged aspects">
+        <compile files="DataClass.java,TracingAspect.java" options="-1.5"/>
+    </ajc-test>
+    
     <ajc-test dir="bugs150" pr="79554" title="Return in try-block disables catch-block if final-block is present">
         <compile files="PR79554.java"/>
         <run class="PR79554"/>
        <compile files="P.java,Q.java,R.java"/>
        <run class="P">
            <stderr>
-               <line text="R reporting 3"/>
                <line text="Q reporting 2"/>
+               <line text="R reporting 3"/>
            </stderr>
        </run>
    </ajc-test>