]> source.dussan.org Git - aspectj.git/commitdiff
testcases.
authoraclement <aclement>
Mon, 24 Oct 2005 07:33:48 +0000 (07:33 +0000)
committeraclement <aclement>
Mon, 24 Oct 2005 07:33:48 +0000 (07:33 +0000)
tests/bugs150/pr112783.aj [new file with mode: 0644]
tests/bugs150/pr113445.aj [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
tests/src/org/aspectj/systemtest/ajc150/ajc150.xml

diff --git a/tests/bugs150/pr112783.aj b/tests/bugs150/pr112783.aj
new file mode 100644 (file)
index 0000000..b8ef21e
--- /dev/null
@@ -0,0 +1,13 @@
+public aspect pr112783 {
+
+       public NotYetABean.new() {
+               this(new Long(1)); 
+       }
+
+}
+
+class NotYetABean {
+
+       public NotYetABean(Long l) {            
+       }
+}
\ No newline at end of file
diff --git a/tests/bugs150/pr113445.aj b/tests/bugs150/pr113445.aj
new file mode 100644 (file)
index 0000000..15d5740
--- /dev/null
@@ -0,0 +1,7 @@
+public class pr113445
+{
+    public <T extends Enum<T>> T getEnum(String name, Class<T> enumClass)
+    {
+        return (T)new Object(); 
+    }
+}
\ No newline at end of file
index 1aabffea647fbdb6bb6758094f615e19b959135d..e2df7641c3c22a719479705cf385d68625a7673e 100644 (file)
@@ -41,16 +41,18 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
   protected File getSpecFile() {
     return new File("../tests/src/org/aspectj/systemtest/ajc150/ajc150.xml");
   }
+
   /*
-    Andys bug area - enter at your own risk...
   public void testBrokenDispatchByITD_pr72834() { runTest("broken dispatch");}
   public void testMissingAccessor_pr73856() { runTest("missing accessor");}
   public void testCantCallSuperMethods_pr90143() { runTest("cant call super methods");}
   public void testCunningDeclareParents_pr92311() { runTest("cunning declare parents");}
   public void testGenericITDsAndAbstractMethodError_pr102357() { runTest("generic itds and abstract method error");}
+  public void testITDCtor_pr112783()       { runTest("Problem with constructor ITDs");}
   */
   
   public void testUnboundFormal_pr112027() { runTest("unexpected error unboundFormalInPC");}
+  public void testCCEGenerics_pr113445()       { runTest("Generics ClassCastException");}
   
   public void testBadDecp_pr110788_1() { runTest("bad generic decp - 1");}
   public void testBadDecp_pr110788_2() { runTest("bad generic decp - 2");}
index b27a89870972d4f6f213595ef5ad38c29e64221e..32eadcb051c9cff5e274eab2e5e5f5bf30408fd5 100644 (file)
@@ -6,7 +6,15 @@
     <ajc-test dir="java5/staticImports" title="import static java.lang.System.out">
         <compile files="StaticImport.aj" options="-1.5"/>
     </ajc-test>
-
+    
+    <ajc-test dir="bugs150" title="Problem with constructor ITDs">
+        <compile files="pr112783.aj" options="-1.5"/>
+    </ajc-test>
+    <ajc-test dir="bugs150" title="Generics ClassCastException">
+        <compile files="pr113445.aj" options="-1.5,-emacssym"/>
+    </ajc-test>
+    
     <ajc-test dir="bugs150" title="test illegal change to pointcut declaration">
         <compile files="pr111915.java" options="-1.5 -showWeaveInfo">
           <message kind="weave" text="Join point 'method-execution(void SomeClass.doSomething())' in Type 'SomeClass' (pr111915.java:4) advised by around advice from 'DoesntCompile' (pr111915.java:15)"/>