aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2006-08-02 08:46:25 +0000
committeraclement <aclement>2006-08-02 08:46:25 +0000
commit572e8e4d8bf9cae92510e822c291e9bb791da683 (patch)
tree78dfa9e83af9aa46ffe205cf890856374f0f2348 /tests
parentd15e56b4599a3a5d19e42aee5ae72c2b05c243a3 (diff)
downloadaspectj-572e8e4d8bf9cae92510e822c291e9bb791da683.tar.gz
aspectj-572e8e4d8bf9cae92510e822c291e9bb791da683.zip
Fix for failure when lock()/unlock() used in XML defined pointcut and would require synchronization transform of a method
Diffstat (limited to 'tests')
-rw-r--r--tests/src/org/aspectj/systemtest/ajc152/SynchronizationTransformTests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc152/synchronization.xml21
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc152/SynchronizationTransformTests.java b/tests/src/org/aspectj/systemtest/ajc152/SynchronizationTransformTests.java
index 75f57c8fe..ec4c1280a 100644
--- a/tests/src/org/aspectj/systemtest/ajc152/SynchronizationTransformTests.java
+++ b/tests/src/org/aspectj/systemtest/ajc152/SynchronizationTransformTests.java
@@ -174,6 +174,10 @@ public class SynchronizationTransformTests extends XMLBasedAjcTestCase {
public void testJoinpointsEnabledButNoLock() {
runTest("joinpoints enabled but no lock");
}
+
+ public void testTransformWithLTW() {
+ runTest("transform with LTW");
+ }
// more complex code sequences...
public void testOtherTargeters() {
diff --git a/tests/src/org/aspectj/systemtest/ajc152/synchronization.xml b/tests/src/org/aspectj/systemtest/ajc152/synchronization.xml
index d0cf6e0b2..8b4a7ed47 100644
--- a/tests/src/org/aspectj/systemtest/ajc152/synchronization.xml
+++ b/tests/src/org/aspectj/systemtest/ajc152/synchronization.xml
@@ -164,6 +164,27 @@
</run>
</ajc-test>
+ <ajc-test dir="features152/synchronization/transformed" title="transform with LTW">
+ <compile files="CaptureLock.aj" options="-1.5"/>
+ <compile files="Program.java" options="-1.5"/>
+ <run class="Program" ltw="aop1.xml">
+ <stdout>
+ <line text="Before a lock or unlock"/>
+ <line text="hello from b()"/>
+ <line text="Before a lock or unlock"/>
+ <line text="Before a lock or unlock"/>
+ <line text="bang in c()"/>
+ <line text="Before a lock or unlock"/>
+ <line text="Before a lock or unlock"/>
+ <line text="hello from d()"/>
+ <line text="Before a lock or unlock"/>
+ <line text="hello from block in d()"/>
+ <line text="Before a lock or unlock"/>
+ <line text="Before a lock or unlock"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
<ajc-test dir="features152/synchronization" title="using lock with LTW">
<compile files="LockAspect1.java" options="-1.5 -Xjoinpoints:synchronization"/>
<compile files="BasicProgram1.java" options="-1.5 -Xjoinpoints:synchronization"/>