]> source.dussan.org Git - aspectj.git/commitdiff
updates to tests in accordance with generics simplification plan
authoracolyer <acolyer>
Thu, 28 Jul 2005 10:54:17 +0000 (10:54 +0000)
committeracolyer <acolyer>
Thu, 28 Jul 2005 10:54:17 +0000 (10:54 +0000)
tests/java5/generics/pointcuts/ParameterizedTypesInAnnotationPatterns.aj
tests/java5/generics/pointcuts/StaticInitializationWithParameterizedTypes.aj
tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java
tests/src/org/aspectj/systemtest/ajc150/ajc150.xml

index 54b538491110cacaff428b8fbab076cd0f7aed01..6f8b25c4f61bdafd3ee9b70b2137664d4652ac54 100644 (file)
@@ -3,8 +3,6 @@ import java.util.List;
 public aspect ParameterizedTypesInAnnotationPatterns {
        // CE - not an annotation type
        pointcut simple() : staticinitialization(@List<String> String);
-       // CE - not an annotation type
-       pointcut generic() : staticinitialization<T>(@List<T> Class<T>);
        
        // no CE, good enough for now? may improve error reporting for this later
        pointcut combined() : staticinitialization(@(Foo || List<String>) String);
index 9add7d6dc6c374aeb3025faba491d1ae81813bcd..97b167c365dd9d4e21fc7679665024066a6dd0ac 100644 (file)
@@ -2,11 +2,11 @@ public aspect StaticInitializationWithParameterizedTypes {
        
        // CE line 4
        pointcut badStaticInit() : staticinitialization(GenericInterface<Double>);
-       
+       // CE line 6
        pointcut allowedStaticInit() : staticinitialization(GenericInterface<Double>+);
        
        // CE line 9
        pointcut badStaticInitClass() : staticinitialization(GenericImplementingClass<Double>);
-       
+       // CE line 10
        pointcut allowedStaticInitClass() : staticinitialization(GenericImplementingClass<Double>+);
 }
\ No newline at end of file
index 589e0cf848f66b28af1ca5f971e29f438cfe38ef..f022a11ea61daddf7c0b17b551587f82d1e9e5c2 100644 (file)
@@ -44,22 +44,22 @@ public class GenericsTests extends XMLBasedAjcTestCase {
         *        - @Foo<T>  should fail  PASS
         *   - @Foo<String> should fail PASS
         *   - @(Foo || Bar<T>) should fail  DEFERRED (not critical)
-        * staticinitialization
-        *   - error on parameterized type PASS
-        *   - permit parameterized type + PASS
-        *   - matching with parameterized type + 
-        *   - wrong number of parameters in parameterized type  PASS
-        *   - generic type with one type parameter
-        *   - generic type with n type parameters
-        *   - generic type with bounds [extends, extends + i/f's]
-        *   - generic type with wrong number of type params
-        *   - wildcards in bounds
+        * staticinitialization PASS
+        *   - error on parameterized type PASS N/A
+        *   - permit parameterized type + PASS N/A
+        *   - matching with parameterized type + N/A 
+        *   - wrong number of parameters in parameterized type  PASS N/A
+        *   - generic type with one type parameter N/A
+        *   - generic type with n type parameters N/A
+        *   - generic type with bounds [extends, extends + i/f's] N/A
+        *   - generic type with wrong number of type params N/A
+        *   - wildcards in bounds N/A
         * within
-        *   - as above, but allows parameterized type
-        *   - wildcards in type parameters
+        *   - as above, but allows parameterized type  (disallowed is simplified plan)
+        *   - wildcards in type parameters  N/A
         * this 
         *   - no type vars
-        *   - parameterized types
+        *   - parameterized types  - disallowed in simplification plan
         *        - implements
         *        - instanceof
         * target
@@ -282,14 +282,17 @@ public class GenericsTests extends XMLBasedAjcTestCase {
                runTest("staticinitialization and parameterized types");
        }
 
-       public void testStaticInitializationMatchingWithParameterizedTypes() {
-               runTest("staticinitialization and parameterized type matching");
-       }
+       // no longer a valid test with generics simplication
+//     public void testStaticInitializationMatchingWithParameterizedTypes() {
+//             runTest("staticinitialization and parameterized type matching");
+//     }
 
-       public void testStaticInitializationWithGenericTypes() {
-               runTest("staticinitialization with generic types");
-       }
-       
+// no longer a valid test in simplified design
+//     public void testStaticInitializationWithGenericTypes() {
+//             runTest("staticinitialization with generic types");
+//     }
+
+// no longer a valid test in simplified design
 //     public void testStaticInitializationWithGenericTypesAdvanced() {
 //             runTest("staticinitialization with generic types - advanced");          
 //     }
index 5e0101ec1191aca0dc4b898711366941c6373003..115a04e9919145d59114b8f6602daa4e150e4576 100644 (file)
    <ajc-test dir="java5/generics/pointcuts" title="annotation patterns with parameterized types">
      <compile files="ParameterizedTypesInAnnotationPatterns.aj" options="-1.5">
          <message kind="error" line="5" text="is not an annotation type"/>
-         <message kind="error" line="7" text="is not an annotation type"/>
      </compile>
    </ajc-test>
    
     <ajc-test dir="java5/generics/pointcuts" title="staticinitialization and parameterized types">
      <compile files="GenericInterface.java,GenericImplementingClass.java,StaticInitializationWithParameterizedTypes.aj" options="-1.5">
-         <message kind="error" line="4" text="no static initialization join points for parameterized types, use generic or raw type instead"/>
-         <message kind="error" line="9" text="no static initialization join points for parameterized types, use generic or raw type instead"/>
+         <message kind="error" line="4" text="no static initialization join points for parameterized types, use raw type instead"/>
+         <message kind="error" line="6" text="no static initialization join points for parameterized types, use raw type instead"/>
+         <message kind="error" line="9" text="no static initialization join points for parameterized types, use raw type instead"/>
+         <message kind="error" line="11" text="no static initialization join points for parameterized types, use raw type instead"/>
      </compile>
    </ajc-test>