diff options
author | acolyer <acolyer> | 2005-07-29 13:10:36 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-07-29 13:10:36 +0000 |
commit | 42fc0becde4ce2fca4b20d0d9e1f70127b6d7f42 (patch) | |
tree | 87e749906dfefc0ef6c26c3a4cdbe47fc5980729 /tests/src | |
parent | 506b37517e2681c790cad02367107c43084f342c (diff) | |
download | aspectj-42fc0becde4ce2fca4b20d0d9e1f70127b6d7f42.tar.gz aspectj-42fc0becde4ce2fca4b20d0d9e1f70127b6d7f42.zip |
tests for initialization and preinitialization pointcut matching with generics
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java | 22 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 47 |
2 files changed, 63 insertions, 6 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java b/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java index 99ed2fee6..b382f1ff2 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java @@ -74,11 +74,11 @@ public class GenericsTests extends XMLBasedAjcTestCase { * - generic declaring type PASS * - field type is type variable PASS * - field type is parameterized PASS - * initialization, preinitialization - * - generic declaring type - * - type variables as params - * - parameterized types as params - * - no join points for init, preinit of parameterized types (as per staticinit) + * initialization, preinitialization PASS + * - generic declaring type PASS + * - 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 * - wait till we get there! * call @@ -315,6 +315,18 @@ public class GenericsTests extends XMLBasedAjcTestCase { runTest("this and target with various parameterizations and generic types - runtime"); } + public void testInitAndPreInitPointcutErrors() { + runTest("init and preinit with parameterized declaring types"); + } + + public void testInitAndPreInitPointcutMatchingWithGenericDeclaringTypes() { + runTest("init and preinit with raw declaring type pattern"); + } + + public void testInitAndPreInitPointcutMatchingWithParameterizedParameterTypes() { + runTest("init and preinit with parameterized parameter types"); + } + 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 0057270fc..acbdc7465 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -2677,7 +2677,52 @@ <message kind="warning" line="88" text="the really wild show"/> </compile> </ajc-test> - + + <ajc-test dir="java5/generics/pointcuts" title="init and preinit with parameterized declaring types"> + <compile files="InitializationPointcutMatching.aj" options="-1.5"> + <message kind="warning" line="4" text="no match for this type name: T"/> + <message kind="warning" line="5" text="no match for this type name: T"/> + <message kind="error" line="4" text="no [pre]initialization join points for parameterized types, use raw type instead"/> + <message kind="error" line="5" text="no [pre]initialization join points for parameterized types, use raw type instead"/> + <message kind="error" line="6" text="no [pre]initialization join points for parameterized types, use raw type instead"/> + <message kind="error" line="7" text="no [pre]initialization join points for parameterized types, use raw type instead"/> + <message kind="error" line="8" text="no [pre]initialization join points for parameterized types, use raw type instead"/> + <message kind="error" line="9" 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="init and preinit with raw declaring type pattern"> + <compile files="InitializationPointcutMatchingDeclaringType.aj" options="-1.5"> + <message kind="warning" line="10" text="generic/param init matching ok"/> + <message kind="warning" line="10" text="generic/param preinit matching ok"/> + </compile> + </ajc-test> + + <ajc-test dir="java5/generics/pointcuts" title="init and preinit with parameterized parameter types"> + <compile files="InitializationPointcutMatchingParamTypes.aj" options="-1.5"> + <message kind="warning" line="36" text="raw param type matching in init ok"/> + <message kind="warning" line="36" text="raw param type matching in preinit ok"/> + <message kind="warning" line="37" text="erasure matching in init ok"/> + <message kind="warning" line="37" text="erasure matching in preinit ok"/> + <message kind="warning" line="38" text="erasure matching in init with params ok"/> + <message kind="warning" line="38" text="erasure matching in preinit with params ok"/> + <message kind="warning" line="48" text="parameterized type matching in init ok"/> + <message kind="warning" line="48" text="parameterized type matching in preinit ok"/> + <message kind="warning" line="49" text="parameterized type matching in init ok x2"/> + <message kind="warning" line="49" text="parameterized type matching in preinit ok x2"/> + <message kind="warning" line="50" text="wildcard init matching ok"/> + <message kind="warning" line="50" text="wildcard preinit matching ok"/> + <message kind="warning" line="51" text="wildcard extends init matching ok"/> + <message kind="warning" line="51" text="wildcard extends preinit matching ok"/> + <message kind="warning" line="52" text="wildcard super init matching ok"/> + <message kind="warning" line="52" text="wildcard super preinit matching ok"/> + <message kind="warning" line="48" text="the really wild show"/> + <message kind="warning" line="50" text="the really wild show"/> + <message kind="warning" line="51" text="the really wild show"/> + <message kind="warning" line="52" text="the really wild show"/> + </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.*(..))"/> |