]> source.dussan.org Git - aspectj.git/commitdiff
347684: testcode
authoraclement <aclement>
Tue, 31 May 2011 22:16:53 +0000 (22:16 +0000)
committeraclement <aclement>
Tue, 31 May 2011 22:16:53 +0000 (22:16 +0000)
tests/bugs1612/pr347684/BindingInts.java [new file with mode: 0644]
tests/bugs1612/pr347684/BindingInts2.java [new file with mode: 0644]
tests/bugs1612/pr347684/BindingInts3.java [new file with mode: 0644]
tests/bugs1612/pr347684/BindingInts4.java [new file with mode: 0644]
tests/bugs1612/pr347684/BindingInts5.java [new file with mode: 0644]
tests/bugs1612/pr347684/BindingInts6.java [new file with mode: 0644]

diff --git a/tests/bugs1612/pr347684/BindingInts.java b/tests/bugs1612/pr347684/BindingInts.java
new file mode 100644 (file)
index 0000000..bac7bda
--- /dev/null
@@ -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 (file)
index 0000000..ffa12d0
--- /dev/null
@@ -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 (file)
index 0000000..d90de6b
--- /dev/null
@@ -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 (file)
index 0000000..50eaeb7
--- /dev/null
@@ -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 (file)
index 0000000..e211ef2
--- /dev/null
@@ -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 (file)
index 0000000..763b9d7
--- /dev/null
@@ -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);
+  }
+}