aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs1612
diff options
context:
space:
mode:
authoraclement <aclement>2011-09-07 18:35:05 +0000
committeraclement <aclement>2011-09-07 18:35:05 +0000
commite5ed164a438cc11f4ec55a68f28f62fc14ade0ac (patch)
tree6c60415778f25e413760536bdfd9caafc4229472 /tests/bugs1612
parent49a7b98059209f2454dde2b32875f8809d9f4fd4 (diff)
downloadaspectj-e5ed164a438cc11f4ec55a68f28f62fc14ade0ac.tar.gz
aspectj-e5ed164a438cc11f4ec55a68f28f62fc14ade0ac.zip
pointcuts and annotations - testcode
Diffstat (limited to 'tests/bugs1612')
-rw-r--r--tests/bugs1612/prx/C.java24
-rw-r--r--tests/bugs1612/prx/D.java20
2 files changed, 44 insertions, 0 deletions
diff --git a/tests/bugs1612/prx/C.java b/tests/bugs1612/prx/C.java
new file mode 100644
index 000000000..e82f44ad5
--- /dev/null
+++ b/tests/bugs1612/prx/C.java
@@ -0,0 +1,24 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Anno {
+ Class value();
+//int i();
+}
+
+public class C {
+
+ @Anno(String.class)
+ //@Anno(i=3)
+ public int i;
+
+ public static void main(String []argv) {
+ System.out.println(new C().i);
+ }
+}
+
+aspect X {
+ //before(): get(@Anno(String.class) * *(..)) {}
+ before(): get(@Anno(value=String.class) * *) {}
+ //before(): get(@Anno(i=3) * *) {}
+}
diff --git a/tests/bugs1612/prx/D.java b/tests/bugs1612/prx/D.java
new file mode 100644
index 000000000..058bf8c3c
--- /dev/null
+++ b/tests/bugs1612/prx/D.java
@@ -0,0 +1,20 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Anno {
+int i();
+}
+
+public class C {
+
+ @Anno(i=3)
+ public int i;
+
+ public static void main(String []argv) {
+ System.out.println(new C().i);
+ }
+}
+
+aspect X {
+ before(): get(@Anno(i!=3) * *) {}
+}