diff options
author | aclement <aclement> | 2007-11-07 09:56:34 +0000 |
---|---|---|
committer | aclement <aclement> | 2007-11-07 09:56:34 +0000 |
commit | ef9eee2a1870d8b7208ea4ce186e293cc70c690d (patch) | |
tree | 726b7f59e92382e56a6883775c4038d974e57c7c | |
parent | d7ed3a72017b70f13f44515e5aa768d7f965b0e9 (diff) | |
download | aspectj-ef9eee2a1870d8b7208ea4ce186e293cc70c690d.tar.gz aspectj-ef9eee2a1870d8b7208ea4ce186e293cc70c690d.zip |
pr169428: text and fix for checking decp annotation specified on construct inside an aspect type
-rw-r--r-- | tests/bugs154/pr169428/CorrectError.java | 8 | ||||
-rw-r--r-- | tests/bugs154/pr169428/NoError.java | 8 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java | 4 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc154/ajc154.xml | 10 |
4 files changed, 29 insertions, 1 deletions
diff --git a/tests/bugs154/pr169428/CorrectError.java b/tests/bugs154/pr169428/CorrectError.java new file mode 100644 index 000000000..5677c4291 --- /dev/null +++ b/tests/bugs154/pr169428/CorrectError.java @@ -0,0 +1,8 @@ +import org.aspectj.lang.annotation.*; + +class ClassMissingAspectAnnotation { + + @Before("execution(* *(..))") + public void m() { } + +}
\ No newline at end of file diff --git a/tests/bugs154/pr169428/NoError.java b/tests/bugs154/pr169428/NoError.java new file mode 100644 index 000000000..bf57fc968 --- /dev/null +++ b/tests/bugs154/pr169428/NoError.java @@ -0,0 +1,8 @@ +import org.aspectj.lang.annotation.*; + +class ClassMissingAspectAnnotation { + + @DeclareParents("*") + public java.io.Serializable s; + +}
\ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java b/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java index 5c87ea69f..0655e37b2 100644 --- a/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java @@ -44,7 +44,9 @@ public class Ajc154Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // //parser.registerPointcutDesignatorHandler(beanHandler); // runTest("new pointcut designators in a reference pointcut"); // } - + + public void testNoErrorForAtDecpInNormalClass_pr169428() { runTest( "no error for atDecp in normal class");} + public void testJarsZipsNonStandardSuffix_pr186673() { runTest("jars and zips with non-standard suffix");} //public void testGenericTypeParameterizedWithArrayType_pr167197() { runTest("generic type parameterized with array type");} diff --git a/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml b/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml index 861e68b78..364f5bfef 100644 --- a/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml +++ b/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml @@ -3,6 +3,16 @@ <!-- AspectJ v1.6.0 Tests --> <suite> + + <ajc-test dir="bugs154/pr169428" title="no error for atDecp in normal class"> + <compile options="-1.5" files="CorrectError.java"> + <message kind="error" text="Advice must be declared inside an aspect type"/> + </compile> + <compile options="-1.5" files="NoError.java"> + <message kind="error" text="DeclareParents can only be used inside an aspect type"/> + </compile> + </ajc-test> + <ajc-test dir="bugs154/pr176991" title="wrong number of type parameters"> <compile options="-1.5" files="AspectJBugTestCase.java"/> </ajc-test> |