From 5b4fa2296be8a35ca767088f754f79e5fc791307 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 31 May 2011 22:16:53 +0000 Subject: [PATCH] 347684: testcode --- tests/bugs1612/pr347684/BindingInts.java | 24 ++++++++++++++++++ tests/bugs1612/pr347684/BindingInts2.java | 26 +++++++++++++++++++ tests/bugs1612/pr347684/BindingInts3.java | 26 +++++++++++++++++++ tests/bugs1612/pr347684/BindingInts4.java | 25 ++++++++++++++++++ tests/bugs1612/pr347684/BindingInts5.java | 25 ++++++++++++++++++ tests/bugs1612/pr347684/BindingInts6.java | 31 +++++++++++++++++++++++ 6 files changed, 157 insertions(+) create mode 100644 tests/bugs1612/pr347684/BindingInts.java create mode 100644 tests/bugs1612/pr347684/BindingInts2.java create mode 100644 tests/bugs1612/pr347684/BindingInts3.java create mode 100644 tests/bugs1612/pr347684/BindingInts4.java create mode 100644 tests/bugs1612/pr347684/BindingInts5.java create mode 100644 tests/bugs1612/pr347684/BindingInts6.java diff --git a/tests/bugs1612/pr347684/BindingInts.java b/tests/bugs1612/pr347684/BindingInts.java new file mode 100644 index 000000000..bac7bdaa9 --- /dev/null +++ b/tests/bugs1612/pr347684/BindingInts.java @@ -0,0 +1,24 @@ +import java.lang.annotation.*; + +@Retention(RetentionPolicy.RUNTIME) +@interface Foo { + int i() default 37; +} + + +public class BindingInts { + public static void main(String []argv) { + BindingInts inst = new BindingInts(); + inst.a(); + inst.b(); + } +@Foo +void a() {} +void b() {} +} + +aspect X { + before(int i): execution(* a(..)) && @annotation(Foo(i)) { + System.out.println(thisJoinPointStaticPart+" "+i); + } +} diff --git a/tests/bugs1612/pr347684/BindingInts2.java b/tests/bugs1612/pr347684/BindingInts2.java new file mode 100644 index 000000000..ffa12d000 --- /dev/null +++ b/tests/bugs1612/pr347684/BindingInts2.java @@ -0,0 +1,26 @@ +import java.lang.annotation.*; + +@Retention(RetentionPolicy.RUNTIME) +@interface Foo { + int i() default 37; +} + + +public class BindingInts2 { + public static void main(String []argv) { + BindingInts2 inst = new BindingInts2(); + inst.a(); + inst.b(); + } + + @Foo(i=99) + void a() {} + + void b() {} +} + +aspect X { + before(int i): execution(* a(..)) && @annotation(Foo(i)) { + System.out.println(thisJoinPointStaticPart+" "+i); + } +} diff --git a/tests/bugs1612/pr347684/BindingInts3.java b/tests/bugs1612/pr347684/BindingInts3.java new file mode 100644 index 000000000..d90de6b03 --- /dev/null +++ b/tests/bugs1612/pr347684/BindingInts3.java @@ -0,0 +1,26 @@ +import java.lang.annotation.*; + +@Retention(RetentionPolicy.RUNTIME) +@interface Foo { + String i() default "abc"; +} + + +public class BindingInts3 { + public static void main(String []argv) { + BindingInts3 inst = new BindingInts3(); + inst.a(); + inst.b(); + } + + @Foo + void a() {} + + void b() {} +} + +aspect X { + before(String i): execution(* a(..)) && @annotation(Foo(i)) { + System.out.println(thisJoinPointStaticPart+" "+i); + } +} diff --git a/tests/bugs1612/pr347684/BindingInts4.java b/tests/bugs1612/pr347684/BindingInts4.java new file mode 100644 index 000000000..50eaeb75d --- /dev/null +++ b/tests/bugs1612/pr347684/BindingInts4.java @@ -0,0 +1,25 @@ +import java.lang.annotation.*; + +@Retention(RetentionPolicy.RUNTIME) +@interface Foo { + int i() default 37; + int j() default 48; +} + + +public class BindingInts4 { + public static void main(String []argv) { + BindingInts4 inst = new BindingInts4(); + inst.a(); + inst.b(); + } +@Foo +void a() {} +void b() {} +} + +aspect X { + before(int i,int j): execution(* a(..)) && @annotation(Foo(i)) && @annotation(Foo(j)) { + System.out.println(thisJoinPointStaticPart+" "+i+" "+j); + } +} diff --git a/tests/bugs1612/pr347684/BindingInts5.java b/tests/bugs1612/pr347684/BindingInts5.java new file mode 100644 index 000000000..e211ef2fd --- /dev/null +++ b/tests/bugs1612/pr347684/BindingInts5.java @@ -0,0 +1,25 @@ +import java.lang.annotation.*; + +@Retention(RetentionPolicy.RUNTIME) +@interface Foo { + String s() default "abc"; + int i() default 37; +} + + +public class BindingInts5 { + public static void main(String []argv) { + BindingInts5 inst = new BindingInts5(); + inst.a(); + inst.b(); + } +@Foo +void a() {} +void b() {} +} + +aspect X { + before(int i): execution(* a(..)) && @annotation(Foo(i)) { + System.out.println(thisJoinPointStaticPart+" "+i); + } +} diff --git a/tests/bugs1612/pr347684/BindingInts6.java b/tests/bugs1612/pr347684/BindingInts6.java new file mode 100644 index 000000000..763b9d72a --- /dev/null +++ b/tests/bugs1612/pr347684/BindingInts6.java @@ -0,0 +1,31 @@ +import java.lang.annotation.*; + +enum Color { R,G,B; } + +@Retention(RetentionPolicy.RUNTIME) +@interface Foo { + String s() default "abc"; + int i() default 37; + Color c() default Color.G; + int j() default 21; + int k() default 101; + float f() default 1.0f; +} + + +public class BindingInts6 { + public static void main(String []argv) { + BindingInts6 inst = new BindingInts6(); + inst.a(); + inst.b(); + } +@Foo(j=1,k=99) +void a() {} +void b() {} +} + +aspect X { + before(int i,int j, int k): execution(* a(..)) && @annotation(Foo(i)) && @annotation(Foo(j)) && @annotation(Foo(k)) { + System.out.println(thisJoinPointStaticPart+" "+i+" "+j+" "+k); + } +} -- 2.39.5