summaryrefslogtreecommitdiffstats
path: root/tests/new/AroundCasting.java
diff options
context:
space:
mode:
authorwisberg <wisberg>2002-12-16 18:51:06 +0000
committerwisberg <wisberg>2002-12-16 18:51:06 +0000
commit144143c2970a1e874d74cdbd0f8c622d4282a3c3 (patch)
treeb12383d3d9e76c7e1f25f7fbec83051ef17f81fb /tests/new/AroundCasting.java
parentfafae443719b26159ab2d7dac1c9b46b5e00b671 (diff)
downloadaspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.tar.gz
aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.zip
initial version
Diffstat (limited to 'tests/new/AroundCasting.java')
-rw-r--r--tests/new/AroundCasting.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/new/AroundCasting.java b/tests/new/AroundCasting.java
new file mode 100644
index 000000000..8fbc98bf6
--- /dev/null
+++ b/tests/new/AroundCasting.java
@@ -0,0 +1,24 @@
+import org.aspectj.testing.Tester;
+
+public class AroundCasting {
+ public static void main(String[] args) {
+ Tester.checkEqual(x = 3, 1003);
+ Tester.checkEqual(x, 3);
+ Tester.checkEvents(new String[] { "enter main" });
+ }
+ static int x;
+}
+
+
+aspect A {
+ static boolean test() { return true; }
+
+ int around(): if (test()) && set(int AroundCasting.x) {
+ return proceed() + 1000;
+ }
+
+ void around(): execution(void AroundCasting.main(String[])) {
+ Tester.event("enter main");
+ proceed();
+ }
+}