aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs1612
diff options
context:
space:
mode:
authoraclement <aclement>2011-09-07 22:00:30 +0000
committeraclement <aclement>2011-09-07 22:00:30 +0000
commit6398f8e61d6ccffe14cdf62bfbf9b737fb25eddc (patch)
tree6f3a8d2b3e56162f3ac0b66eb9a66ce95432a39b /tests/bugs1612
parent668a0fbd632c4d4862f06d10fa01f2d10fa4689f (diff)
downloadaspectj-6398f8e61d6ccffe14cdf62bfbf9b737fb25eddc.tar.gz
aspectj-6398f8e61d6ccffe14cdf62bfbf9b737fb25eddc.zip
357012/357013
Diffstat (limited to 'tests/bugs1612')
-rw-r--r--tests/bugs1612/prx/C.java9
-rw-r--r--tests/bugs1612/prx/D.java15
-rw-r--r--tests/bugs1612/prx/E.java23
-rw-r--r--tests/bugs1612/prx/F.java27
-rw-r--r--tests/bugs1612/prx/G.java23
5 files changed, 88 insertions, 9 deletions
diff --git a/tests/bugs1612/prx/C.java b/tests/bugs1612/prx/C.java
index e82f44ad5..6b8c336b3 100644
--- a/tests/bugs1612/prx/C.java
+++ b/tests/bugs1612/prx/C.java
@@ -3,22 +3,21 @@ 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;
+ @Anno(Integer.class)
+ public int j;
+
public static void main(String []argv) {
System.out.println(new C().i);
+ System.out.println(new C().j);
}
}
-
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
index 058bf8c3c..028022b26 100644
--- a/tests/bugs1612/prx/D.java
+++ b/tests/bugs1612/prx/D.java
@@ -5,16 +5,23 @@ import java.lang.annotation.*;
int i();
}
-public class C {
+public class D {
@Anno(i=3)
public int i;
+ @Anno(i=4)
+ public int j;
+
+ @Anno(i=5)
+ public int k;
+
public static void main(String []argv) {
- System.out.println(new C().i);
+ System.out.println(new D().i);
+ System.out.println(new D().j);
+ System.out.println(new D().k);
}
}
-
aspect X {
- before(): get(@Anno(i!=3) * *) {}
+ before(): get(@Anno(i!=5) * *) {}
}
diff --git a/tests/bugs1612/prx/E.java b/tests/bugs1612/prx/E.java
new file mode 100644
index 000000000..bf9584b25
--- /dev/null
+++ b/tests/bugs1612/prx/E.java
@@ -0,0 +1,23 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Anno {
+ Class value() default String.class;
+}
+
+public class E {
+
+ @Anno
+ public int i;
+
+ @Anno(Integer.class)
+ public int j;
+
+ public static void main(String []argv) {
+ System.out.println(new E().i);
+ System.out.println(new E().j);
+ }
+}
+aspect X {
+ before(): get(@Anno(value=String.class) * *) {}
+}
diff --git a/tests/bugs1612/prx/F.java b/tests/bugs1612/prx/F.java
new file mode 100644
index 000000000..6945024b9
--- /dev/null
+++ b/tests/bugs1612/prx/F.java
@@ -0,0 +1,27 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Anno {
+Class i() default Number.class;
+}
+
+public class F {
+
+ @Anno(i=Integer.class)
+ public int i;
+
+ @Anno
+ public int j;
+
+ @Anno(i=String.class)
+ public int k;
+
+ public static void main(String []argv) {
+ System.out.println(new F().i);
+ System.out.println(new F().j);
+ System.out.println(new F().k);
+ }
+}
+aspect X {
+ before(): get(@Anno(i!=String.class) * *) {}
+}
diff --git a/tests/bugs1612/prx/G.java b/tests/bugs1612/prx/G.java
new file mode 100644
index 000000000..8158d6b25
--- /dev/null
+++ b/tests/bugs1612/prx/G.java
@@ -0,0 +1,23 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Anno {
+ Class value();
+}
+
+public class G {
+
+ @Anno(String.class)
+ public int i;
+
+ @Anno(Integer.class)
+ public int j;
+
+ public static void main(String []argv) {
+ System.out.println(new G().i);
+ System.out.println(new G().j);
+ }
+}
+aspect X {
+ before(): get(@Anno(value=Foo.class) * *) {}
+}