diff options
author | aclement <aclement> | 2006-09-25 15:02:19 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-09-25 15:02:19 +0000 |
commit | b53e59401bf0228e127edbde36efe074181859f0 (patch) | |
tree | 6ce55e7e43c176b51bfdd5c46cd738ffac1db37c | |
parent | b69748e35322013e378a5eb830fbd0ac8ace25f4 (diff) | |
download | aspectj-b53e59401bf0228e127edbde36efe074181859f0.tar.gz aspectj-b53e59401bf0228e127edbde36efe074181859f0.zip |
testcase for 153464 - commented out at the mo
-rw-r--r-- | tests/bugs153/pr153464/Bug.java | 29 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java | 1 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc153/ajc153.xml | 6 |
3 files changed, 36 insertions, 0 deletions
diff --git a/tests/bugs153/pr153464/Bug.java b/tests/bugs153/pr153464/Bug.java new file mode 100644 index 000000000..f6127d04d --- /dev/null +++ b/tests/bugs153/pr153464/Bug.java @@ -0,0 +1,29 @@ +import java.lang.annotation.*; + +aspect TestAspect { + // works - Derived.func() omitted +// declare warning : execution(@Annot * *(..)) && !within(@Annot *): "hi!"; + + // fails - Derived.func() not omitted + declare warning : execution(@Annot * *(..)) && within(!@Annot *) : "within includes negated annotation"; +} + + +class Base { + void func() { } +} + +//@Annot +class AnnotTest { + @Annot + class Derived extends Base { + @Annot void func() { } + } +// + // class NoAnnotClass { + // @Annot void func() { } + //} +} + +//@Retention(RetentionPolicy.RUNTIME) +@interface Annot { }; diff --git a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java index 3fdae3771..2a8f97340 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java @@ -28,6 +28,7 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // public void testCFlowXMLAspectLTW_pr149096() { runTest("cflow xml concrete aspect"); } // public void testAmbiguousBinding_pr121805() { runTest("ambiguous binding");} // public void testNoIllegalStateExceptionWithGenericInnerAspect_pr156058() { runTest("no IllegalStateException with generic inner aspect"); } +// public void testNegatedAnnotationMatchingProblem_pr153464() { runTest("negated annotation matching problem");} public void testAnnotationStylePointcutNPE_pr158412() { runTest("annotation style pointcut npe"); } public void testAnnotationStylePointcutNPE_pr158412_2() { runTest("annotation style pointcut npe - 2"); } public void testAnnotationsCallConstructors_pr158126() { runTest("annotations, call and constructors problem");} diff --git a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml index 455f181b1..163d0a98d 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml +++ b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml @@ -11,6 +11,12 @@ <ajc-test dir="bugs153/pr158412" title="annotation style pointcut npe"> <compile files="layering/Layering.aj,layering/SystemArchitektur.java" options="-1.5"/> </ajc-test> + + <ajc-test dir="bugs153/pr153464" title="negated annotation matching problem"> + <compile files="Bug.java" options="-1.5"> + <message kind="warning" line="99"/> + </compile> + </ajc-test> <ajc-test dir="bugs153/pr158412" title="annotation style pointcut npe - 2"> <compile files="layering/Layering.aj,layering/SystemArchitektur.java,dao/Foo.java" options="-1.5"> |