aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs153/pr162657
diff options
context:
space:
mode:
authoraclement <aclement>2006-10-30 10:25:24 +0000
committeraclement <aclement>2006-10-30 10:25:24 +0000
commitb83891da5769442d335d8e61d52d16e215055975 (patch)
tree9e285e4f8deeb812e326343ca25c9853ba52e547 /tests/bugs153/pr162657
parentc3be7fc35ccef9b868332a15a60c74fcc3186905 (diff)
downloadaspectj-b83891da5769442d335d8e61d52d16e215055975.tar.gz
aspectj-b83891da5769442d335d8e61d52d16e215055975.zip
tests for 162135 (commented out) and 162657 (not commented out)
Diffstat (limited to 'tests/bugs153/pr162657')
-rw-r--r--tests/bugs153/pr162657/TestAspect.aj31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/bugs153/pr162657/TestAspect.aj b/tests/bugs153/pr162657/TestAspect.aj
new file mode 100644
index 000000000..3b58ec895
--- /dev/null
+++ b/tests/bugs153/pr162657/TestAspect.aj
@@ -0,0 +1,31 @@
+import java.util.List;
+
+public aspect TestAspect {
+ private pointcut inTest(): within(TestComp);
+
+ private pointcut inAdd(BaseModel m): inTest() &&
+ execution(public BaseModel+ BaseComp+.add*(BaseModel+)) &&
+ args(m);
+
+ private pointcut inGetSearchByObj(BaseModel m): inTest() &&
+ (execution(public * BaseComp+.get*(BaseModel+)) ||
+ execution(public * BaseComp+.search*(BaseModel+))) &&
+ args(m);
+
+ private pointcut inGrate():
+ (execution(public * BaseComp+.get*(BaseModel+)) ||
+ execution(public * BaseComp+.search*(BaseModel+)));
+
+ private pointcut inUpdate(BaseModel m): inTest() &&
+ execution(public * BaseComp+.*(BaseModel+)) &&
+ args(m) && !inAdd(BaseModel) && !inGrate();
+
+ before(BaseModel m): inUpdate(m) { }
+}
+
+
+abstract class BaseComp { }
+abstract class BaseModel {}
+class TestComp {}
+
+