aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/binaryCompat/Main.java2
-rw-r--r--tests/bugs/binaryCompat/TraceV2.aj2
-rw-r--r--tests/bugs/binaryCompat/TraceWithInnerV1.aj24
-rw-r--r--tests/bugs/binaryCompat/TraceWithInnerV2.aj34
4 files changed, 61 insertions, 1 deletions
diff --git a/tests/bugs/binaryCompat/Main.java b/tests/bugs/binaryCompat/Main.java
index d91978f9f..0903463d9 100644
--- a/tests/bugs/binaryCompat/Main.java
+++ b/tests/bugs/binaryCompat/Main.java
@@ -14,4 +14,4 @@ public class Main {
private static void doit() {
System.out.println("hello world");
}
-} \ No newline at end of file
+}
diff --git a/tests/bugs/binaryCompat/TraceV2.aj b/tests/bugs/binaryCompat/TraceV2.aj
index c71416af3..5764387b0 100644
--- a/tests/bugs/binaryCompat/TraceV2.aj
+++ b/tests/bugs/binaryCompat/TraceV2.aj
@@ -3,8 +3,10 @@ aspect Trace {
before(): execution(void doit(..)) {
System.out.println("entering");
+
}
+
after() returning: execution(void doit(..)) {
System.out.println("exiting");
}
diff --git a/tests/bugs/binaryCompat/TraceWithInnerV1.aj b/tests/bugs/binaryCompat/TraceWithInnerV1.aj
new file mode 100644
index 000000000..2238a2323
--- /dev/null
+++ b/tests/bugs/binaryCompat/TraceWithInnerV1.aj
@@ -0,0 +1,24 @@
+aspect Trace {
+ public static boolean expectNoSuchMethodError = false;
+
+ before(): execution(void doit(..)) {
+ System.out.println("enter");
+ }
+
+ static aspect InnerTrace {
+ before(): execution(void doit(..)) {
+ System.out.println("Inner enter");
+ }
+
+ after() returning: execution(void doit(..)) {
+ System.out.println("Inner exit");
+ }
+
+ after() throwing: execution(void doit(..)) {
+ System.out.println("Inner after throwing");
+ }
+ }
+ after() returning: execution(void doit(..)) {
+ System.out.println("exit");
+ }
+} \ No newline at end of file
diff --git a/tests/bugs/binaryCompat/TraceWithInnerV2.aj b/tests/bugs/binaryCompat/TraceWithInnerV2.aj
new file mode 100644
index 000000000..297fdfba7
--- /dev/null
+++ b/tests/bugs/binaryCompat/TraceWithInnerV2.aj
@@ -0,0 +1,34 @@
+aspect Trace {
+ public static boolean expectNoSuchMethodError = false;
+
+ before(): execution(void doit(..)) {
+ System.out.println("entering");
+
+ }
+
+ public void method() {
+ // Extra method to do nothing but test if the numbering still behaves
+ }
+
+ static aspect InnerTrace {
+ before(): execution(void doit(..)) {
+ System.out.println("Inner entering");
+ }
+
+ after() returning: execution(void doit(..)) {
+ System.out.println("Inner exiting");
+ }
+
+ after() throwing: execution(void doit(..)) {
+ System.out.println("Inner chucking");
+ }
+
+ before(): execution(* noMatch(..)) {
+ System.out.println("This doesn't match anything, but checks the sequence number for the next bit of advice is OK");
+ }
+ }
+
+ after() returning: execution(void doit(..)) {
+ System.out.println("exiting");
+ }
+} \ No newline at end of file