diff options
author | acolyer <acolyer> | 2004-12-10 13:21:26 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2004-12-10 13:21:26 +0000 |
commit | eabf8a19cab6071dedbdcf86747123126349f401 (patch) | |
tree | 4e122efb9595566762effa6b57d399c79493151b /tests/java5/annotations/within_code/WithinAndWithinCodeTests.java | |
parent | b06338f1b60de75f7b38810be5652a363c63788b (diff) | |
download | aspectj-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.java | 14 |
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 |