From 6398f8e61d6ccffe14cdf62bfbf9b737fb25eddc Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 7 Sep 2011 22:00:30 +0000 Subject: 357012/357013 --- tests/bugs1612/prx/C.java | 9 ++++----- tests/bugs1612/prx/D.java | 15 +++++++++++---- tests/bugs1612/prx/E.java | 23 +++++++++++++++++++++++ tests/bugs1612/prx/F.java | 27 +++++++++++++++++++++++++++ tests/bugs1612/prx/G.java | 23 +++++++++++++++++++++++ 5 files changed, 88 insertions(+), 9 deletions(-) create mode 100644 tests/bugs1612/prx/E.java create mode 100644 tests/bugs1612/prx/F.java create mode 100644 tests/bugs1612/prx/G.java (limited to 'tests/bugs1612') 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) * *) {} +} -- cgit v1.2.3