summaryrefslogtreecommitdiffstats
path: root/tests/java5/annotations/within_code/WithinAndWithinCodeTests.java
diff options
context:
space:
mode:
authoracolyer <acolyer>2004-12-10 13:21:26 +0000
committeracolyer <acolyer>2004-12-10 13:21:26 +0000
commiteabf8a19cab6071dedbdcf86747123126349f401 (patch)
tree4e122efb9595566762effa6b57d399c79493151b /tests/java5/annotations/within_code/WithinAndWithinCodeTests.java
parentb06338f1b60de75f7b38810be5652a363c63788b (diff)
downloadaspectj-eabf8a19cab6071dedbdcf86747123126349f401.tar.gz
aspectj-eabf8a19cab6071dedbdcf86747123126349f401.zip
@within, @withincode tests
Diffstat (limited to 'tests/java5/annotations/within_code/WithinAndWithinCodeTests.java')
-rw-r--r--tests/java5/annotations/within_code/WithinAndWithinCodeTests.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/java5/annotations/within_code/WithinAndWithinCodeTests.java b/tests/java5/annotations/within_code/WithinAndWithinCodeTests.java
new file mode 100644
index 000000000..96ed0188d
--- /dev/null
+++ b/tests/java5/annotations/within_code/WithinAndWithinCodeTests.java
@@ -0,0 +1,14 @@
+public aspect WithinAndWithinCodeTests {
+
+ // should be two matches, L32 and L39
+ declare warning : execution(* doSomething(..)) && @within(@MyAnnotation)
+ : "@within match on non-inherited annotation";
+
+ // one match on L39
+ declare warning : execution(* doSomething(..)) && @within(@MyInheritableAnnotation)
+ : "@within match on inheritable annotation";
+
+ // one match on L32
+ declare warning : call(* doSomething(..)) && @withincode(@MyClassRetentionAnnotation)
+ : "@withincode match";
+} \ No newline at end of file