diff options
author | aclement <aclement> | 2005-10-27 13:49:34 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-10-27 13:49:34 +0000 |
commit | 6ab78ee0e1d49a0e3f882ddf604061dc572cb427 (patch) | |
tree | 6be694492a79b00b680c4954c9459ca3f8e789db /tests | |
parent | fa21e62717f87e3f84b74dcedc36d79951ec0751 (diff) | |
download | aspectj-6ab78ee0e1d49a0e3f882ddf604061dc572cb427.tar.gz aspectj-6ab78ee0e1d49a0e3f882ddf604061dc572cb427.zip |
test and fix for pr113447: from Helen.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs150/PR113447.java | 40 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java | 4 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 6 |
3 files changed, 50 insertions, 0 deletions
diff --git a/tests/bugs150/PR113447.java b/tests/bugs150/PR113447.java new file mode 100644 index 000000000..8fd45ed06 --- /dev/null +++ b/tests/bugs150/PR113447.java @@ -0,0 +1,40 @@ +public class PR113447 { + + public static void main(String[] args) { + PR113447 me = new PR113447(); + me.method1(); + me.method3(); + } + + public void method1(){} + + public void method3(){} +} + +aspect Super { + + // second method doesn't exist + pointcut pc1(PR113447 s) : + (this(s) && execution(void method1())) + || (this(s) && execution(void method2())); + + before(PR113447 s) : pc1(s) { + } + + // second method does exist + pointcut pc2(PR113447 s) : + (this(s) && execution(void method1())) + || (this(s) && execution(void method3())); + + before(PR113447 s) : pc2(s) { + } + + // second method doesn't exist + pointcut pc3(PR113447 s) : + (args(s) && execution(void method1())) + || (args(s) && execution(void method2())); + + before(PR113447 s) : pc3(s) { + } + +} diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java index 282154ca7..fc05dad53 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -632,6 +632,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("weaveinfo message for declare at method on an ITDd method"); } + public void testNoVerifyErrorWithTwoThisPCDs_pr113447() { + runTest("no verify error with two this pcds"); + } + // 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 3796ab103..b476f9e39 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -698,6 +698,12 @@ </compile> </ajc-test> + <ajc-test dir="bugs150" title="no verify error with two this pcds"> + <compile files="PR113447.java"> + </compile> + <run class="PR113447"/> + </ajc-test> + <!-- ============================================================================ --> <!-- ============================================================================ --> |