aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs153
diff options
context:
space:
mode:
authoraclement <aclement>2006-07-11 07:56:23 +0000
committeraclement <aclement>2006-07-11 07:56:23 +0000
commit5c5803307fcc99fa0f830b55000adadef3d857c9 (patch)
tree85913446e98a1e12fa0f50b0c7b5dd5a29fab139 /tests/bugs153
parentc38a878e00f5fa4bb51ec68d9cb4c292402aa14e (diff)
downloadaspectj-5c5803307fcc99fa0f830b55000adadef3d857c9.tar.gz
aspectj-5c5803307fcc99fa0f830b55000adadef3d857c9.zip
test for 121805. commented out test for 145442 (not recreated yet)
Diffstat (limited to 'tests/bugs153')
-rw-r--r--tests/bugs153/pr121805/Complex.java41
-rw-r--r--tests/bugs153/pr145442/MissingLineNumbers.java18
2 files changed, 59 insertions, 0 deletions
diff --git a/tests/bugs153/pr121805/Complex.java b/tests/bugs153/pr121805/Complex.java
new file mode 100644
index 000000000..aa6d025c1
--- /dev/null
+++ b/tests/bugs153/pr121805/Complex.java
@@ -0,0 +1,41 @@
+class CommonEntity {
+
+ public void add(CommonEntity ce) {}
+ public void remove(CommonEntity ce) {}
+
+}
+
+class ManageEntity {
+
+ ManageEntity(CommonEntity ce) {
+ }
+}
+
+
+abstract aspect Y {
+ abstract pointcut entityAccessor(CommonEntity entity);
+ before(CommonEntity entity): entityAccessor(entity) {}
+}
+
+
+aspect X extends Y {
+
+ public pointcut entityAccessor1(CommonEntity entity)
+ : (execution(* CommonEntity+.add*(CommonEntity+))
+ || (execution(* CommonEntity+.remove*(CommonEntity+))))
+ && within(CommonEntity+)
+ && args(entity) && if(entity != null);
+
+ public pointcut entityAccessor2(CommonEntity entity)
+ : execution(ManageEntity.new(CommonEntity+, ..))
+ && within(ManageEntity)
+ && args(entity, ..)
+ && if(entity != null);
+
+ public pointcut entityAccessor(CommonEntity entity)
+ : entityAccessor1(entity) || entityAccessor2(entity);
+
+
+}
+
+
diff --git a/tests/bugs153/pr145442/MissingLineNumbers.java b/tests/bugs153/pr145442/MissingLineNumbers.java
new file mode 100644
index 000000000..08cca8fa1
--- /dev/null
+++ b/tests/bugs153/pr145442/MissingLineNumbers.java
@@ -0,0 +1,18 @@
+public class MissingLineNumbers {
+ public static void main(String []argv) {
+ new MissingLineNumbers().foo();
+ }
+
+ public void foo() {
+ System.err.println("hello");
+ System.err.println("world");
+ }
+}
+
+aspect X {
+ void around(): call(* foo(..)) {
+ new RuntimeException().printStackTrace();
+ }
+}
+
+