From: acolyer Date: Fri, 4 Nov 2005 09:04:58 +0000 (+0000) Subject: tests for 103741 - use of java 5 specific language features now policed at < 1.5... X-Git-Tag: V1_5_0RC1~258 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c4ce2448ee0ad553d6768a22e82bba7f437a93fa;p=aspectj.git tests for 103741 - use of java 5 specific language features now policed at < 1.5 source level --- diff --git a/tests/java5/compliance/AJ5FeaturesAtJ14.aj b/tests/java5/compliance/AJ5FeaturesAtJ14.aj new file mode 100644 index 000000000..bc344f86b --- /dev/null +++ b/tests/java5/compliance/AJ5FeaturesAtJ14.aj @@ -0,0 +1,32 @@ +public aspect AJ5FeaturesAtJ14 { + + pointcut p1() : @annotation(Foo); + + pointcut p2() : @this(Foo); + + pointcut p3() : @target(Foo); + + pointcut p4() : @args(Foo); + + pointcut p5() : @within(Foo); + + pointcut p6() : @withincode(Foo); + + declare @type : Bar : @Foo; + + declare @method : * *.main() : @Foo; + + declare @field : * main : @Foo; + + declare @constructor : Bar.new(..) : @Foo; + + // annotations within type and signature patterns... + + pointcut p7() : execution(@Foo * *(..)); + + declare parents : (@Foo *) extends Bar; +} + +class Foo {} + +class Bar {} \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java index af3de4121..92b29d6b8 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -659,6 +659,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("ITDC with no explicit cons call"); } + public void testJava5SpecificFeaturesUsedAtJava14OrLower() { + runTest("java 5 pointcuts and declares at pre-java 5 compliance levels"); + } + // helper methods..... public SyntheticRepository createRepos(File cpentry) { diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index 42b96499c..4316e6ec8 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -27,6 +27,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + +