]> source.dussan.org Git - aspectj.git/commitdiff
testcode for 148536 and 148537
authoraclement <aclement>
Sun, 25 Jun 2006 17:59:34 +0000 (17:59 +0000)
committeraclement <aclement>
Sun, 25 Jun 2006 17:59:34 +0000 (17:59 +0000)
tests/bugs152/pr148536/Bug.java [new file with mode: 0644]
tests/bugs152/pr148537/MyAspect.java [new file with mode: 0644]
tests/bugs152/pr148537/MyClass.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc152/ajc152.xml

diff --git a/tests/bugs152/pr148536/Bug.java b/tests/bugs152/pr148536/Bug.java
new file mode 100644 (file)
index 0000000..592801a
--- /dev/null
@@ -0,0 +1,3 @@
+public aspect Bug {
+        declare @type : Bug+ : @SomeAnnotation;
+}
\ No newline at end of file
diff --git a/tests/bugs152/pr148537/MyAspect.java b/tests/bugs152/pr148537/MyAspect.java
new file mode 100644 (file)
index 0000000..a8c54c2
--- /dev/null
@@ -0,0 +1,5 @@
+privileged public aspect MyAspect {
+
+        declare @type : MyClass+ : @MyClass.MyAnnotation;
+
+}
\ No newline at end of file
diff --git a/tests/bugs152/pr148537/MyClass.java b/tests/bugs152/pr148537/MyClass.java
new file mode 100644 (file)
index 0000000..81515b4
--- /dev/null
@@ -0,0 +1,9 @@
+
+import java.lang.annotation.*;
+
+public class MyClass {
+
+        @Retention({RetentionPolicy.RUNTIME})
+        private @interface MyAnnotation {
+        }
+}
\ No newline at end of file
index 87d466f62e6daf370ecc4d8bd62371517599257c..aba07f7bc99c4f32806142f2b5f6d5a07a0b56a8 100644 (file)
      <compile files="GenericType.java" options="-1.5"/>
      <run class="GenericType"/>
     </ajc-test>
+    
+       <ajc-test dir="bugs152/pr148536" title="NPE for unknown annotation">
+     <compile files="Bug.java" options="-1.5">
+       <message kind="error" line="2" text="SomeAnnotation cannot be resolved to a type"/>
+     </compile>
+    </ajc-test>
+    
+       <ajc-test dir="bugs152/pr148537" title="classcast annotation value">
+     <compile files="MyClass.java,MyAspect.java" options="-1.5"/>
+    </ajc-test>
 
        <ajc-test dir="bugs152/pr145391" title="itd calling generic method - 2">
      <compile files="GenericType2.java" options="-1.5"/>