diff options
author | acolyer <acolyer> | 2005-08-04 13:19:47 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-08-04 13:19:47 +0000 |
commit | 7b2bd108b72dbe26c15be6e976fc499e0d8759fc (patch) | |
tree | 777c08df5b238b403e1ec7fe21de85a9633aaad3 /tests/src/org | |
parent | 7c1a5d72a8549771b076af20b4caff8e1da903bd (diff) | |
download | aspectj-7b2bd108b72dbe26c15be6e976fc499e0d8759fc.tar.gz aspectj-7b2bd108b72dbe26c15be6e976fc499e0d8759fc.zip |
improved and additional signature matching tests
Diffstat (limited to 'tests/src/org')
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java | 22 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 37 |
2 files changed, 55 insertions, 4 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java b/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java index 04f9fa7f7..c9ceace53 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java @@ -79,7 +79,15 @@ public class GenericsTests extends XMLBasedAjcTestCase { * - type variables as params PASS * - parameterized types as params PASS * - no join points for init, preinit of parameterized types (as per staticinit) PASS - * execution, withincode + * withincode + * - no generic or parameterized declaring type patterns PASS + * - no parameterized throws patterns PASS + * - return type as type variable + * - return type as parameterized type + * - parameter as type variable + * - parameter as parameterized type + * - no join points within bridge methods + * execution * - wait till we get there! * call * - wait till we get there! @@ -344,6 +352,18 @@ public class GenericsTests extends XMLBasedAjcTestCase { runTest("init and preinit with parameterized parameter types"); } + public void testWithinCodePointcutErrors() { + runTest("withincode with various parameterizations and generic types - errors"); + } + + public void testWithinCodeMatching() { + runTest("withincode with various parameterizations and generic types - matching"); + } + + public void testWithinCodeOverrideMatchingWithGenericMembers() { + runTest("withincode with overriding of inherited generic members"); + } + public void testExecutionWithRawType() { runTest("execution pcd with raw type matching"); } diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index 8d13d5ab2..7bd0776aa 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -12,6 +12,7 @@ <ajc-test dir="java5/bridgeMethods" pr="72766" title="Ignore bridge methods"> <compile files="AspectX.aj" inpath="testcode.jar" options="-showWeaveInfo"> <message kind="warning" line="7" text="pointcut did not match on the method call to a bridge method."/> + <message kind="warning" line="7" text="does not match because declaring type is Number"/> <message kind="weave" text="(AspectX.aj:18) advised by before advice from 'AspectX'"/> <message kind="weave" text="(Number.java:5) advised by before advice from 'AspectX'"/> </compile> @@ -1329,8 +1330,7 @@ <ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: @inherited"> <compile files="AnnotationInheritance.aj" options="-1.5"> <message kind="warning" line="16" text="annotatedMethodCall()"/> - <message kind="warning" line="16" text="c1MethodCall()"/> - <message kind="warning" line="17" text="c1MethodCall()"/> + <message kind="warning" line="17" text="annotatedMethodCall()"/> </compile> </ajc-test> @@ -2789,7 +2789,38 @@ <message kind="warning" line="52" text="the really wild show"/> </compile> </ajc-test> - + + <ajc-test dir="java5/generics/pointcuts" title="withincode with various parameterizations and generic types - errors"> + <compile files="WithincodePointcutMatching.aj" options="-1.5"> + <message kind="warning" line="4" text="no match for this type name: T"/> + <message kind="error" line="4" text="can't use parameterized type patterns for the declaring type of a withincode pointcut expression (use the raw type instead)"/> + <message kind="error" line="5" text="can't use parameterized type patterns for the declaring type of a withincode pointcut expression (use the raw type instead)"/> + <message kind="error" line="6" text="invalid throws pattern: a generic class may not be a direct or indirect subclass of Throwable"/> + </compile> + </ajc-test> + + <ajc-test dir="java5/generics/pointcuts" title="withincode with various parameterizations and generic types - matching"> + <compile files="WithinCodePointcutMatchingParamAndReturnTypes.aj" options="-1.5"> + <message kind="warning" line="31" text="raw param type matching in withincode ok"/> + <message kind="warning" line="32" text="raw param type matching in withincode ok"/> + <message kind="warning" line="63" text="raw return type matching in withincode ok"/> + <message kind="warning" line="34" text="erasure type matching in withincode ok"/> + <message kind="warning" line="35" text="erasure type matching in withincode ok"/> + <message kind="warning" line="38" text="erasure type matching in withincode ok"/> + <message kind="warning" line="58" text="withincode and parameterized method ok"/> + <message kind="warning" line="58" text="withincode and generic interface ok"/> + <message kind="warning" line="61" text="withincode and interface control test"/> + </compile> + </ajc-test> + + <ajc-test dir="java5/generics/pointcuts" title="withincode with overriding of inherited generic members"> + <compile files="WithinCodeOverriding.aj" options="-1.5"> + <message kind="warning" line="22" text="wildcard declaring type match on erasure"/> + <message kind="warning" line="35" text="wildcard declaring type match on erasure"/> + <message kind="warning" line="48" text="wildcard declaring type match on erasure"/> + </compile> + </ajc-test> + <ajc-test dir="java5/generics/pointcuts" title="execution pcd with raw type matching"> <compile files="GenericInterface.java,ConcreteImplementingClass.java,GenericImplementingClass.java,RawTypeMatching.aj" options="-1.5"> <message kind="warning" line="4" text="execution(* GenericInterface.*(..))"/> |