diff options
author | aclement <aclement> | 2008-08-20 18:56:47 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-08-20 18:56:47 +0000 |
commit | 95f5dac42dd995f1c03162a2d43a5d69067e159d (patch) | |
tree | 7c90b8651f3a9039fb615de75d582d2af833eb0a /tests | |
parent | 108712f7777391e2e38609fb4de25e4815cf3892 (diff) | |
download | aspectj-95f5dac42dd995f1c03162a2d43a5d69067e159d.tar.gz aspectj-95f5dac42dd995f1c03162a2d43a5d69067e159d.zip |
239539: test and fix: better message when cannot override pointcut due to it not being visible
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs162/pr239539/Foo.java | 7 | ||||
-rw-r--r-- | tests/bugs162/pr239539/PrintAround.java | 14 | ||||
-rw-r--r-- | tests/bugs162/pr239539/PrintAroundFoo.java | 9 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc10x/ajc10x-tests.xml | 3 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java | 1 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc162/ajc162.xml | 6 |
6 files changed, 38 insertions, 2 deletions
diff --git a/tests/bugs162/pr239539/Foo.java b/tests/bugs162/pr239539/Foo.java new file mode 100644 index 000000000..602be10a5 --- /dev/null +++ b/tests/bugs162/pr239539/Foo.java @@ -0,0 +1,7 @@ +package foo; + +public class Foo { + public static void main (String[] args) { + System.out.println("foo!"); + } +} diff --git a/tests/bugs162/pr239539/PrintAround.java b/tests/bugs162/pr239539/PrintAround.java new file mode 100644 index 000000000..acc64c355 --- /dev/null +++ b/tests/bugs162/pr239539/PrintAround.java @@ -0,0 +1,14 @@ +package bar; + +public abstract aspect PrintAround { + + abstract pointcut method(); + + Object around(): method() { + System.out.println("-before-"); + Object r = proceed(); + System.out.println("-after-"); + return r; + } + +} diff --git a/tests/bugs162/pr239539/PrintAroundFoo.java b/tests/bugs162/pr239539/PrintAroundFoo.java new file mode 100644 index 000000000..54d382478 --- /dev/null +++ b/tests/bugs162/pr239539/PrintAroundFoo.java @@ -0,0 +1,9 @@ +package foo; + +import bar.PrintAround; + +public aspect PrintAroundFoo extends PrintAround { + + pointcut method() : call (void Main(String[])); + +} diff --git a/tests/src/org/aspectj/systemtest/ajc10x/ajc10x-tests.xml b/tests/src/org/aspectj/systemtest/ajc10x/ajc10x-tests.xml index 8076d2e25..3d7d93a28 100644 --- a/tests/src/org/aspectj/systemtest/ajc10x/ajc10x-tests.xml +++ b/tests/src/org/aspectj/systemtest/ajc10x/ajc10x-tests.xml @@ -1393,9 +1393,8 @@ keywords="from-resolved_10x" comment="XXX getting error - confirm line numbers"> <compile files="parent/ParentCE.java,child/ChildCE.java"> + <message kind="error" file="child/ChildCE.java" line="32" text="pointcut 'parent.ParentCE.define()' is not visible"/> <message kind="error" file="child/ChildCE.java" line="21"/> - <message kind="error" file="child/ChildCE.java" line="31"/> - <message kind="error" file="parent/ParentCE.java" line="8"/> <message kind="error" file="parent/ParentCE.java" line="10"/> <message kind="error" file="parent/ParentCE.java" line="12"/> <message kind="error" file="parent/ParentCE.java" line="22"/> diff --git a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java index 96e8ede51..71cadc222 100644 --- a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java @@ -19,6 +19,7 @@ import org.aspectj.testing.XMLBasedAjcTestCase; public class Ajc162Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // AspectJ1.6.2 + public void testPublicPointcut_pr239539() { runTest("public pointcut"); } public void testGenericDecp_pr241047() { runTest("generic decp"); } public void testGenericDecp_pr241047_2() { runTest("generic decp - 2"); } public void testGenericItds_pr242797_1() { runTest("generic itds - 1"); } diff --git a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml index aec645c8d..5685bc9e5 100644 --- a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml +++ b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml @@ -37,6 +37,12 @@ </run> </ajc-test> + <ajc-test dir="bugs162/pr239539" title="public pointcut"> + <compile files="PrintAround.java PrintAroundFoo.java Foo.java" options="-1.5"> + <message kind="error" line="7" text="pointcut 'bar.PrintAround.method()' is not visible from type "/> + </compile> + </ajc-test> + <ajc-test dir="bugs162/pr242797/case1" title="generic itds - 1"> <compile files="ClassUtils.java CMEFinder.java Finder.java H2Deployment.java Localized.java LocalizedFinder.java OnetElement.java OnetFinder.java Partitioned.java PartitionedFinder.java" options="-1.5"> </compile> |