summaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-08-18 09:31:48 +0000
committeracolyer <acolyer>2005-08-18 09:31:48 +0000
commite1e8a032d34bf125561f5fadaf1fba3f37d2d56f (patch)
tree454b4569a8e1e8b5d7268b3feda808d8d162b1cc /tests/src
parentf7a8c2e721fa01b1b78607a37e57e983f5349062 (diff)
downloadaspectj-e1e8a032d34bf125561f5fadaf1fba3f37d2d56f.tar.gz
aspectj-e1e8a032d34bf125561f5fadaf1fba3f37d2d56f.zip
tests for pr107059 and generics chapter of ajdk
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java12
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ajc150.xml58
3 files changed, 73 insertions, 1 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
index 3c15df3a6..1e51bb851 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
@@ -214,6 +214,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
runTest("intermediate annotation matching");
}
+ public void testBadRuntimeTestGeneration() {
+ runTest("target(@Foo *)");
+ }
+
// helper methods.....
public SyntheticRepository createRepos(File cpentry) {
diff --git a/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java b/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java
index e7c9d88c0..43200dfb2 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java
@@ -619,6 +619,18 @@ public class GenericsTests extends XMLBasedAjcTestCase {
runTest("ajdk notebook: args examples");
}
+ public void testAJDKArgsAndWildcardsExamples() {
+ runTest("ajdk notebook: args and wildcards examples");
+ }
+
+ public void testAJDKAfterReturningExamples() {
+ runTest("ajdk notebook: after returning examples");
+ }
+
+ public void testAJDKPointcutInGenericClassExample() {
+ runTest("ajdk notebook: pointcut in generic class example");
+ }
+
// --- helpers
// Check the signature attribute on a class is correct
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
index 7876299cf..4cd47674d 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
+++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
@@ -61,6 +61,12 @@
</compile>
</ajc-test>
+ <ajc-test dir="bugs150" pr="107059" title="target(@Foo *)">
+ <compile files="pr107059_2.aj" options="-1.5">
+ <message kind="error" line="4" text="wildcard type pattern not allowed"></message>
+ </compile>
+ </ajc-test>
+
<ajc-test dir="bugs150/pr106130" pr="106130" title="test weaving with > 256 locals">
<compile files="AroundLotsOfVars.java LotsOfVars.java" options="-preserveAllLocals"/>
<run class="LotsOfVars">
@@ -3615,7 +3621,57 @@
</run>
</ajc-test>
-
+ <ajc-test title="ajdk notebook: after returning examples" dir="java5/generics/ajdk">
+ <compile files="AfterReturningExamples.aj" options="-1.5">
+ <message kind="warning" line="20" text="unchecked match of List&lt;Double&gt; with List&lt;? extends Number&gt;"/>
+ </compile>
+ <run class="AfterReturningExamples">
+ <stdout>
+ <line text="execution(List C.foo(List))"/>
+ <line text="raw s1"/>
+ <line text="raw s2"/>
+ <line text="execution(List C.bar(List))"/>
+ <line text="raw 5.0"/>
+ <line text="raw 10.0"/>
+ <line text="a1 5.0"/>
+ <line text="a1 10.0"/>
+ <line text="a2 5.0"/>
+ <line text="a2 10.0"/>
+ <line text="a3 5.0"/>
+ <line text="a3 10.0"/>
+ <line text="execution(List C.goo(List))"/>
+ <line text="raw 5.0"/>
+ <line text="raw 10.0"/>
+ <line text="a1 5.0"/>
+ <line text="a1 10.0"/>
+ <line text="a3 5.0"/>
+ <line text="a3 10.0"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test title="ajdk notebook: args and wildcards examples" dir="java5/generics/ajdk">
+ <compile files="WildcardArgsExamples.aj" options="-1.5">
+ <message kind="warning" line="6" text="unchecked match of List&lt;? extends Number&gt; with List"/>
+ </compile>
+ <run class="WildcardArgsExamples">
+ <stdout>
+ <line text="advice match at call(void C.foo(Object))"/>
+ <line text="advice match at call(void C.foo(Object))"/>
+ <line text="advice match 2 at call(void C.goo1(List))"/>
+ <line text="advice match 2 at call(void C.goo2(List))"/>
+ <line text="advice match 2 at call(void C.goo4(List))"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test title="ajdk notebook: pointcut in generic class example" dir="java5/generics/ajdk">
+ <compile files="PointcutInGenericClassExample.aj" options="-1.5">
+ <message kind="warning" line="23" text="parameterized with C"/>
+ <message kind="warning" line="29" text="parameterized with D"/>
+ </compile>
+ </ajc-test>
+
<!-- ============================================================== -->
<!-- End of generics tests -->
<!-- ============================================================== -->