diff options
author | aclement <aclement> | 2006-07-25 07:46:13 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-07-25 07:46:13 +0000 |
commit | 357bbe9eeb34748f7c8c2ff85049230db2adbbf2 (patch) | |
tree | 93f24d16310e32f78d6a5cd71f66ba40afd4017e /tests | |
parent | d3376d042220a3a8de02b22a87131874cd4e48d6 (diff) | |
download | aspectj-357bbe9eeb34748f7c8c2ff85049230db2adbbf2.tar.gz aspectj-357bbe9eeb34748f7c8c2ff85049230db2adbbf2.zip |
test and fix for Bug 150671: declare error on set of volatile field does not work
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs153/pr150671.aj | 16 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java | 2 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc153/ajc153.xml | 7 |
3 files changed, 25 insertions, 0 deletions
diff --git a/tests/bugs153/pr150671.aj b/tests/bugs153/pr150671.aj new file mode 100644 index 000000000..86f495bc3 --- /dev/null +++ b/tests/bugs153/pr150671.aj @@ -0,0 +1,16 @@ +class C { + + private volatile int state; + private int test; + + public void foo() { + state = 0; + test = 0; + } + +} + +aspect FSM { + declare error: set(* C.state): "Changing state"; + declare error: set(* C.test): "test"; +} diff --git a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java index 4878bb045..111800bef 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java @@ -46,6 +46,8 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void testCantFindType_pr149322_02() {runTest("can't find type on interface call 2");} public void testCantFindType_pr149322_03() {runTest("can't find type on interface call 3");} + public void testMatchVolatileField_pr150671() {runTest("match volatile field");}; + ///////////////////////////////////////// public static Test suite() { return XMLBasedAjcTestCase.loadSuite(Ajc153Tests.class); diff --git a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml index a8b4c6034..94026f753 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml +++ b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml @@ -237,5 +237,12 @@ </stdout> </run> </ajc-test> + + <ajc-test dir="bugs153" title="match volatile field"> + <compile files="pr150671.aj" options="-Xset:activateLightweightDelegates=false"> + <message kind="error" line="7" text="Changing state"/> + <message kind="error" line="8" text="test"/> + </compile> + </ajc-test> </suite>
\ No newline at end of file |