aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs1811
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2016-12-16 15:47:37 -0800
committerAndy Clement <aclement@pivotal.io>2016-12-16 15:47:37 -0800
commitab4df7e110b0a4ddfc9cc1ec1653d3433c9605c4 (patch)
treed0b53279c531d2674041050e0a0510cd0f4c34a6 /tests/bugs1811
parent8e079ecde2315294e16de8304899d19acdd15c36 (diff)
downloadaspectj-ab4df7e110b0a4ddfc9cc1ec1653d3433c9605c4.tar.gz
aspectj-ab4df7e110b0a4ddfc9cc1ec1653d3433c9605c4.zip
1.8.11 test setup and wip tests
Diffstat (limited to 'tests/bugs1811')
-rw-r--r--tests/bugs1811/509235/Code.java17
-rw-r--r--tests/bugs1811/509235/Code2.java17
-rw-r--r--tests/bugs1811/parameterizedWithInner/Code.java20
3 files changed, 54 insertions, 0 deletions
diff --git a/tests/bugs1811/509235/Code.java b/tests/bugs1811/509235/Code.java
new file mode 100644
index 000000000..be7bb10e0
--- /dev/null
+++ b/tests/bugs1811/509235/Code.java
@@ -0,0 +1,17 @@
+public class Code {
+ public static void main(String []argv) {
+ foo("fooname");
+ bar("crap","barname");
+ }
+
+ public static void foo(String username) {}
+
+ public static void bar(String a, String username) { }
+}
+
+aspect X {
+ before(String username): (execution(public static * foo(..)) && args(username,..)) ||
+ (execution(public static * bar(..)) && args(*,username,..)) {
+ System.out.println("username = "+username);
+ }
+}
diff --git a/tests/bugs1811/509235/Code2.java b/tests/bugs1811/509235/Code2.java
new file mode 100644
index 000000000..67765c1cb
--- /dev/null
+++ b/tests/bugs1811/509235/Code2.java
@@ -0,0 +1,17 @@
+public class Code2 {
+ public static void main(String []argv) {
+ foo("fooname");
+ bar("crap","barname");
+ }
+
+ public static void foo(String username) {}
+
+ public static void bar(String a, String username) { }
+}
+
+aspect X {
+ before(String username): (execution(public static * foo(..)) && args(username)) ||
+ (execution(public static * bar(..)) && args(*,username)) {
+ System.out.println("username = "+username);
+ }
+}
diff --git a/tests/bugs1811/parameterizedWithInner/Code.java b/tests/bugs1811/parameterizedWithInner/Code.java
new file mode 100644
index 000000000..182a01d88
--- /dev/null
+++ b/tests/bugs1811/parameterizedWithInner/Code.java
@@ -0,0 +1,20 @@
+public class Code {
+ public static void main(String []argv) {
+ }
+}
+
+class Outer<T> {
+ class Inner {
+ T t;
+ Inner(T t) {
+ this.t =t ;
+ }
+ }
+
+ public Inner m() {return null;}
+ public Outer<String>.Inner m2() {
+ Outer<String> os = new Outer<String>();
+ return os.new Inner("foo");
+ }
+ public Outer<?>.Inner m3() {return null;}
+}