diff options
author | jhugunin <jhugunin> | 2004-01-26 20:57:17 +0000 |
---|---|---|
committer | jhugunin <jhugunin> | 2004-01-26 20:57:17 +0000 |
commit | 9e3a03d72645690f365b68404a3e8d0fc2aec76f (patch) | |
tree | 0b1bad5fcd06312202f874be8dc5071842d26ff0 /tests/bugs | |
parent | 189c687a9f362a78c4df459ad4ea3bfbf5e154a9 (diff) | |
download | aspectj-9e3a03d72645690f365b68404a3e8d0fc2aec76f.tar.gz aspectj-9e3a03d72645690f365b68404a3e8d0fc2aec76f.zip |
tests for Bugzilla Bug 50641
Better binary compatibility for advice method names
Diffstat (limited to 'tests/bugs')
-rw-r--r-- | tests/bugs/binaryCompat/Main.java | 17 | ||||
-rw-r--r-- | tests/bugs/binaryCompat/TraceRE.aj | 11 | ||||
-rw-r--r-- | tests/bugs/binaryCompat/TraceV1.aj | 11 | ||||
-rw-r--r-- | tests/bugs/binaryCompat/TraceV2.aj | 11 |
4 files changed, 50 insertions, 0 deletions
diff --git a/tests/bugs/binaryCompat/Main.java b/tests/bugs/binaryCompat/Main.java new file mode 100644 index 000000000..d91978f9f --- /dev/null +++ b/tests/bugs/binaryCompat/Main.java @@ -0,0 +1,17 @@ +public class Main { + public static void main(String[] args) { + try { + doit(); + if (Trace.expectNoSuchMethodError) { + throw new RuntimeException("expected NoSuchMethodError"); + } + } catch (NoSuchMethodError e) { + if (!Trace.expectNoSuchMethodError) throw e; + } + + } + + private static void doit() { + System.out.println("hello world"); + } +}
\ No newline at end of file diff --git a/tests/bugs/binaryCompat/TraceRE.aj b/tests/bugs/binaryCompat/TraceRE.aj new file mode 100644 index 000000000..72136ff20 --- /dev/null +++ b/tests/bugs/binaryCompat/TraceRE.aj @@ -0,0 +1,11 @@ +aspect Trace {
+ public static boolean expectNoSuchMethodError = true;
+
+ before(): execution(void main(..)) { // expect an error for incompatible binary change
+ System.out.println("enter");
+ }
+
+ after() returning: execution(void doit(..)) {
+ System.out.println("exit");
+ }
+}
\ No newline at end of file diff --git a/tests/bugs/binaryCompat/TraceV1.aj b/tests/bugs/binaryCompat/TraceV1.aj new file mode 100644 index 000000000..bb90e4a9c --- /dev/null +++ b/tests/bugs/binaryCompat/TraceV1.aj @@ -0,0 +1,11 @@ +aspect Trace {
+ public static boolean expectNoSuchMethodError = false;
+
+ before(): execution(void doit(..)) {
+ System.out.println("enter");
+ }
+
+ after() returning: execution(void doit(..)) {
+ System.out.println("exit");
+ }
+}
\ No newline at end of file diff --git a/tests/bugs/binaryCompat/TraceV2.aj b/tests/bugs/binaryCompat/TraceV2.aj new file mode 100644 index 000000000..c71416af3 --- /dev/null +++ b/tests/bugs/binaryCompat/TraceV2.aj @@ -0,0 +1,11 @@ +aspect Trace {
+ public static boolean expectNoSuchMethodError = false;
+
+ before(): execution(void doit(..)) {
+ System.out.println("entering");
+ }
+
+ after() returning: execution(void doit(..)) {
+ System.out.println("exiting");
+ }
+}
\ No newline at end of file |