summaryrefslogtreecommitdiffstats
path: root/tests/new/AroundCasting.java
diff options
context:
space:
mode:
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();
+ }
+}