Browse Source

Testcode for migration testing

tags/Root_AspectJ5_Development
aclement 19 years ago
parent
commit
e08b5a42e6

+ 21
- 0
tests/migration/Aspect111.java View File

@@ -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();
}
}

+ 21
- 0
tests/migration/Aspect120.java View File

@@ -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();
}
}

+ 21
- 0
tests/migration/Aspect121.java View File

@@ -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();
}
}

+ 10
- 0
tests/migration/Program.java View File

@@ -0,0 +1,10 @@
public class Program {

public static void main(String[] argv) {
new Program().printHello();
}

public void printHello() {
System.err.println("Hello");
}
}

BIN
tests/migration/aspects111.jar View File


BIN
tests/migration/aspects120.jar View File


BIN
tests/migration/aspects121.jar View File


Loading…
Cancel
Save