]> source.dussan.org Git - aspectj.git/commitdiff
377130 tests V1_7_0RC1
authorAndy Clement <andrew.clement@gmail.com>
Fri, 25 May 2012 22:50:47 +0000 (15:50 -0700)
committerAndy Clement <andrew.clement@gmail.com>
Fri, 25 May 2012 22:50:47 +0000 (15:50 -0700)
tests/bugs170/pr377130/Foo.java [new file with mode: 0644]
tests/bugs170/pr377130/Foo2.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
tests/src/org/aspectj/systemtest/ajc170/ajc170.xml

diff --git a/tests/bugs170/pr377130/Foo.java b/tests/bugs170/pr377130/Foo.java
new file mode 100644 (file)
index 0000000..734ccbc
--- /dev/null
@@ -0,0 +1,11 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Anno {}
+
+@Anno
+aspect Foo {
+  public static void main(String []argv) {
+    System.out.println(Foo.class.getAnnotation(Anno.class));
+  }
+}
diff --git a/tests/bugs170/pr377130/Foo2.java b/tests/bugs170/pr377130/Foo2.java
new file mode 100644 (file)
index 0000000..b1b194f
--- /dev/null
@@ -0,0 +1,11 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Anno {}
+
+@Anno
+privileged aspect Foo2 {
+  public static void main(String []argv) {
+    System.out.println(Foo2.class.getAnnotation(Anno.class));
+  }
+}
index 47329f52ac21aa8eb5b383374ddf1fbb5409aa8c..3896a93abe21aa59150cfab02db7f346a81bcc63 100644 (file)
@@ -31,6 +31,14 @@ import org.aspectj.weaver.tools.StandardPointcutParser;
  */ 
 public class Ajc170Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
 
+//     public void testLostAnnos_377130() {
+//             runTest("missing annos on priv aspects");
+//     }
+//
+//     public void testLostAnnos_377130_2() {
+//             runTest("missing annos on priv aspects - 2");
+//     }
+
        public void testAttributeErrorJ7() {
                runTest("attribute issue with J7");
        }
index 300dd9454e8cdfd3b48948a7fef1f66cca055caf..459ba902c0e383a0008442f3fd6ab8456538685d 100644 (file)
@@ -2,6 +2,22 @@
 
 <suite>
 
+       <ajc-test dir="bugs170/pr377130" title="missing annos on priv aspects">
+       <compile files="Foo.java" options="-1.5"/>
+       <run class="Foo">
+       <stdout>
+       <line text="@Anno()"/></stdout>
+       </run>
+       </ajc-test>
+       
+       <ajc-test dir="bugs170/pr377130" title="missing annos on priv aspects - 2">
+       <compile files="Foo2.java" options="-1.5"/>
+       <run class="Foo2">
+       <stdout>
+       <line text="@Anno()"/></stdout>
+       </run>
+       </ajc-test>
+
        <ajc-test dir="bugs170/pr376351" title="attribute issue with J7">
      <compile files="R.java R1.java" outjar="code.jar" options="-1.5"/>
      <compile files="RAj.java" options="-1.7 -Xlint:ignore" outjar="aspects.jar" classpath="code.jar"/>