aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2005-01-07 13:46:12 +0000
committeraclement <aclement>2005-01-07 13:46:12 +0000
commite08b5a42e6cd8ec569d3f62e05c0c7c9aa9a585b (patch)
tree97ab85d6762ad6188f34c01cde1c380f822abb95 /tests
parent83a975d6488eb8cb08e4cdcd7385ce2c0915c309 (diff)
downloadaspectj-e08b5a42e6cd8ec569d3f62e05c0c7c9aa9a585b.tar.gz
aspectj-e08b5a42e6cd8ec569d3f62e05c0c7c9aa9a585b.zip
Testcode for migration testing
Diffstat (limited to 'tests')
-rw-r--r--tests/migration/Aspect111.java21
-rw-r--r--tests/migration/Aspect120.java21
-rw-r--r--tests/migration/Aspect121.java21
-rw-r--r--tests/migration/Program.java10
-rw-r--r--tests/migration/aspects111.jarbin0 -> 1386 bytes
-rw-r--r--tests/migration/aspects120.jarbin0 -> 1663 bytes
-rw-r--r--tests/migration/aspects121.jarbin0 -> 1679 bytes
7 files changed, 73 insertions, 0 deletions
diff --git a/tests/migration/Aspect111.java b/tests/migration/Aspect111.java
new file mode 100644
index 000000000..6537216aa
--- /dev/null
+++ b/tests/migration/Aspect111.java
@@ -0,0 +1,21 @@
+// Aspect should be built with AspectJ 1.1.1 into aspects111.jar
+// We are testing the new AspectJ can recognize old aspects
+
+public aspect Aspect111 {
+
+ pointcut anyMethodCall(): execution(* main(..));
+
+ pointcut setIntField(): set(int *);
+
+ pointcut complex(): call(* *(..)) && cflow(execution(* toplevel(..)));
+
+ pointcut moreComplex(): call(* *(..)) && !(call(* foo*(..)) || call(* bar*(..)));
+
+ before(): complex() { }
+
+ after(): complex() { }
+
+ void around(): anyMethodCall() {
+ proceed();
+ }
+}
diff --git a/tests/migration/Aspect120.java b/tests/migration/Aspect120.java
new file mode 100644
index 000000000..e51bc4093
--- /dev/null
+++ b/tests/migration/Aspect120.java
@@ -0,0 +1,21 @@
+// Aspect should be built with AspectJ 1.2.0 into aspects120.jar
+// We are testing the new AspectJ can recognize old aspects
+
+public aspect Aspect120 {
+
+ pointcut anyMethodCall(): execution(* main(..));
+
+ pointcut setIntField(): set(int *);
+
+ pointcut complex(): call(* *(..)) && cflow(execution(* toplevel(..)));
+
+ pointcut moreComplex(): call(* *(..)) && !(call(* foo*(..)) || call(* bar*(..)));
+
+ before(): complex() { }
+
+ after(): complex() { }
+
+ void around(): anyMethodCall() {
+ proceed();
+ }
+}
diff --git a/tests/migration/Aspect121.java b/tests/migration/Aspect121.java
new file mode 100644
index 000000000..55f8a21b4
--- /dev/null
+++ b/tests/migration/Aspect121.java
@@ -0,0 +1,21 @@
+// Aspect should be built with AspectJ 1.2.1 into aspects121.jar
+// We are testing the new AspectJ can recognize old aspects
+
+public aspect Aspect121 {
+
+ pointcut anyMethodCall(): execution(* main(..));
+
+ pointcut setIntField(): set(int *);
+
+ pointcut complex(): call(* *(..)) && cflow(execution(* toplevel(..)));
+
+ pointcut moreComplex(): call(* *(..)) && !(call(* foo*(..)) || call(* bar*(..)));
+
+ before(): complex() { }
+
+ after(): complex() { }
+
+ void around(): anyMethodCall() {
+ proceed();
+ }
+}
diff --git a/tests/migration/Program.java b/tests/migration/Program.java
new file mode 100644
index 000000000..a4568bd67
--- /dev/null
+++ b/tests/migration/Program.java
@@ -0,0 +1,10 @@
+public class Program {
+
+ public static void main(String[] argv) {
+ new Program().printHello();
+ }
+
+ public void printHello() {
+ System.err.println("Hello");
+ }
+}
diff --git a/tests/migration/aspects111.jar b/tests/migration/aspects111.jar
new file mode 100644
index 000000000..c68f901a5
--- /dev/null
+++ b/tests/migration/aspects111.jar
Binary files differ
diff --git a/tests/migration/aspects120.jar b/tests/migration/aspects120.jar
new file mode 100644
index 000000000..901ad5088
--- /dev/null
+++ b/tests/migration/aspects120.jar
Binary files differ
diff --git a/tests/migration/aspects121.jar b/tests/migration/aspects121.jar
new file mode 100644
index 000000000..44dcde236
--- /dev/null
+++ b/tests/migration/aspects121.jar
Binary files differ