]> source.dussan.org Git - aspectj.git/commitdiff
219298: testcode
authoraclement <aclement>
Tue, 19 Feb 2008 18:51:58 +0000 (18:51 +0000)
committeraclement <aclement>
Tue, 19 Feb 2008 18:51:58 +0000 (18:51 +0000)
tests/bugs160/pr219298/TestMarkers2.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
tests/src/org/aspectj/systemtest/ajc160/ajc160.xml

diff --git a/tests/bugs160/pr219298/TestMarkers2.java b/tests/bugs160/pr219298/TestMarkers2.java
new file mode 100644 (file)
index 0000000..7b6259d
--- /dev/null
@@ -0,0 +1,12 @@
+public class TestMarkers2 {
+        public class SuperGenericsType {}
+
+        public class SubGenericsType 
+                //Following line would produce correct code
+                extends SuperGenericsType
+        {}
+
+        public class Super<T extends SuperGenericsType> {}
+
+        public class Sub extends Super<SubGenericsType> {}
+}
\ No newline at end of file
index 4e5aa1eead8657e2fcde3ceedf033b354e1ebd1a..56a16772b8fa82861354b76d669ef9a538e6dce7 100644 (file)
@@ -19,7 +19,9 @@ import junit.framework.Test;
  * These are tests for AspectJ1.6.0
  */
 public class Ajc160Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
-       
+
+       public void testBoundsCheckShouldFail_pr219298() { runTest("bounds check failure");}
+       public void testBoundsCheckShouldFail_pr219298_2() { runTest("bounds check failure - 2");}
        public void testDecFieldProblem_pr218167() { runTest("dec field problem");}
        public void testGenericsSuperITD_pr206911() { runTest("generics super itd"); }
        public void testGenericsSuperITD_pr206911_2() { runTest("generics super itd - 2"); }
index ee5e641379ca6b6bb19cbe91ba14d2762fe34df4..7fc993fc2ecae14e38175d2e35d5b54f6af8fe83 100644 (file)
@@ -3,6 +3,16 @@
 <!-- AspectJ v1.6.0 Tests -->
 <suite>
 
+   <ajc-test dir="bugs160/pr219298" title="bounds check failure">
+     <compile options="-1.5" files="TestMarkers.java">
+       <message kind="error" line="11" text="Bound mismatch: The type TestMarkers.SubGenericsType is not a valid substitute for the bounded"/>
+     </compile>
+   </ajc-test>
+
+   <ajc-test dir="bugs160/pr219298" title="bounds check failure - 2">
+     <compile options="-1.5" files="TestMarkers2.java"/>
+   </ajc-test>
+
    <ajc-test dir="bugs160/pr218167" title="dec field problem">
      <compile options="-1.5" files="Test.java">
        <message kind="warning" text="already has an annotation of type A, cannot add a second instance"/>