From: aclement Date: Thu, 8 May 2008 21:13:45 +0000 (+0000) Subject: 231187: test and fix. Do the parameterization check after ITDs have applied X-Git-Tag: V1_6_1x~64 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4e315bcea79925d24801acac5465982a683c6e7a;p=aspectj.git 231187: test and fix. Do the parameterization check after ITDs have applied --- diff --git a/tests/bugs161/pr231187/Cement.java b/tests/bugs161/pr231187/Cement.java new file mode 100644 index 000000000..3fd69d035 --- /dev/null +++ b/tests/bugs161/pr231187/Cement.java @@ -0,0 +1,5 @@ +package concrete; + +public interface Cement { + public int getWeight(); +} diff --git a/tests/bugs161/pr231187/ConcreteClass.java b/tests/bugs161/pr231187/ConcreteClass.java new file mode 100644 index 000000000..c0eb8af5c --- /dev/null +++ b/tests/bugs161/pr231187/ConcreteClass.java @@ -0,0 +1,19 @@ +package concrete; + +import java.util.Vector; + +public class ConcreteClass extends SuperClass { + + @Override + public Vector getSomeTs() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void addSomeTs(Vector newTs) { + // TODO Auto-generated method stub + someTs.addAll(newTs); + } + +} diff --git a/tests/bugs161/pr231187/Main.java b/tests/bugs161/pr231187/Main.java new file mode 100644 index 000000000..2f98e15be --- /dev/null +++ b/tests/bugs161/pr231187/Main.java @@ -0,0 +1,14 @@ +package concrete; + +import java.util.*; + +public class Main { + public static void main(String[] args) { + ConcreteClass cc = new ConcreteClass(); + WetCement wc = new WetCement(); + Vector v = new Vector(); + v.add(wc); + cc.addSomeTs(v); + System.out.println("ran!"); + } +} \ No newline at end of file diff --git a/tests/bugs161/pr231187/SuperClass.java b/tests/bugs161/pr231187/SuperClass.java new file mode 100644 index 000000000..18c1fe669 --- /dev/null +++ b/tests/bugs161/pr231187/SuperClass.java @@ -0,0 +1,8 @@ +package concrete; +import java.util.Vector; + +public abstract class SuperClass { + Vector someTs = new Vector(); + public abstract Vector getSomeTs(); + public abstract void addSomeTs(Vector newTs); +} diff --git a/tests/bugs161/pr231187/SuperClassAspect.aj b/tests/bugs161/pr231187/SuperClassAspect.aj new file mode 100644 index 000000000..c37074499 --- /dev/null +++ b/tests/bugs161/pr231187/SuperClassAspect.aj @@ -0,0 +1,12 @@ +package concrete; + +import java.util.Vector; + + +public aspect SuperClassAspect { + declare parents : WetCement implements Cement; + + after(SuperClass sc, Vector cm) returning: execution(void SuperClass.addSomeTs(Vector)) && target(sc) && args(cm) { + // System.out.println(cm); + } +} diff --git a/tests/bugs161/pr231187/WetCement.java b/tests/bugs161/pr231187/WetCement.java new file mode 100644 index 000000000..dfefde076 --- /dev/null +++ b/tests/bugs161/pr231187/WetCement.java @@ -0,0 +1,6 @@ +package concrete; + +public class WetCement { + boolean wet = true; + public int getWeight() { return 5; } +} diff --git a/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java b/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java index 7f0f6fd49..f9346d8b3 100644 --- a/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java @@ -19,6 +19,8 @@ import org.aspectj.testing.XMLBasedAjcTestCase; public class Ajc161Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // AspectJ1.6.1 + public void testGenericsBoundsDecp_pr231187() { runTest("generics bounds decp"); } + public void testGenericsBoundsDecp_pr231187_2() { runTest("generics bounds decp - 2"); } public void testLtwInheritedCflow_pr230134() { runTest("ltw inherited cflow"); } public void testAroundAdviceOnFieldSet_pr229910() { runTest("around advice on field set"); } public void testPipelineCompilationGenericReturnType_pr226567() { runTest("pipeline compilation and generic return type"); } diff --git a/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml b/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml index f864b64b2..b05dc4eee 100644 --- a/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml +++ b/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml @@ -3,6 +3,21 @@ + + + + + + + + + + + + + + +