summaryrefslogtreecommitdiffstats
path: root/tests/bugs164
diff options
context:
space:
mode:
authoraclement <aclement>2009-02-10 00:43:41 +0000
committeraclement <aclement>2009-02-10 00:43:41 +0000
commit363b3661a41ea8241a3d55aa7e2485e39fad1825 (patch)
treeb18c97c5424825c89c5d825bee8de13db1156541 /tests/bugs164
parent6a46a9eaf098d04844852e055c75d062c1361e8c (diff)
downloadaspectj-363b3661a41ea8241a3d55aa7e2485e39fad1825.tar.gz
aspectj-363b3661a41ea8241a3d55aa7e2485e39fad1825.zip
263310: testcode, not failing so far
Diffstat (limited to 'tests/bugs164')
-rw-r--r--tests/bugs164/pr263310/HandleTestingAspect.java75
1 files changed, 75 insertions, 0 deletions
diff --git a/tests/bugs164/pr263310/HandleTestingAspect.java b/tests/bugs164/pr263310/HandleTestingAspect.java
new file mode 100644
index 000000000..86b37f197
--- /dev/null
+++ b/tests/bugs164/pr263310/HandleTestingAspect.java
@@ -0,0 +1,75 @@
+package p;
+
+import java.util.ArrayList;
+
+public aspect HandleTestingAspect {
+
+ static class InnerClass {
+ int x;
+ { }
+
+ static aspect InnerInnerAspect {
+ int x;
+ static { } // 13
+ }
+
+ public void doNothing() {}
+ }
+
+ before() : call(* *.doNothing()) {
+
+ }
+
+ before(int x, long y) : execution(* *.foo(int,long)) && args(x,y) {
+ InnerClass u = new InnerClass() {
+ public void doNothing() {
+ doNothing();
+ }
+ };
+ u.doNothing();
+ }
+
+ interface X { }
+
+
+ public void doNothing() {}
+
+ // testing ITDs
+ int X.X = 6;
+// int X.itd() { return 1;}
+// X.new() { }
+// int X.itd(int x) { return 1;}
+// X.new(int x) { }
+
+
+ declare parents : HandleTestingClass extends InnerClass;
+ declare parents : HandleTestingClass implements X;
+ declare soft : Exception : execution(void HandleTestingClass.foo1(int,long));
+ declare error : call(void HandleTestingClass.foo1(int,long)) : "";
+ declare warning : call(void HandleTestingClass.foo2(int,long)) : "";
+
+ pointcut ypc(int y) : call(* *.yCall(int)) && args(y);
+ pointcut zpc(int z) : call(* *.zCall(int)) && args(z);
+
+ // should not have a count
+ before(int y) : ypc(y) { }
+ after(int y) : ypc(y) { }
+ after(int y) throwing(Exception e) : ypc(y) { }
+ after(int y) returning(int z) : ypc(y) { }
+ int around(int y) : ypc(y) { return 1; }
+
+ // should have a count
+ before(int y) : zpc(y) { }
+ after(int y) : zpc(y) { }
+ after(int y) throwing(Exception e) : zpc(y) { }
+ after(int y) returning(int z) : zpc(y) { }
+ int around(int y) : ypc(y) { return 1; }
+
+ // should have a count of 3
+ Object around(int y) : ypc(y) { return null; }
+
+
+ after() returning(java.util.List z) : call(* *.zCall(int)) { }
+}
+
+class HandleTestingClass {} \ No newline at end of file